* [dts] [PATCH v1]vf_packet_rxtx: optimize test case
@ 2016-11-15 6:07 Lijuan Tu
2016-11-18 5:21 ` Liu, Yong
0 siblings, 1 reply; 4+ messages in thread
From: Lijuan Tu @ 2016-11-15 6:07 UTC (permalink / raw)
To: dts; +Cc: Lijuan Tu
Signed-off-by: Lijuan Tu <lijuanx.a.tu@intel.com>
---
tests/TestSuite_vf_packet_rxtx.py | 47 ++++++++++++++++-----------------------
1 file changed, 19 insertions(+), 28 deletions(-)
diff --git a/tests/TestSuite_vf_packet_rxtx.py b/tests/TestSuite_vf_packet_rxtx.py
index 25b03eb..62d3a3c 100644
--- a/tests/TestSuite_vf_packet_rxtx.py
+++ b/tests/TestSuite_vf_packet_rxtx.py
@@ -46,12 +46,13 @@ class TestVfPacketRxtx(TestCase):
vf0_prop = {'opt_host': self.sriov_vfs_port_0[0].pci}
vf1_prop = {'opt_host': self.sriov_vfs_port_1[0].pci}
+
if driver == 'igb_uio':
# start testpmd without the two VFs on the host
self.host_testpmd = PmdOutput(self.dut)
eal_param = '-b %(vf0)s -b %(vf1)s' % {'vf0': self.sriov_vfs_port_0[0].pci,
'vf1': self.sriov_vfs_port_1[0].pci}
- self.host_testpmd.start_testpmd("1S/2C/2T", eal_param=eal_param)
+ self.host_testpmd.start_testpmd("1S/2C/2T", "--crc-strip", eal_param=eal_param)
# set up VM0 ENV
self.vm0 = QEMUKvm(self.dut, 'vm0', 'vf_packet_rxtx')
@@ -69,9 +70,10 @@ class TestVfPacketRxtx(TestCase):
def destroy_2pf_2vf_1vm_env(self):
if getattr(self, 'vm0', None):
#destroy testpmd in vm0
- self.vm0_testpmd.execute_cmd('stop')
- self.vm0_testpmd.execute_cmd('quit', '# ')
- self.vm0_testpmd = None
+ if getattr(self, 'vm0_testpmd', None):
+ self.vm0_testpmd.execute_cmd('stop')
+ self.vm0_testpmd.execute_cmd('quit', '# ')
+ self.vm0_testpmd = None
self.vm0_dut_ports = None
#destroy vm0
self.vm0.stop()
@@ -81,13 +83,13 @@ class TestVfPacketRxtx(TestCase):
self.host_testpmd.execute_cmd('quit', '# ')
self.host_testpmd = None
- if getattr(self, 'used_dut_port_0', None):
+ if getattr(self, 'used_dut_port_0', None) != None:
self.dut.destroy_sriov_vfs_by_port(self.used_dut_port_0)
port = self.dut.ports_info[self.used_dut_port_0]['port']
port.bind_driver()
self.used_dut_port_0 = None
- if getattr(self, 'used_dut_port_1', None):
+ if getattr(self, 'used_dut_port_1', None) != None:
self.dut.destroy_sriov_vfs_by_port(self.used_dut_port_1)
port = self.dut.ports_info[self.used_dut_port_1]['port']
port.bind_driver()
@@ -110,14 +112,7 @@ class TestVfPacketRxtx(TestCase):
self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
port_id_0 = 0
self.vm0_testpmd = PmdOutput(self.vm_dut_0)
- if self.kdriver == "i40e":
- self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
- else:
- self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
- self.vm0_testpmd.execute_cmd('port stop all')
- self.vm0_testpmd.execute_cmd('port config all crc-strip on')
- self.vm0_testpmd.execute_cmd('port start all')
- self.vm0_testpmd.execute_cmd('show port info all')
+ self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
pmd_vf0_mac = self.vm0_testpmd.get_port_mac(port_id_0)
self.vm0_testpmd.execute_cmd('set fwd mac')
self.vm0_testpmd.execute_cmd('start')
@@ -199,8 +194,9 @@ class TestVfPacketRxtx(TestCase):
def destroy_3vf_2vm_env(self):
if getattr(self, 'vm0', None):
- self.vm0_testpmd.execute_cmd('stop')
- self.vm0_testpmd.execute_cmd('quit', '# ')
+ if getattr(self, 'vm0_testpmd', None):
+ self.vm0_testpmd.execute_cmd('stop')
+ self.vm0_testpmd.execute_cmd('quit', '# ')
self.vm0_testpmd = None
self.vm0_dut_ports = None
self.vm_dut_0 = None
@@ -208,19 +204,20 @@ class TestVfPacketRxtx(TestCase):
self.vm0 = None
if getattr(self, 'vm1', None):
- self.vm1_testpmd.execute_cmd('stop')
- self.vm1_testpmd.execute_cmd('quit', '# ')
+ if getattr(self, 'vm1_testpmd', None):
+ self.vm1_testpmd.execute_cmd('stop')
+ self.vm1_testpmd.execute_cmd('quit', '# ')
self.vm1_testpmd = None
self.vm1_dut_ports = None
self.vm_dut_1 = None
self.vm1.stop()
self.vm1 = None
- if getattr(self, 'host_testpmd', None):
+ if getattr(self, 'host_testpmd', None) != None:
self.host_testpmd.execute_cmd('quit', '# ')
self.host_testpmd = None
- if getattr(self, 'used_dut_port', None):
+ if getattr(self, 'used_dut_port', None) != None:
self.dut.destroy_sriov_vfs_by_port(self.used_dut_port)
port = self.dut.ports_info[self.used_dut_port]['port']
port.bind_driver()
@@ -243,10 +240,7 @@ class TestVfPacketRxtx(TestCase):
port_id_1 = 1
self.vm0_testpmd = PmdOutput(self.vm_dut_0)
- if self.kdriver == "i40e":
- self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
- else:
- self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+ self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
self.vm0_testpmd.execute_cmd('show port info all')
pmd0_vf0_mac = self.vm0_testpmd.get_port_mac(port_id_0)
self.vm0_testpmd.execute_cmd('set fwd mac')
@@ -255,10 +249,7 @@ class TestVfPacketRxtx(TestCase):
time.sleep(2)
self.vm1_testpmd = PmdOutput(self.vm_dut_1)
- if self.kdriver == "i40e":
- self.vm1_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
- else:
- self.vm1_testpmd.start_testpmd(VM_CORES_MASK)
+ self.vm1_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
self.vm1_testpmd.execute_cmd('show port info all')
tx_port = self.tester.get_local_port(self.dut_ports[0])
--
1.9.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dts] [PATCH v1]vf_packet_rxtx: optimize test case
2016-11-15 6:07 [dts] [PATCH v1]vf_packet_rxtx: optimize test case Lijuan Tu
@ 2016-11-18 5:21 ` Liu, Yong
2016-11-18 6:35 ` Tu, LijuanX A
0 siblings, 1 reply; 4+ messages in thread
From: Liu, Yong @ 2016-11-18 5:21 UTC (permalink / raw)
To: Tu, LijuanX A, dts; +Cc: Tu, LijuanX A
Lijuan, few comments.
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Lijuan Tu
> Sent: Tuesday, November 15, 2016 2:07 PM
> To: dts@dpdk.org
> Cc: Tu, LijuanX A
> Subject: [dts] [PATCH v1]vf_packet_rxtx: optimize test case
>
> Signed-off-by: Lijuan Tu <lijuanx.a.tu@intel.com>
> ---
> tests/TestSuite_vf_packet_rxtx.py | 47 ++++++++++++++++------------------
> -----
> 1 file changed, 19 insertions(+), 28 deletions(-)
>
> diff --git a/tests/TestSuite_vf_packet_rxtx.py
> b/tests/TestSuite_vf_packet_rxtx.py
> index 25b03eb..62d3a3c 100644
> --- a/tests/TestSuite_vf_packet_rxtx.py
> +++ b/tests/TestSuite_vf_packet_rxtx.py
> @@ -46,12 +46,13 @@ class TestVfPacketRxtx(TestCase):
> vf0_prop = {'opt_host': self.sriov_vfs_port_0[0].pci}
> vf1_prop = {'opt_host': self.sriov_vfs_port_1[0].pci}
>
> +
> if driver == 'igb_uio':
> # start testpmd without the two VFs on the host
> self.host_testpmd = PmdOutput(self.dut)
> eal_param = '-b %(vf0)s -b %(vf1)s' % {'vf0':
> self.sriov_vfs_port_0[0].pci,
> 'vf1':
> self.sriov_vfs_port_1[0].pci}
> - self.host_testpmd.start_testpmd("1S/2C/2T",
> eal_param=eal_param)
> + self.host_testpmd.start_testpmd("1S/2C/2T", "--crc-strip",
> eal_param=eal_param)
>
> # set up VM0 ENV
> self.vm0 = QEMUKvm(self.dut, 'vm0', 'vf_packet_rxtx')
> @@ -69,9 +70,10 @@ class TestVfPacketRxtx(TestCase):
> def destroy_2pf_2vf_1vm_env(self):
> if getattr(self, 'vm0', None):
> #destroy testpmd in vm0
> - self.vm0_testpmd.execute_cmd('stop')
> - self.vm0_testpmd.execute_cmd('quit', '# ')
> - self.vm0_testpmd = None
> + if getattr(self, 'vm0_testpmd', None):
> + self.vm0_testpmd.execute_cmd('stop')
> + self.vm0_testpmd.execute_cmd('quit', '# ')
> + self.vm0_testpmd = None
> self.vm0_dut_ports = None
> #destroy vm0
> self.vm0.stop()
> @@ -81,13 +83,13 @@ class TestVfPacketRxtx(TestCase):
> self.host_testpmd.execute_cmd('quit', '# ')
> self.host_testpmd = None
>
> - if getattr(self, 'used_dut_port_0', None):
> + if getattr(self, 'used_dut_port_0', None) != None:
Look like nothing changed, why changed it?
> self.dut.destroy_sriov_vfs_by_port(self.used_dut_port_0)
> port = self.dut.ports_info[self.used_dut_port_0]['port']
> port.bind_driver()
> self.used_dut_port_0 = None
>
> - if getattr(self, 'used_dut_port_1', None):
> + if getattr(self, 'used_dut_port_1', None) != None:
> self.dut.destroy_sriov_vfs_by_port(self.used_dut_port_1)
> port = self.dut.ports_info[self.used_dut_port_1]['port']
> port.bind_driver()
> @@ -110,14 +112,7 @@ class TestVfPacketRxtx(TestCase):
> self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
> port_id_0 = 0
> self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> - if self.kdriver == "i40e":
> - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> - else:
> - self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> - self.vm0_testpmd.execute_cmd('port stop all')
> - self.vm0_testpmd.execute_cmd('port config all crc-strip on')
> - self.vm0_testpmd.execute_cmd('port start all')
> - self.vm0_testpmd.execute_cmd('show port info all')
> + self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
Please give some comment of this change, why other NICs now support crc-strip by testpmd parameter?
> pmd_vf0_mac = self.vm0_testpmd.get_port_mac(port_id_0)
> self.vm0_testpmd.execute_cmd('set fwd mac')
> self.vm0_testpmd.execute_cmd('start')
> @@ -199,8 +194,9 @@ class TestVfPacketRxtx(TestCase):
>
> def destroy_3vf_2vm_env(self):
> if getattr(self, 'vm0', None):
> - self.vm0_testpmd.execute_cmd('stop')
> - self.vm0_testpmd.execute_cmd('quit', '# ')
> + if getattr(self, 'vm0_testpmd', None):
> + self.vm0_testpmd.execute_cmd('stop')
> + self.vm0_testpmd.execute_cmd('quit', '# ')
> self.vm0_testpmd = None
> self.vm0_dut_ports = None
> self.vm_dut_0 = None
> @@ -208,19 +204,20 @@ class TestVfPacketRxtx(TestCase):
> self.vm0 = None
>
> if getattr(self, 'vm1', None):
> - self.vm1_testpmd.execute_cmd('stop')
> - self.vm1_testpmd.execute_cmd('quit', '# ')
> + if getattr(self, 'vm1_testpmd', None):
> + self.vm1_testpmd.execute_cmd('stop')
> + self.vm1_testpmd.execute_cmd('quit', '# ')
> self.vm1_testpmd = None
> self.vm1_dut_ports = None
> self.vm_dut_1 = None
> self.vm1.stop()
> self.vm1 = None
>
> - if getattr(self, 'host_testpmd', None):
> + if getattr(self, 'host_testpmd', None) != None:
> self.host_testpmd.execute_cmd('quit', '# ')
> self.host_testpmd = None
>
> - if getattr(self, 'used_dut_port', None):
> + if getattr(self, 'used_dut_port', None) != None:
> self.dut.destroy_sriov_vfs_by_port(self.used_dut_port)
> port = self.dut.ports_info[self.used_dut_port]['port']
> port.bind_driver()
> @@ -243,10 +240,7 @@ class TestVfPacketRxtx(TestCase):
> port_id_1 = 1
>
> self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> - if self.kdriver == "i40e":
> - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> - else:
> - self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> + self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> self.vm0_testpmd.execute_cmd('show port info all')
> pmd0_vf0_mac = self.vm0_testpmd.get_port_mac(port_id_0)
> self.vm0_testpmd.execute_cmd('set fwd mac')
> @@ -255,10 +249,7 @@ class TestVfPacketRxtx(TestCase):
> time.sleep(2)
>
> self.vm1_testpmd = PmdOutput(self.vm_dut_1)
> - if self.kdriver == "i40e":
> - self.vm1_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> - else:
> - self.vm1_testpmd.start_testpmd(VM_CORES_MASK)
> + self.vm1_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> self.vm1_testpmd.execute_cmd('show port info all')
>
> tx_port = self.tester.get_local_port(self.dut_ports[0])
> --
> 1.9.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dts] [PATCH v1]vf_packet_rxtx: optimize test case
2016-11-18 5:21 ` Liu, Yong
@ 2016-11-18 6:35 ` Tu, LijuanX A
2016-11-18 8:19 ` Liu, Yong
0 siblings, 1 reply; 4+ messages in thread
From: Tu, LijuanX A @ 2016-11-18 6:35 UTC (permalink / raw)
To: Liu, Yong, dts
1, all nic should enable vf crc-strip ,not just forville, for HW not support
2, enable pf (igb_uio) crc-strip (DPDK-1755)
To make share pf & vf behavior the same
3, fix grammatical error
> -----Original Message-----
> From: Liu, Yong
> Sent: Friday, November 18, 2016 1:21 PM
> To: Tu, LijuanX A; dts@dpdk.org
> Cc: Tu, LijuanX A
> Subject: RE: [dts] [PATCH v1]vf_packet_rxtx: optimize test case
>
> Lijuan, few comments.
>
> > -----Original Message-----
> > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Lijuan Tu
> > Sent: Tuesday, November 15, 2016 2:07 PM
> > To: dts@dpdk.org
> > Cc: Tu, LijuanX A
> > Subject: [dts] [PATCH v1]vf_packet_rxtx: optimize test case
> >
> > Signed-off-by: Lijuan Tu <lijuanx.a.tu@intel.com>
> > ---
> > tests/TestSuite_vf_packet_rxtx.py | 47
> > ++++++++++++++++------------------
> > -----
> > 1 file changed, 19 insertions(+), 28 deletions(-)
> >
> > diff --git a/tests/TestSuite_vf_packet_rxtx.py
> > b/tests/TestSuite_vf_packet_rxtx.py
> > index 25b03eb..62d3a3c 100644
> > --- a/tests/TestSuite_vf_packet_rxtx.py
> > +++ b/tests/TestSuite_vf_packet_rxtx.py
> > @@ -46,12 +46,13 @@ class TestVfPacketRxtx(TestCase):
> > vf0_prop = {'opt_host': self.sriov_vfs_port_0[0].pci}
> > vf1_prop = {'opt_host': self.sriov_vfs_port_1[0].pci}
> >
> > +
> > if driver == 'igb_uio':
> > # start testpmd without the two VFs on the host
> > self.host_testpmd = PmdOutput(self.dut)
> > eal_param = '-b %(vf0)s -b %(vf1)s' % {'vf0':
> > self.sriov_vfs_port_0[0].pci,
> > 'vf1':
> > self.sriov_vfs_port_1[0].pci}
> > - self.host_testpmd.start_testpmd("1S/2C/2T",
> > eal_param=eal_param)
> > + self.host_testpmd.start_testpmd("1S/2C/2T",
> > + "--crc-strip",
> > eal_param=eal_param)
> >
> > # set up VM0 ENV
> > self.vm0 = QEMUKvm(self.dut, 'vm0', 'vf_packet_rxtx') @@
> > -69,9 +70,10 @@ class TestVfPacketRxtx(TestCase):
> > def destroy_2pf_2vf_1vm_env(self):
> > if getattr(self, 'vm0', None):
> > #destroy testpmd in vm0
> > - self.vm0_testpmd.execute_cmd('stop')
> > - self.vm0_testpmd.execute_cmd('quit', '# ')
> > - self.vm0_testpmd = None
> > + if getattr(self, 'vm0_testpmd', None):
> > + self.vm0_testpmd.execute_cmd('stop')
> > + self.vm0_testpmd.execute_cmd('quit', '# ')
> > + self.vm0_testpmd = None
> > self.vm0_dut_ports = None
> > #destroy vm0
> > self.vm0.stop()
> > @@ -81,13 +83,13 @@ class TestVfPacketRxtx(TestCase):
> > self.host_testpmd.execute_cmd('quit', '# ')
> > self.host_testpmd = None
> >
> > - if getattr(self, 'used_dut_port_0', None):
> > + if getattr(self, 'used_dut_port_0', None) != None:
> Look like nothing changed, why changed it?
[lijuan] X = getattr(self, 'used_dut_port_0', None)
Here : used_dut_port_0 == 0 ,so X == 0 ,
So judgment is False, but actual it's true, we hope it will destroy vfs.
The judgment is want to check whether used_dut_port_0 defined .if not defined ,we will not destroy vfs.
>
> > self.dut.destroy_sriov_vfs_by_port(self.used_dut_port_0)
> > port = self.dut.ports_info[self.used_dut_port_0]['port']
> > port.bind_driver()
> > self.used_dut_port_0 = None
> >
> > - if getattr(self, 'used_dut_port_1', None):
> > + if getattr(self, 'used_dut_port_1', None) != None:
> > self.dut.destroy_sriov_vfs_by_port(self.used_dut_port_1)
> > port = self.dut.ports_info[self.used_dut_port_1]['port']
> > port.bind_driver()
> > @@ -110,14 +112,7 @@ class TestVfPacketRxtx(TestCase):
> > self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
> > port_id_0 = 0
> > self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> > - if self.kdriver == "i40e":
> > - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> > - else:
> > - self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> > - self.vm0_testpmd.execute_cmd('port stop all')
> > - self.vm0_testpmd.execute_cmd('port config all crc-strip on')
> > - self.vm0_testpmd.execute_cmd('port start all')
> > - self.vm0_testpmd.execute_cmd('show port info all')
> > + self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> Please give some comment of this change, why other NICs now support crc-strip
> by testpmd parameter?
[lijuan] Nics (Niantic fortivlle sageville powerville) all can't disable crc-strip, but fortiville deal it as error , and other as warning.
Dpdk disable crc-strip as default. But how to deal with crc-strip is still in discussing.
Refer: http://dpdk.org/dev/patchwork/patch/16980/
>
> > pmd_vf0_mac = self.vm0_testpmd.get_port_mac(port_id_0)
> > self.vm0_testpmd.execute_cmd('set fwd mac')
> > self.vm0_testpmd.execute_cmd('start')
> > @@ -199,8 +194,9 @@ class TestVfPacketRxtx(TestCase):
> >
> > def destroy_3vf_2vm_env(self):
> > if getattr(self, 'vm0', None):
> > - self.vm0_testpmd.execute_cmd('stop')
> > - self.vm0_testpmd.execute_cmd('quit', '# ')
> > + if getattr(self, 'vm0_testpmd', None):
> > + self.vm0_testpmd.execute_cmd('stop')
> > + self.vm0_testpmd.execute_cmd('quit', '# ')
> > self.vm0_testpmd = None
> > self.vm0_dut_ports = None
> > self.vm_dut_0 = None
> > @@ -208,19 +204,20 @@ class TestVfPacketRxtx(TestCase):
> > self.vm0 = None
> >
> > if getattr(self, 'vm1', None):
> > - self.vm1_testpmd.execute_cmd('stop')
> > - self.vm1_testpmd.execute_cmd('quit', '# ')
> > + if getattr(self, 'vm1_testpmd', None):
> > + self.vm1_testpmd.execute_cmd('stop')
> > + self.vm1_testpmd.execute_cmd('quit', '# ')
> > self.vm1_testpmd = None
> > self.vm1_dut_ports = None
> > self.vm_dut_1 = None
> > self.vm1.stop()
> > self.vm1 = None
> >
> > - if getattr(self, 'host_testpmd', None):
> > + if getattr(self, 'host_testpmd', None) != None:
> > self.host_testpmd.execute_cmd('quit', '# ')
> > self.host_testpmd = None
> >
> > - if getattr(self, 'used_dut_port', None):
> > + if getattr(self, 'used_dut_port', None) != None:
> > self.dut.destroy_sriov_vfs_by_port(self.used_dut_port)
> > port = self.dut.ports_info[self.used_dut_port]['port']
> > port.bind_driver()
> > @@ -243,10 +240,7 @@ class TestVfPacketRxtx(TestCase):
> > port_id_1 = 1
> >
> > self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> > - if self.kdriver == "i40e":
> > - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> > - else:
> > - self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> > + self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> > self.vm0_testpmd.execute_cmd('show port info all')
> > pmd0_vf0_mac = self.vm0_testpmd.get_port_mac(port_id_0)
> > self.vm0_testpmd.execute_cmd('set fwd mac') @@ -255,10 +249,7
> > @@ class TestVfPacketRxtx(TestCase):
> > time.sleep(2)
> >
> > self.vm1_testpmd = PmdOutput(self.vm_dut_1)
> > - if self.kdriver == "i40e":
> > - self.vm1_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> > - else:
> > - self.vm1_testpmd.start_testpmd(VM_CORES_MASK)
> > + self.vm1_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> > self.vm1_testpmd.execute_cmd('show port info all')
> >
> > tx_port = self.tester.get_local_port(self.dut_ports[0])
> > --
> > 1.9.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dts] [PATCH v1]vf_packet_rxtx: optimize test case
2016-11-18 6:35 ` Tu, LijuanX A
@ 2016-11-18 8:19 ` Liu, Yong
0 siblings, 0 replies; 4+ messages in thread
From: Liu, Yong @ 2016-11-18 8:19 UTC (permalink / raw)
To: Tu, LijuanX A, dts
Thanks for clear, please add these information in git log. We can keep on tracking crc discussion.
> -----Original Message-----
> From: Tu, LijuanX A
> Sent: Friday, November 18, 2016 2:35 PM
> To: Liu, Yong; dts@dpdk.org
> Subject: RE: [dts] [PATCH v1]vf_packet_rxtx: optimize test case
>
> 1, all nic should enable vf crc-strip ,not just forville, for HW not
> support
> 2, enable pf (igb_uio) crc-strip (DPDK-1755)
> To make share pf & vf behavior the same
> 3, fix grammatical error
>
> > -----Original Message-----
> > From: Liu, Yong
> > Sent: Friday, November 18, 2016 1:21 PM
> > To: Tu, LijuanX A; dts@dpdk.org
> > Cc: Tu, LijuanX A
> > Subject: RE: [dts] [PATCH v1]vf_packet_rxtx: optimize test case
> >
> > Lijuan, few comments.
> >
> > > -----Original Message-----
> > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Lijuan Tu
> > > Sent: Tuesday, November 15, 2016 2:07 PM
> > > To: dts@dpdk.org
> > > Cc: Tu, LijuanX A
> > > Subject: [dts] [PATCH v1]vf_packet_rxtx: optimize test case
> > >
> > > Signed-off-by: Lijuan Tu <lijuanx.a.tu@intel.com>
> > > ---
> > > tests/TestSuite_vf_packet_rxtx.py | 47
> > > ++++++++++++++++------------------
> > > -----
> > > 1 file changed, 19 insertions(+), 28 deletions(-)
> > >
> > > diff --git a/tests/TestSuite_vf_packet_rxtx.py
> > > b/tests/TestSuite_vf_packet_rxtx.py
> > > index 25b03eb..62d3a3c 100644
> > > --- a/tests/TestSuite_vf_packet_rxtx.py
> > > +++ b/tests/TestSuite_vf_packet_rxtx.py
> > > @@ -46,12 +46,13 @@ class TestVfPacketRxtx(TestCase):
> > > vf0_prop = {'opt_host': self.sriov_vfs_port_0[0].pci}
> > > vf1_prop = {'opt_host': self.sriov_vfs_port_1[0].pci}
> > >
> > > +
> > > if driver == 'igb_uio':
> > > # start testpmd without the two VFs on the host
> > > self.host_testpmd = PmdOutput(self.dut)
> > > eal_param = '-b %(vf0)s -b %(vf1)s' % {'vf0':
> > > self.sriov_vfs_port_0[0].pci,
> > > 'vf1':
> > > self.sriov_vfs_port_1[0].pci}
> > > - self.host_testpmd.start_testpmd("1S/2C/2T",
> > > eal_param=eal_param)
> > > + self.host_testpmd.start_testpmd("1S/2C/2T",
> > > + "--crc-strip",
> > > eal_param=eal_param)
> > >
> > > # set up VM0 ENV
> > > self.vm0 = QEMUKvm(self.dut, 'vm0', 'vf_packet_rxtx') @@
> > > -69,9 +70,10 @@ class TestVfPacketRxtx(TestCase):
> > > def destroy_2pf_2vf_1vm_env(self):
> > > if getattr(self, 'vm0', None):
> > > #destroy testpmd in vm0
> > > - self.vm0_testpmd.execute_cmd('stop')
> > > - self.vm0_testpmd.execute_cmd('quit', '# ')
> > > - self.vm0_testpmd = None
> > > + if getattr(self, 'vm0_testpmd', None):
> > > + self.vm0_testpmd.execute_cmd('stop')
> > > + self.vm0_testpmd.execute_cmd('quit', '# ')
> > > + self.vm0_testpmd = None
> > > self.vm0_dut_ports = None
> > > #destroy vm0
> > > self.vm0.stop()
> > > @@ -81,13 +83,13 @@ class TestVfPacketRxtx(TestCase):
> > > self.host_testpmd.execute_cmd('quit', '# ')
> > > self.host_testpmd = None
> > >
> > > - if getattr(self, 'used_dut_port_0', None):
> > > + if getattr(self, 'used_dut_port_0', None) != None:
> > Look like nothing changed, why changed it?
> [lijuan] X = getattr(self, 'used_dut_port_0', None)
> Here : used_dut_port_0 == 0 ,so X == 0 ,
> So judgment is False, but actual it's true, we hope it will destroy
> vfs.
> The judgment is want to check whether used_dut_port_0 defined .if
> not defined ,we will not destroy vfs.
> >
> > > self.dut.destroy_sriov_vfs_by_port(self.used_dut_port_0)
> > > port = self.dut.ports_info[self.used_dut_port_0]['port']
> > > port.bind_driver()
> > > self.used_dut_port_0 = None
> > >
> > > - if getattr(self, 'used_dut_port_1', None):
> > > + if getattr(self, 'used_dut_port_1', None) != None:
> > > self.dut.destroy_sriov_vfs_by_port(self.used_dut_port_1)
> > > port = self.dut.ports_info[self.used_dut_port_1]['port']
> > > port.bind_driver()
> > > @@ -110,14 +112,7 @@ class TestVfPacketRxtx(TestCase):
> > > self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
> > > port_id_0 = 0
> > > self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> > > - if self.kdriver == "i40e":
> > > - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-
> strip')
> > > - else:
> > > - self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> > > - self.vm0_testpmd.execute_cmd('port stop all')
> > > - self.vm0_testpmd.execute_cmd('port config all crc-strip on')
> > > - self.vm0_testpmd.execute_cmd('port start all')
> > > - self.vm0_testpmd.execute_cmd('show port info all')
> > > + self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> > Please give some comment of this change, why other NICs now support
> crc-strip
> > by testpmd parameter?
> [lijuan] Nics (Niantic fortivlle sageville powerville) all can't disable
> crc-strip, but fortiville deal it as error , and other as warning.
> Dpdk disable crc-strip as default. But how to deal with crc-strip is still
> in discussing.
> Refer: http://dpdk.org/dev/patchwork/patch/16980/
> >
> > > pmd_vf0_mac = self.vm0_testpmd.get_port_mac(port_id_0)
> > > self.vm0_testpmd.execute_cmd('set fwd mac')
> > > self.vm0_testpmd.execute_cmd('start')
> > > @@ -199,8 +194,9 @@ class TestVfPacketRxtx(TestCase):
> > >
> > > def destroy_3vf_2vm_env(self):
> > > if getattr(self, 'vm0', None):
> > > - self.vm0_testpmd.execute_cmd('stop')
> > > - self.vm0_testpmd.execute_cmd('quit', '# ')
> > > + if getattr(self, 'vm0_testpmd', None):
> > > + self.vm0_testpmd.execute_cmd('stop')
> > > + self.vm0_testpmd.execute_cmd('quit', '# ')
> > > self.vm0_testpmd = None
> > > self.vm0_dut_ports = None
> > > self.vm_dut_0 = None
> > > @@ -208,19 +204,20 @@ class TestVfPacketRxtx(TestCase):
> > > self.vm0 = None
> > >
> > > if getattr(self, 'vm1', None):
> > > - self.vm1_testpmd.execute_cmd('stop')
> > > - self.vm1_testpmd.execute_cmd('quit', '# ')
> > > + if getattr(self, 'vm1_testpmd', None):
> > > + self.vm1_testpmd.execute_cmd('stop')
> > > + self.vm1_testpmd.execute_cmd('quit', '# ')
> > > self.vm1_testpmd = None
> > > self.vm1_dut_ports = None
> > > self.vm_dut_1 = None
> > > self.vm1.stop()
> > > self.vm1 = None
> > >
> > > - if getattr(self, 'host_testpmd', None):
> > > + if getattr(self, 'host_testpmd', None) != None:
> > > self.host_testpmd.execute_cmd('quit', '# ')
> > > self.host_testpmd = None
> > >
> > > - if getattr(self, 'used_dut_port', None):
> > > + if getattr(self, 'used_dut_port', None) != None:
> > > self.dut.destroy_sriov_vfs_by_port(self.used_dut_port)
> > > port = self.dut.ports_info[self.used_dut_port]['port']
> > > port.bind_driver()
> > > @@ -243,10 +240,7 @@ class TestVfPacketRxtx(TestCase):
> > > port_id_1 = 1
> > >
> > > self.vm0_testpmd = PmdOutput(self.vm_dut_0)
> > > - if self.kdriver == "i40e":
> > > - self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-
> strip')
> > > - else:
> > > - self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> > > + self.vm0_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> > > self.vm0_testpmd.execute_cmd('show port info all')
> > > pmd0_vf0_mac = self.vm0_testpmd.get_port_mac(port_id_0)
> > > self.vm0_testpmd.execute_cmd('set fwd mac') @@ -255,10
> +249,7
> > > @@ class TestVfPacketRxtx(TestCase):
> > > time.sleep(2)
> > >
> > > self.vm1_testpmd = PmdOutput(self.vm_dut_1)
> > > - if self.kdriver == "i40e":
> > > - self.vm1_testpmd.start_testpmd(VM_CORES_MASK, '--crc-
> strip')
> > > - else:
> > > - self.vm1_testpmd.start_testpmd(VM_CORES_MASK)
> > > + self.vm1_testpmd.start_testpmd(VM_CORES_MASK, '--crc-strip')
> > > self.vm1_testpmd.execute_cmd('show port info all')
> > >
> > > tx_port = self.tester.get_local_port(self.dut_ports[0])
> > > --
> > > 1.9.3
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-18 8:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-15 6:07 [dts] [PATCH v1]vf_packet_rxtx: optimize test case Lijuan Tu
2016-11-18 5:21 ` Liu, Yong
2016-11-18 6:35 ` Tu, LijuanX A
2016-11-18 8:19 ` 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).