From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 5CF199247 for ; Tue, 5 Jan 2016 09:40:56 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 05 Jan 2016 00:40:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,524,1444719600"; d="scan'208";a="874816195" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 05 Jan 2016 00:40:55 -0800 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u058eo08011983; Tue, 5 Jan 2016 16:40:50 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u058em94013699; Tue, 5 Jan 2016 16:40:50 +0800 Received: (from qxu10@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u058emSp013695; Tue, 5 Jan 2016 16:40:48 +0800 From: Qian Xu To: dts@dpdk.org Date: Tue, 5 Jan 2016 16:40:46 +0800 Message-Id: <1451983246-13663-1-git-send-email-qian.q.xu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [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: Tue, 05 Jan 2016 08:40:56 -0000 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: -- 2.1.0