From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 798999418 for ; Wed, 6 Jan 2016 08:33:50 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 05 Jan 2016 23:33:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,528,1444719600"; d="scan'208";a="884691462" Received: from stv-crb-56.sh.intel.com (HELO [10.239.128.116]) ([10.239.128.116]) by orsmga002.jf.intel.com with ESMTP; 05 Jan 2016 23:33:48 -0800 Message-ID: <568CC2DA.6040009@intel.com> Date: Wed, 06 Jan 2016 15:31:38 +0800 From: "Liu, Yong" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Qian Xu , "dts@dpdk.org" References: <1451983246-13663-1-git-send-email-qian.q.xu@intel.com> In-Reply-To: <1451983246-13663-1-git-send-email-qian.q.xu@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dts] [PATCH] enable promisc for tester's port and add fvl10g vf setting. 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: Wed, 06 Jan 2016 07:33:50 -0000 Applied. Thanks. On 01/05/2016 04:40 PM, Qian Xu wrote: > Signed-off-by: Qian Xu > > Add set_promisc for tester's ports since in virtualization case, we need check the received packets at the tester's port, need enable promisc mode first to catch all the packets. > For FVL10g vf automation case, we add fvl10g driver settings:device id and driver name. > > > diff --git a/framework/crb.py b/framework/crb.py > index 525d6a1..a3a7bba 100644 > --- a/framework/crb.py > +++ b/framework/crb.py > @@ -697,3 +697,7 @@ class Crb(object): > for port_info in self.ports_info: > if port_info['pci'] == pci: > return port_info > + > + def enable_promisc(self,intf): > + if intf !='N/A': > + self.send_expect("ifconfig %s promisc" %intf, "# ",alt_session=True) > diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py > index 538a3b7..597982f 100644 > --- a/framework/project_dpdk.py > +++ b/framework/project_dpdk.py > @@ -382,6 +382,7 @@ class DPDKtester(Tester): > > self.tester_prerequisites() > > + self.set_promisc() > # use software pktgen for performance test > if perf_test is True: > try: > diff --git a/framework/settings.py b/framework/settings.py > index 0b658f2..02759f7 100644 > --- a/framework/settings.py > +++ b/framework/settings.py > @@ -76,6 +76,7 @@ NICS = { > 'fortville_spirit_single': '8086:1584', > 'redrockcanyou': '8086:15a4', > 'fortpark':'8086:374c', > + 'fvl10g_vf':'8086:154c' > } > > DRIVERS = { > @@ -107,6 +108,7 @@ DRIVERS = { > 'fortville_spirit': 'i40e', > 'fortville_spirit_single': 'i40e', > 'redrockcanyou': 'fm10k', > + 'fvl10g_vf':'i40evf' > } > > """ > diff --git a/framework/tester.py b/framework/tester.py > index 210d54f..08a3c75 100644 > --- a/framework/tester.py > +++ b/framework/tester.py > @@ -211,6 +211,17 @@ class Tester(Crb): > > sleep(2) > > + def set_promisc(self): > + try: > + for (pci_bus, pci_id) in self.pci_devices_info: > + addr_array = pci_bus.split(':') > + port = NetDevice(self, addr_array[0], addr_array[1]) > + itf = port.get_interface_name() > + self.enable_promisc(itf) > + except Exception as e: > + pass > + > + > def load_serializer_ports(self): > cached_ports_info = self.serializer.load(self.PORT_INFO_CACHE_KEY) > if cached_ports_info is None: