* [dts] [PATCH] enable promisc for tester's port and add fvl10g vf setting.
@ 2016-01-05 8:40 Qian Xu
2016-01-06 7:31 ` Liu, Yong
0 siblings, 1 reply; 2+ messages in thread
From: Qian Xu @ 2016-01-05 8:40 UTC (permalink / raw)
To: dts
Signed-off-by: Qian Xu <qian.q.xu@intel.com>
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dts] [PATCH] enable promisc for tester's port and add fvl10g vf setting.
2016-01-05 8:40 [dts] [PATCH] enable promisc for tester's port and add fvl10g vf setting Qian Xu
@ 2016-01-06 7:31 ` Liu, Yong
0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2016-01-06 7:31 UTC (permalink / raw)
To: Qian Xu, dts
Applied. Thanks.
On 01/05/2016 04:40 PM, Qian Xu wrote:
> Signed-off-by: Qian Xu <qian.q.xu@intel.com>
>
> 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:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-06 7:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-05 8:40 [dts] [PATCH] enable promisc for tester's port and add fvl10g vf setting Qian Xu
2016-01-06 7:31 ` 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).