Beispiel #1
0
    def initial_setup(self):
        machines = []

        if "nperf_cpupin" in self.params:
            for m in self.matched:
                m.run("service irqbalance stop")

            for m in self.matched:
                for d in m.devices:
                    if re.match(r'^eth[0-9]+$', d.name):
                        pin_dev_irqs(m, d, 0)

        self.nperf_opts = ""

        if "test_if2" in self.params:
            self.nperf_opts = "-L %s" % (self.params.test_if2.ips[0])

        if "nperf_cpupin" in self.params and self.params.netperf_mode != "multi":
            self.nperf_opts += " -T%s,%s" % (self.params.netperf_cpupin,
                                             self.params.netperf_cpupin)

        self.nperf_opts6 = ""

        if "test_if2" in self.params:
            self.nperf_opts6 = "-L %s" % (self.params.test_if2.ips[1])

        self.nperf_opts6 += " -6"

        if "nperf_cpupin" in self.params and self.params.netperf_mode != "multi":
            self.nperf_opts6 += " -T%s,%s" % (self.params.netperf_cpupin,
                                              self.params.netperf_cpupin)

        time.sleep(15)
Beispiel #2
0
res = m2.run("rpm -qa iproute", save_output=True)
if (res.get_result()["res_data"]["stdout"].find("iproute-2") != -1):
    m2_key = "0x"
else:
    m2_key = ""

if nperf_cpupin:
    m1.run("service irqbalance stop")
    m2.run("service irqbalance stop")

    dev_list = [(m1, m1_if), (m2, m2_if)]

    # this will pin devices irqs to cpu #0
    for m, d in dev_list:
        pin_dev_irqs(m, d, 0)

nperf_opts = ""
if nperf_cpupin and nperf_num_parallel == 1:
    nperf_opts = " -T%s,%s" % (nperf_cpupin, nperf_cpupin)

ctl.wait(15)


def configure_ipsec(ciph_alg, ciph_key, hash_alg, hash_key, ip_version):
    if ip_version == "ipv4":
        m1_addr = m1_if_addr
        m2_addr = m2_if_addr
    else:
        m1_addr = m1_if_addr6
        m2_addr = m2_if_addr6
Beispiel #3
0
        cdata = d.save_coalesce()
        cdata['use_adaptive_tx_coalesce'] = 0
        cdata['use_adaptive_rx_coalesce'] = 0
        if not d.set_coalesce(cdata):
            coalesce_status.set_options({'fail': True,
                                         'msg': "Failed to set coalesce options"\
                                                " on device %s" % d.get_devname()})
            d.get_host().run(coalesce_status)

if nperf_cpupin:
    m1.run("service irqbalance stop")
    m2.run("service irqbalance stop")

    # this will pin devices irqs to cpu #0
    for m, d in dev_list:
        pin_dev_irqs(m, d, 0)

ping_mod = ctl.get_module("IcmpPing",
                           options={
                               "addr" : test_if2.get_ip(0),
                               "count" : 100,
                               "iface" : test_if1.get_devname(),
                               "interval" : 0.1
                           })

ping_mod6 = ctl.get_module("Icmp6Ping",
                           options={
                               "addr" : test_if2.get_ip(1),
                               "count" : 100,
                               "iface" : test_if1.get_devname(),
                               "interval" : 0.1
Beispiel #4
0
        # disable any interrupt coalescing settings
        cdata = d.save_coalesce()
        cdata['use_adaptive_tx_coalesce'] = 0
        cdata['use_adaptive_rx_coalesce'] = 0
        if not d.set_coalesce(cdata):
            coalesce_status.set_options({'fail': True,
                                         'msg': "Failed to set coalesce options"\
                                                " on device %s" % d.get_devname()})
            d.get_host().run(coalesce_status)

if netdev_cpupin:
    m1.run("service irqbalance stop")
    m2.run("service irqbalance stop")

    for m, d in [ (m1, m1_testiface), (m2, m2_testiface) ]:
        pin_dev_irqs(m, d, netdev_cpupin)

p_opts = "-L %s" % (m2_testiface.get_ip(0))

if nperf_cpupin and nperf_mode != "multi":
    p_opts += " -T%s,%s" % (nperf_cpupin, nperf_cpupin)

netperf_cli_tcp_rr = ctl.get_module("Netperf",
                                  options={
                                      "role" : "client",
                                      "netperf_server" : m1_testiface.get_ip(0),
                                      "duration" : netperf_duration,
                                      "testname" : "TCP_RR",
                                      "confidence" : nperf_confidence,
                                      "cpu_util" : nperf_cpu_util,
                                      "runs" : nperf_max_runs,
Beispiel #5
0
        cdata = d.save_coalesce()
        cdata['use_adaptive_tx_coalesce'] = 0
        cdata['use_adaptive_rx_coalesce'] = 0
        if not d.set_coalesce(cdata):
            coalesce_status.set_options({'fail': True,
                                         'msg': "Failed to set coalesce options"\
                                                " on device %s" % d.get_devname()})
            d.get_host().run(coalesce_status)

if netdev_cpupin:
    m1.run("service irqbalance stop")
    m2.run("service irqbalance stop")

    # this will pin devices irqs to cpu specified by netdev_cpupin alias
    for m, d in dev_list:
        pin_dev_irqs(m, d, netdev_cpupin)

ping_mod = ctl.get_module("IcmpPing",
                           options={
                               "addr" : test_if2.get_ip(0),
                               "count" : 100,
                               "iface" : test_if1.get_devname(),
                               "interval" : 0.1
                           })

ping_mod6 = ctl.get_module("Icmp6Ping",
                           options={
                               "addr" : test_if2.get_ip(1),
                               "count" : 100,
                               "iface" : test_if1.get_devname(),
                               "interval" : 0.1