* [dts] [PATCH] Support for I217 and I218 Intel EC @ 2015-01-22 16:40 Ravi Kerur 2015-01-22 16:40 ` Ravi Kerur 0 siblings, 1 reply; 3+ messages in thread From: Ravi Kerur @ 2015-01-22 16:40 UTC (permalink / raw) To: dts This patch adds support for Intel I217 and I218 EC. It includes changes required in the infrastructure. In addition, changes includes support for checks to reduce errors in dts.log file. It has been tested on Ubuntu 14.04, x86_64. Ravi Kerur (1): Support for I217 and I218 Intel EC. framework/crb.py | 24 ++++++++++++++++++------ framework/dut.py | 5 ++++- framework/project_dpdk.py | 4 +++- framework/settings.py | 10 +++++++++- tests/TestSuite_ip_pipeline.py | 6 +++++- tests/TestSuite_pmd.py | 8 ++++++-- 6 files changed, 45 insertions(+), 12 deletions(-) -- 1.9.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [dts] [PATCH] Support for I217 and I218 Intel EC. 2015-01-22 16:40 [dts] [PATCH] Support for I217 and I218 Intel EC Ravi Kerur @ 2015-01-22 16:40 ` Ravi Kerur 2015-01-23 9:58 ` Liu, Yong 0 siblings, 1 reply; 3+ messages in thread From: Ravi Kerur @ 2015-01-22 16:40 UTC (permalink / raw) To: dts Changes include Added PCI-ID of I217V, I217LM, I218V and I218LM into appropriate files. Check driver is bound before binding, it reduces error messges in dts.log Check driver is inserted before removing, it reduces error messages in dts.log Add more delay after link up operation, since I217 and I218 takes more time than the tested NICs. Signed-off-by: Ravi Kerur <rkerur@gmail.com> --- framework/crb.py | 24 ++++++++++++++++++------ framework/dut.py | 5 ++++- framework/project_dpdk.py | 4 +++- framework/settings.py | 10 +++++++++- tests/TestSuite_ip_pipeline.py | 6 +++++- tests/TestSuite_pmd.py | 8 ++++++-- 6 files changed, 45 insertions(+), 12 deletions(-) diff --git a/framework/crb.py b/framework/crb.py index aca62c1..d41f51b 100644 --- a/framework/crb.py +++ b/framework/crb.py @@ -142,7 +142,9 @@ class Crb(object): self.send_expect("rmmod vfio_pci", "# ", 10) self.send_expect("rmmod vfio", "# ", 10) else: - self.send_expect("rmmod igb_uio", "# ", 10) + out = self.send_expect("lsmod | grep igb_uio", "#") + if "igb_uio" in out: + self.send_expect("rmmod -f igb_uio", "# ", 10) self.send_expect("modprobe igb", "# ", 20) self.send_expect("modprobe ixgbe", "# ", 20) self.send_expect("modprobe e1000e", "# ", 20) @@ -151,14 +153,24 @@ class Crb(object): try: for (pci_bus, pci_id) in self.pci_devices_info: + """ + Check if driver is already bound before binding it. + """ if pci_id in ('8086:10fb', '8086:151c', '8086:1528', '8086:1512', '8086:154a'): - self.send_expect("echo 0000:%s > /sys/bus/pci/drivers/ixgbe/bind" % pci_bus, "# ") + if not os.path.exists("/sys/bus/pci/drivers/ixgbe/"+"0000:"+pci_bus): + self.send_expect("echo -n 0000:%s > /sys/bus/pci/drivers/ixgbe/bind" % pci_bus, "# ") elif pci_id in ('8086:10e8', '8086:150e', '8086:1521', '8086:10c9', '8086:1526', '8086:1533'): - self.send_expect("echo 0000:%s > /sys/bus/pci/drivers/igb/bind" % pci_bus, "# ") + if not os.path.exists("/sys/bus/pci/drivers/igb/"+"0000:"+pci_bus): + self.send_expect("echo -n 0000:%s > /sys/bus/pci/drivers/igb/bind" % pci_bus, "# ") elif pci_id in('8086:10d3', '8086:10b9'): - self.send_expect("echo 0000:%s > /sys/bus/pci/drivers/e1000e/bind" % pci_bus, "# ") + if not os.path.exists("/sys/bus/pci/drivers/e1000e/"+"0000:"+pci_bus): + self.send_expect("echo -n 0000:%s > /sys/bus/pci/drivers/e1000e/bind" % pci_bus, "# ") + elif pci_id in ('8086:153a', '8086:153b', '8086:155a', '8086:1559'): + if not os.path.exists("/sys/bus/pci/drivers/e1000e/"+"0000:"+pci_bus): + self.send_expect("echo -n 0000:%s > /sys/bus/pci/drivers/e1000e/bind" % pci_bus, "# ") elif pci_id in ('8086:100f', '8086:100e'): - self.send_expect("echo 0000:%s > /sys/bus/pci/drivers/e1000/bind" % pci_bus, "# ") + if not os.path.exists("/sys/bus/pci/drivers/e1000/"+"0000:"+pci_bus): + self.send_expect("echo -n 0000:%s > /sys/bus/pci/drivers/e1000/bind" % pci_bus, "# ") elif pci_id in ('1af4:1000'): self.send_expect("echo 0000%s > /sys/bus/pci/drivers/virtio-pci/bind" % pci_bus, "# ") else: @@ -226,7 +238,7 @@ class Crb(object): """ Get interface name of specified pci device on linux. """ - command = 'ls /sys/bus/pci/devices/0000:%s:%s/net' % (bus_id, devfun_id) + command = 'ls --color=never /sys/bus/pci/devices/0000:%s:%s/net' % (bus_id, devfun_id) return self.send_expect(command, '# ') def get_interface_name_freebsd(self, bus_id, devfun_id): diff --git a/framework/dut.py b/framework/dut.py index 4def144..f901270 100644 --- a/framework/dut.py +++ b/framework/dut.py @@ -420,7 +420,10 @@ class Dut(Crb): out = self.send_expect("ip link show %s" % intf, "# ") if "DOWN" in out: self.send_expect("ip link set %s up" % intf, "# ") - time.sleep(5) + """ + I217 and I218 requires more time to acquire V6 address. + """ + time.sleep(25) self.logger.info("DUT: [000:%s %s] %s" % (pci_bus, pci_id, diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index 6e25f1f..3577eb7 100644 --- a/framework/project_dpdk.py +++ b/framework/project_dpdk.py @@ -96,7 +96,9 @@ class DPDKdut(Dut): assert ("vfio_iommu_type1" in out), "Failed to setup vfio-pci" else: self.send_expect("modprobe uio", "#", 70) - self.send_expect("rmmod -f igb_uio", "#", 70) + out = self.send_expect("lsmod | grep igb_uio", "#") + if "igb_uio" in out: + self.send_expect("rmmod -f igb_uio", "#", 70) self.send_expect("insmod ./" + target + "/kmod/igb_uio.ko", "#", 60) out = self.send_expect("lsmod | grep igb_uio", "#") assert ("igb_uio" in out), "Failed to insmod igb_uio" diff --git a/framework/settings.py b/framework/settings.py index 0d4ed82..2ef8db8 100644 --- a/framework/settings.py +++ b/framework/settings.py @@ -50,7 +50,11 @@ NICS = { 'springfountain': '8086:154a', 'virtio': '1af4:1000', 'avoton': '8086:1f41', - 'avoton2c5': '8086:1f45' + 'avoton2c5': '8086:1f45', + 'I217V': '8086:153b', + 'I217LM': '8086:153a', + 'I218V': '8086:1559', + 'I218LM': '8086:155a', } DRIVERS = { @@ -72,6 +76,10 @@ DRIVERS = { 'virtio': 'igb', 'avoton': 'igb', 'avoton2c5': 'igb', + 'I217V': 'igb', + 'I217LM': 'igb', + 'I218V': 'igb', + 'I218LM': 'igb', } """ diff --git a/tests/TestSuite_ip_pipeline.py b/tests/TestSuite_ip_pipeline.py index 9c56799..7da393e 100644 --- a/tests/TestSuite_ip_pipeline.py +++ b/tests/TestSuite_ip_pipeline.py @@ -292,7 +292,11 @@ class TestIPPipeline(TestCase): """ # Check for port availability - self.needed_ports = {"niantic": 2} + self.needed_ports = {"niantic": 2, + "I217V": 1, + "I217LM": 1, + "I218V": 1, + "I218LM": 1} self.dut_ports = self.dut.get_ports(self.nic) self.verify(len(self.dut_ports) >= self.needed_ports[self.nic], "Insufficient ports for speed testing") diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py index acd6364..b88352f 100644 --- a/tests/TestSuite_pmd.py +++ b/tests/TestSuite_pmd.py @@ -96,11 +96,15 @@ class TestPmd(TestCase): "kawela_2": 2, "bartonhills": 4, "82545EM": 2, - "82540EM": 2} + "82540EM": 2, + "I217V": 1, + "I217LM": 1, + "I218V": 1, + "I218LM": 1} self.blacklist = "" - self.verify(self.nic in ["kawela_2", "niantic", "bartonhills", "82545EM", "82540EM"], + self.verify(self.nic in ["kawela_2", "niantic", "bartonhills", "82545EM", "82540EM", "I217V", "I217LM", "I218V", "I218LM"], "NIC Unsupported: " + str(self.nic)) # Based on h/w type, choose how many ports to use -- 1.9.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dts] [PATCH] Support for I217 and I218 Intel EC. 2015-01-22 16:40 ` Ravi Kerur @ 2015-01-23 9:58 ` Liu, Yong 0 siblings, 0 replies; 3+ messages in thread From: Liu, Yong @ 2015-01-23 9:58 UTC (permalink / raw) To: Ravi Kerur, dts Applied. Thanks Ravi. > -----Original Message----- > From: Ravi Kerur [mailto:rkerur@gmail.com] > Sent: Friday, January 23, 2015 12:41 AM > To: dts@dpdk.org > Cc: Liu, Yong; Qiu, Michael; Ravi Kerur > Subject: [PATCH] Support for I217 and I218 Intel EC. > > Changes include > Added PCI-ID of I217V, I217LM, I218V and I218LM into > appropriate files. > Check driver is bound before binding, it reduces error > messges in dts.log > Check driver is inserted before removing, it reduces > error messages in dts.log > Add more delay after link up operation, since I217 and > I218 takes more time than the tested NICs. > > Signed-off-by: Ravi Kerur <rkerur@gmail.com> > --- > framework/crb.py | 24 ++++++++++++++++++------ > framework/dut.py | 5 ++++- > framework/project_dpdk.py | 4 +++- > framework/settings.py | 10 +++++++++- > tests/TestSuite_ip_pipeline.py | 6 +++++- > tests/TestSuite_pmd.py | 8 ++++++-- > 6 files changed, 45 insertions(+), 12 deletions(-) > > diff --git a/framework/crb.py b/framework/crb.py > index aca62c1..d41f51b 100644 > --- a/framework/crb.py > +++ b/framework/crb.py > @@ -142,7 +142,9 @@ class Crb(object): > self.send_expect("rmmod vfio_pci", "# ", 10) > self.send_expect("rmmod vfio", "# ", 10) > else: > - self.send_expect("rmmod igb_uio", "# ", 10) > + out = self.send_expect("lsmod | grep igb_uio", "#") > + if "igb_uio" in out: > + self.send_expect("rmmod -f igb_uio", "# ", 10) > self.send_expect("modprobe igb", "# ", 20) > self.send_expect("modprobe ixgbe", "# ", 20) > self.send_expect("modprobe e1000e", "# ", 20) > @@ -151,14 +153,24 @@ class Crb(object): > > try: > for (pci_bus, pci_id) in self.pci_devices_info: > + """ > + Check if driver is already bound before binding it. > + """ > if pci_id in ('8086:10fb', '8086:151c', '8086:1528', > '8086:1512', '8086:154a'): > - self.send_expect("echo 0000:%s > > /sys/bus/pci/drivers/ixgbe/bind" % pci_bus, "# ") > + if not > os.path.exists("/sys/bus/pci/drivers/ixgbe/"+"0000:"+pci_bus): > + self.send_expect("echo -n 0000:%s > > /sys/bus/pci/drivers/ixgbe/bind" % pci_bus, "# ") > elif pci_id in ('8086:10e8', '8086:150e', '8086:1521', > '8086:10c9', '8086:1526', '8086:1533'): > - self.send_expect("echo 0000:%s > > /sys/bus/pci/drivers/igb/bind" % pci_bus, "# ") > + if not > os.path.exists("/sys/bus/pci/drivers/igb/"+"0000:"+pci_bus): > + self.send_expect("echo -n 0000:%s > > /sys/bus/pci/drivers/igb/bind" % pci_bus, "# ") > elif pci_id in('8086:10d3', '8086:10b9'): > - self.send_expect("echo 0000:%s > > /sys/bus/pci/drivers/e1000e/bind" % pci_bus, "# ") > + if not > os.path.exists("/sys/bus/pci/drivers/e1000e/"+"0000:"+pci_bus): > + self.send_expect("echo -n 0000:%s > > /sys/bus/pci/drivers/e1000e/bind" % pci_bus, "# ") > + elif pci_id in ('8086:153a', '8086:153b', '8086:155a', > '8086:1559'): > + if not > os.path.exists("/sys/bus/pci/drivers/e1000e/"+"0000:"+pci_bus): > + self.send_expect("echo -n 0000:%s > > /sys/bus/pci/drivers/e1000e/bind" % pci_bus, "# ") > elif pci_id in ('8086:100f', '8086:100e'): > - self.send_expect("echo 0000:%s > > /sys/bus/pci/drivers/e1000/bind" % pci_bus, "# ") > + if not > os.path.exists("/sys/bus/pci/drivers/e1000/"+"0000:"+pci_bus): > + self.send_expect("echo -n 0000:%s > > /sys/bus/pci/drivers/e1000/bind" % pci_bus, "# ") > elif pci_id in ('1af4:1000'): > self.send_expect("echo 0000%s > > /sys/bus/pci/drivers/virtio-pci/bind" % pci_bus, "# ") > else: > @@ -226,7 +238,7 @@ class Crb(object): > """ > Get interface name of specified pci device on linux. > """ > - command = 'ls /sys/bus/pci/devices/0000:%s:%s/net' % (bus_id, > devfun_id) > + command = 'ls --color=never /sys/bus/pci/devices/0000:%s:%s/net' % > (bus_id, devfun_id) > return self.send_expect(command, '# ') > > def get_interface_name_freebsd(self, bus_id, devfun_id): > diff --git a/framework/dut.py b/framework/dut.py > index 4def144..f901270 100644 > --- a/framework/dut.py > +++ b/framework/dut.py > @@ -420,7 +420,10 @@ class Dut(Crb): > out = self.send_expect("ip link show %s" % intf, "# ") > if "DOWN" in out: > self.send_expect("ip link set %s up" % intf, "# ") > - time.sleep(5) > + """ > + I217 and I218 requires more time to acquire V6 address. > + """ > + time.sleep(25) > > self.logger.info("DUT: [000:%s %s] %s" % (pci_bus, > pci_id, > diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py > index 6e25f1f..3577eb7 100644 > --- a/framework/project_dpdk.py > +++ b/framework/project_dpdk.py > @@ -96,7 +96,9 @@ class DPDKdut(Dut): > assert ("vfio_iommu_type1" in out), "Failed to setup vfio- > pci" > else: > self.send_expect("modprobe uio", "#", 70) > - self.send_expect("rmmod -f igb_uio", "#", 70) > + out = self.send_expect("lsmod | grep igb_uio", "#") > + if "igb_uio" in out: > + self.send_expect("rmmod -f igb_uio", "#", 70) > self.send_expect("insmod ./" + target + "/kmod/igb_uio.ko", > "#", 60) > out = self.send_expect("lsmod | grep igb_uio", "#") > assert ("igb_uio" in out), "Failed to insmod igb_uio" > diff --git a/framework/settings.py b/framework/settings.py > index 0d4ed82..2ef8db8 100644 > --- a/framework/settings.py > +++ b/framework/settings.py > @@ -50,7 +50,11 @@ NICS = { > 'springfountain': '8086:154a', > 'virtio': '1af4:1000', > 'avoton': '8086:1f41', > - 'avoton2c5': '8086:1f45' > + 'avoton2c5': '8086:1f45', > + 'I217V': '8086:153b', > + 'I217LM': '8086:153a', > + 'I218V': '8086:1559', > + 'I218LM': '8086:155a', > } > > DRIVERS = { > @@ -72,6 +76,10 @@ DRIVERS = { > 'virtio': 'igb', > 'avoton': 'igb', > 'avoton2c5': 'igb', > + 'I217V': 'igb', > + 'I217LM': 'igb', > + 'I218V': 'igb', > + 'I218LM': 'igb', > } > > """ > diff --git a/tests/TestSuite_ip_pipeline.py > b/tests/TestSuite_ip_pipeline.py > index 9c56799..7da393e 100644 > --- a/tests/TestSuite_ip_pipeline.py > +++ b/tests/TestSuite_ip_pipeline.py > @@ -292,7 +292,11 @@ class TestIPPipeline(TestCase): > """ > > # Check for port availability > - self.needed_ports = {"niantic": 2} > + self.needed_ports = {"niantic": 2, > + "I217V": 1, > + "I217LM": 1, > + "I218V": 1, > + "I218LM": 1} > self.dut_ports = self.dut.get_ports(self.nic) > self.verify(len(self.dut_ports) >= self.needed_ports[self.nic], > "Insufficient ports for speed testing") > diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py > index acd6364..b88352f 100644 > --- a/tests/TestSuite_pmd.py > +++ b/tests/TestSuite_pmd.py > @@ -96,11 +96,15 @@ class TestPmd(TestCase): > "kawela_2": 2, > "bartonhills": 4, > "82545EM": 2, > - "82540EM": 2} > + "82540EM": 2, > + "I217V": 1, > + "I217LM": 1, > + "I218V": 1, > + "I218LM": 1} > > self.blacklist = "" > > - self.verify(self.nic in ["kawela_2", "niantic", "bartonhills", > "82545EM", "82540EM"], > + self.verify(self.nic in ["kawela_2", "niantic", "bartonhills", > "82545EM", "82540EM", "I217V", "I217LM", "I218V", "I218LM"], > "NIC Unsupported: " + str(self.nic)) > > # Based on h/w type, choose how many ports to use > -- > 1.9.1 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-23 9:58 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-01-22 16:40 [dts] [PATCH] Support for I217 and I218 Intel EC Ravi Kerur 2015-01-22 16:40 ` Ravi Kerur 2015-01-23 9:58 ` Liu, Yong
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).