From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id E88105AE3 for ; Fri, 23 Jan 2015 10:58:16 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 23 Jan 2015 01:55:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="444113053" Received: from kmsmsx151.gar.corp.intel.com ([172.21.73.86]) by FMSMGA003.fm.intel.com with ESMTP; 23 Jan 2015 01:44:48 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by KMSMSX151.gar.corp.intel.com (172.21.73.86) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 23 Jan 2015 17:58:13 +0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.192]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.231]) with mapi id 14.03.0195.001; Fri, 23 Jan 2015 17:58:11 +0800 From: "Liu, Yong" To: Ravi Kerur , "dts@dpdk.org" Thread-Topic: [PATCH] Support for I217 and I218 Intel EC. Thread-Index: AQHQNmI5f/Sj5IkZd0qenhd46HjXAJzNeVmg Date: Fri, 23 Jan 2015 09:58:10 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E10D52E6B@SHSMSX103.ccr.corp.intel.com> References: <1421944856-4590-1-git-send-email-rkerur@gmail.com> <1421944856-4590-2-git-send-email-rkerur@gmail.com> In-Reply-To: <1421944856-4590-2-git-send-email-rkerur@gmail.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH] Support for I217 and I218 Intel EC. X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 09:58:17 -0000 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. >=20 > 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. >=20 > Signed-off-by: Ravi Kerur > --- > 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(-) >=20 > 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 =3D 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): >=20 > 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 =3D 'ls /sys/bus/pci/devices/0000:%s:%s/net' % (bus_id, > devfun_id) > + command =3D 'ls --color=3Dnever /sys/bus/pci/devices/0000:%s:%s/= net' % > (bus_id, devfun_id) > return self.send_expect(command, '# ') >=20 > 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 =3D 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) >=20 > 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 =3D 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 =3D 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 =3D { > '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', > } >=20 > DRIVERS =3D { > @@ -72,6 +76,10 @@ DRIVERS =3D { > 'virtio': 'igb', > 'avoton': 'igb', > 'avoton2c5': 'igb', > + 'I217V': 'igb', > + 'I217LM': 'igb', > + 'I218V': 'igb', > + 'I218LM': 'igb', > } >=20 > """ > 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): > """ >=20 > # Check for port availability > - self.needed_ports =3D {"niantic": 2} > + self.needed_ports =3D {"niantic": 2, > + "I217V": 1, > + "I217LM": 1, > + "I218V": 1, > + "I218LM": 1} > self.dut_ports =3D self.dut.get_ports(self.nic) > self.verify(len(self.dut_ports) >=3D 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} >=20 > self.blacklist =3D "" >=20 > - 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)) >=20 > # Based on h/w type, choose how many ports to use > -- > 1.9.1