test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [DTS][PATCH] fix tx crc issue
@ 2015-11-25  7:55 haifeng
  2015-11-25  9:18 ` Liu, Yong
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: haifeng @ 2015-11-25  7:55 UTC (permalink / raw)
  To: dts

Signed-off-by: haifeng <haifengx.tang@intel.com>
---
 tests/TestSuite_shutdown_api.py | 27 ++++++++-------------------
 1 file changed, 8 insertions(+), 19 deletions(-)

diff --git a/tests/TestSuite_shutdown_api.py b/tests/TestSuite_shutdown_api.py
index 23888f4..411e4bf 100644
--- a/tests/TestSuite_shutdown_api.py
+++ b/tests/TestSuite_shutdown_api.py
@@ -82,7 +82,7 @@ class TestShutdownApi(TestCase):
         stats = output.get_pmd_stats(portid)
         return stats
 
-    def check_forwarding(self, ports=None, pktSize=68, received=True, vlan=False, promisc=False, crcStrip=False):
+    def check_forwarding(self, ports=None, pktSize=68, received=True, vlan=False, promisc=False, crcStrip=True):
         if ports is None:
             ports = self.ports
         if len(ports) == 1:
@@ -146,25 +146,14 @@ class TestShutdownApi(TestCase):
                 # RRC will always strip rx/tx vlan
                 rx_bytes_exp -= 4
                 tx_bytes_exp -= 4
-        elif self.nic in ["fortville_eagle", "fortville_spirit",
-                        "fortville_spirit_single", "bartonhills"]:
-            # some NIC will always strip tx crc
-            tx_bytes_exp -= 4
-            if vlan is True:
-                # vlan strip default is on
-                tx_bytes_exp -= 4
-        elif self.nic in ["springville", "powerville"]:
-            if vlan is True:
-                # vlan strip default is on
-                tx_bytes_exp -= 4
         else:
-            # some NIC will always include tx crc
-            if crcStrip is True:
-                rx_bytes_exp -= 4
-            if vlan is True:
-                # vlan strip default is on
-                tx_bytes_exp -= 4
-
+             if self.nic not in ['kawela_4']:
+                 tx_bytes_exp -= 4
+                 if crcStrip is True:
+                     rx_bytes_exp -= 4
+             if vlan is True:
+                tx_bytes_exp -= 4   
+        
         if received:
             self.verify(p0tx_pkts == p1rx_pkts, "Wrong TX pkts p0_tx=%d, p1_rx=%d" % (p0tx_pkts, p1rx_pkts))
             self.verify(p1rx_bytes == rx_bytes_exp, "Wrong Rx bytes p1_rx=%d, expect=%d" % (p1rx_bytes, rx_bytes_exp))
-- 
1.9.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dts] [DTS][PATCH] fix tx crc issue
  2015-11-25  7:55 [dts] [DTS][PATCH] fix tx crc issue haifeng
@ 2015-11-25  9:18 ` Liu, Yong
  2015-11-25  9:24 ` Liu, Yong
  2015-11-25 10:36 ` Xu, HuilongX
  2 siblings, 0 replies; 7+ messages in thread
From: Liu, Yong @ 2015-11-25  9:18 UTC (permalink / raw)
  To: Tang, HaifengX, dts

Haifeng,
Your patch seem duplicated with "[dts] [PATCH] fix tx crc issue", which one is the correct one?

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of haifeng
> Sent: Wednesday, November 25, 2015 3:56 PM
> To: dts@dpdk.org
> Subject: [dts] [DTS][PATCH] fix tx crc issue
> 
> Signed-off-by: haifeng <haifengx.tang@intel.com>
> ---
>  tests/TestSuite_shutdown_api.py | 27 ++++++++-------------------
>  1 file changed, 8 insertions(+), 19 deletions(-)
> 
> diff --git a/tests/TestSuite_shutdown_api.py
> b/tests/TestSuite_shutdown_api.py
> index 23888f4..411e4bf 100644
> --- a/tests/TestSuite_shutdown_api.py
> +++ b/tests/TestSuite_shutdown_api.py
> @@ -82,7 +82,7 @@ class TestShutdownApi(TestCase):
>          stats = output.get_pmd_stats(portid)
>          return stats
> 
> -    def check_forwarding(self, ports=None, pktSize=68, received=True,
> vlan=False, promisc=False, crcStrip=False):
> +    def check_forwarding(self, ports=None, pktSize=68, received=True,
> vlan=False, promisc=False, crcStrip=True):
>          if ports is None:
>              ports = self.ports
>          if len(ports) == 1:
> @@ -146,25 +146,14 @@ class TestShutdownApi(TestCase):
>                  # RRC will always strip rx/tx vlan
>                  rx_bytes_exp -= 4
>                  tx_bytes_exp -= 4
> -        elif self.nic in ["fortville_eagle", "fortville_spirit",
> -                        "fortville_spirit_single", "bartonhills"]:
> -            # some NIC will always strip tx crc
> -            tx_bytes_exp -= 4
> -            if vlan is True:
> -                # vlan strip default is on
> -                tx_bytes_exp -= 4
> -        elif self.nic in ["springville", "powerville"]:
> -            if vlan is True:
> -                # vlan strip default is on
> -                tx_bytes_exp -= 4
>          else:
> -            # some NIC will always include tx crc
> -            if crcStrip is True:
> -                rx_bytes_exp -= 4
> -            if vlan is True:
> -                # vlan strip default is on
> -                tx_bytes_exp -= 4
> -
> +             if self.nic not in ['kawela_4']:
> +                 tx_bytes_exp -= 4
> +                 if crcStrip is True:
> +                     rx_bytes_exp -= 4
> +             if vlan is True:
> +                tx_bytes_exp -= 4
> +
>          if received:
>              self.verify(p0tx_pkts == p1rx_pkts, "Wrong TX pkts p0_tx=%d,
> p1_rx=%d" % (p0tx_pkts, p1rx_pkts))
>              self.verify(p1rx_bytes == rx_bytes_exp, "Wrong Rx bytes
> p1_rx=%d, expect=%d" % (p1rx_bytes, rx_bytes_exp))
> --
> 1.9.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dts] [DTS][PATCH] fix tx crc issue
  2015-11-25  7:55 [dts] [DTS][PATCH] fix tx crc issue haifeng
  2015-11-25  9:18 ` Liu, Yong
@ 2015-11-25  9:24 ` Liu, Yong
  2015-11-25 11:11   ` Van Haaren, Harry
  2015-11-25 10:36 ` Xu, HuilongX
  2 siblings, 1 reply; 7+ messages in thread
From: Liu, Yong @ 2015-11-25  9:24 UTC (permalink / raw)
  To: Tang, HaifengX, dts

Some comments below, thanks. 

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of haifeng
> Sent: Wednesday, November 25, 2015 3:56 PM
> To: dts@dpdk.org
> Subject: [dts] [DTS][PATCH] fix tx crc issue
> 
> Signed-off-by: haifeng <haifengx.tang@intel.com>
> ---
>  tests/TestSuite_shutdown_api.py | 27 ++++++++-------------------
>  1 file changed, 8 insertions(+), 19 deletions(-)
> 
> diff --git a/tests/TestSuite_shutdown_api.py
> b/tests/TestSuite_shutdown_api.py
> index 23888f4..411e4bf 100644
> --- a/tests/TestSuite_shutdown_api.py
> +++ b/tests/TestSuite_shutdown_api.py
> @@ -82,7 +82,7 @@ class TestShutdownApi(TestCase):
>          stats = output.get_pmd_stats(portid)
>          return stats
> 
> -    def check_forwarding(self, ports=None, pktSize=68, received=True,
> vlan=False, promisc=False, crcStrip=False):
> +    def check_forwarding(self, ports=None, pktSize=68, received=True,
> vlan=False, promisc=False, crcStrip=True):

The parameter "crcStrip" here is mean enable crc strip feature on port.
Please do not change the default for most case not enable crc strip.

If packet length not include crc all the time, this parameter will be useless.
Please remove it from function parameters. 
 
>          if ports is None:
>              ports = self.ports
>          if len(ports) == 1:
> @@ -146,25 +146,14 @@ class TestShutdownApi(TestCase):
>                  # RRC will always strip rx/tx vlan
>                  rx_bytes_exp -= 4
>                  tx_bytes_exp -= 4
> -        elif self.nic in ["fortville_eagle", "fortville_spirit",
> -                        "fortville_spirit_single", "bartonhills"]:
> -            # some NIC will always strip tx crc
> -            tx_bytes_exp -= 4
> -            if vlan is True:
> -                # vlan strip default is on
> -                tx_bytes_exp -= 4
> -        elif self.nic in ["springville", "powerville"]:
> -            if vlan is True:
> -                # vlan strip default is on
> -                tx_bytes_exp -= 4
>          else:
> -            # some NIC will always include tx crc
> -            if crcStrip is True:
> -                rx_bytes_exp -= 4
> -            if vlan is True:
> -                # vlan strip default is on
> -                tx_bytes_exp -= 4
> -

Here maybe one bug for all packet length should be the same between NICs.

> +             if self.nic not in ['kawela_4']:
> +                 tx_bytes_exp -= 4
> +                 if crcStrip is True:
> +                     rx_bytes_exp -= 4
> +             if vlan is True:
> +                tx_bytes_exp -= 4
> +
>          if received:
>              self.verify(p0tx_pkts == p1rx_pkts, "Wrong TX pkts p0_tx=%d,
> p1_rx=%d" % (p0tx_pkts, p1rx_pkts))
>              self.verify(p1rx_bytes == rx_bytes_exp, "Wrong Rx bytes
> p1_rx=%d, expect=%d" % (p1rx_bytes, rx_bytes_exp))
> --
> 1.9.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dts] [DTS][PATCH] fix tx crc issue
  2015-11-25  7:55 [dts] [DTS][PATCH] fix tx crc issue haifeng
  2015-11-25  9:18 ` Liu, Yong
  2015-11-25  9:24 ` Liu, Yong
@ 2015-11-25 10:36 ` Xu, HuilongX
  2 siblings, 0 replies; 7+ messages in thread
From: Xu, HuilongX @ 2015-11-25 10:36 UTC (permalink / raw)
  To: Tang, HaifengX, dts

Hi haifeng,
As we know, crc strip always enable, and it not need to test. Maybe we can remove count crc size when we check package size,
We can add comments in our test plan and code.
Thanks a lot 

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of haifeng
> Sent: Wednesday, November 25, 2015 3:56 PM
> To: dts@dpdk.org
> Subject: [dts] [DTS][PATCH] fix tx crc issue
> 
> Signed-off-by: haifeng <haifengx.tang@intel.com>
> ---
>  tests/TestSuite_shutdown_api.py | 27 ++++++++-------------------
>  1 file changed, 8 insertions(+), 19 deletions(-)
> 
> diff --git a/tests/TestSuite_shutdown_api.py
> b/tests/TestSuite_shutdown_api.py
> index 23888f4..411e4bf 100644
> --- a/tests/TestSuite_shutdown_api.py
> +++ b/tests/TestSuite_shutdown_api.py
> @@ -82,7 +82,7 @@ class TestShutdownApi(TestCase):
>          stats = output.get_pmd_stats(portid)
>          return stats
> 
> -    def check_forwarding(self, ports=None, pktSize=68, received=True,
> vlan=False, promisc=False, crcStrip=False):
> +    def check_forwarding(self, ports=None, pktSize=68, received=True,
> vlan=False, promisc=False, crcStrip=True):
>          if ports is None:
>              ports = self.ports
>          if len(ports) == 1:
> @@ -146,25 +146,14 @@ class TestShutdownApi(TestCase):
>                  # RRC will always strip rx/tx vlan
>                  rx_bytes_exp -= 4
>                  tx_bytes_exp -= 4
> -        elif self.nic in ["fortville_eagle", "fortville_spirit",
> -                        "fortville_spirit_single", "bartonhills"]:
> -            # some NIC will always strip tx crc
> -            tx_bytes_exp -= 4
> -            if vlan is True:
> -                # vlan strip default is on
> -                tx_bytes_exp -= 4
> -        elif self.nic in ["springville", "powerville"]:
> -            if vlan is True:
> -                # vlan strip default is on
> -                tx_bytes_exp -= 4
>          else:
> -            # some NIC will always include tx crc
> -            if crcStrip is True:
> -                rx_bytes_exp -= 4
> -            if vlan is True:
> -                # vlan strip default is on
> -                tx_bytes_exp -= 4
> -
> +             if self.nic not in ['kawela_4']:
> +                 tx_bytes_exp -= 4
> +                 if crcStrip is True:
> +                     rx_bytes_exp -= 4
> +             if vlan is True:
> +                tx_bytes_exp -= 4
> +
>          if received:
>              self.verify(p0tx_pkts == p1rx_pkts, "Wrong TX pkts p0_tx=%d,
> p1_rx=%d" % (p0tx_pkts, p1rx_pkts))
>              self.verify(p1rx_bytes == rx_bytes_exp, "Wrong Rx bytes
> p1_rx=%d, expect=%d" % (p1rx_bytes, rx_bytes_exp))
> --
> 1.9.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dts] [DTS][PATCH] fix tx crc issue
  2015-11-25  9:24 ` Liu, Yong
@ 2015-11-25 11:11   ` Van Haaren, Harry
  2015-11-26  1:26     ` Liu, Yong
  0 siblings, 1 reply; 7+ messages in thread
From: Van Haaren, Harry @ 2015-11-25 11:11 UTC (permalink / raw)
  To: Liu, Yong, Tang, HaifengX, dts

Hi All,

Recently I've removed all CRC bytes from the byte counter statistics.

This means when --crc-strip is enabled, or disabled, the byte counters
should remain the same.

These changes apply to igb, ixgbe, i40e, while fmk10k already strips CRC
bytes from its counters.

These patches were merged into dpdk.org master recently, commits
  156c5a8 e1000/igb
  c03fcee ixgbe
  0834d15 i40e


Note that VLAN stripping will still affect byte stats, same as before.


If there are any questions regarding testing the byte statistics,
feel free to ask. 

-Harry



> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Liu, Yong
> Sent: Wednesday, November 25, 2015 9:25 AM
> To: Tang, HaifengX <haifengx.tang@intel.com>; dts@dpdk.org
> Subject: Re: [dts] [DTS][PATCH] fix tx crc issue
> 
> Some comments below, thanks.
> 
> > -----Original Message-----
> > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of haifeng
> > Sent: Wednesday, November 25, 2015 3:56 PM
> > To: dts@dpdk.org
> > Subject: [dts] [DTS][PATCH] fix tx crc issue
> >
> > Signed-off-by: haifeng <haifengx.tang@intel.com>
> > ---
> >  tests/TestSuite_shutdown_api.py | 27 ++++++++-------------------
> >  1 file changed, 8 insertions(+), 19 deletions(-)
> >
> > diff --git a/tests/TestSuite_shutdown_api.py
> > b/tests/TestSuite_shutdown_api.py
> > index 23888f4..411e4bf 100644
> > --- a/tests/TestSuite_shutdown_api.py
> > +++ b/tests/TestSuite_shutdown_api.py
> > @@ -82,7 +82,7 @@ class TestShutdownApi(TestCase):
> >          stats = output.get_pmd_stats(portid)
> >          return stats
> >
> > -    def check_forwarding(self, ports=None, pktSize=68, received=True,
> > vlan=False, promisc=False, crcStrip=False):
> > +    def check_forwarding(self, ports=None, pktSize=68, received=True,
> > vlan=False, promisc=False, crcStrip=True):
> 
> The parameter "crcStrip" here is mean enable crc strip feature on port.
> Please do not change the default for most case not enable crc strip.
> 
> If packet length not include crc all the time, this parameter will be useless.
> Please remove it from function parameters.
> 
> >          if ports is None:
> >              ports = self.ports
> >          if len(ports) == 1:
> > @@ -146,25 +146,14 @@ class TestShutdownApi(TestCase):
> >                  # RRC will always strip rx/tx vlan
> >                  rx_bytes_exp -= 4
> >                  tx_bytes_exp -= 4
> > -        elif self.nic in ["fortville_eagle", "fortville_spirit",
> > -                        "fortville_spirit_single", "bartonhills"]:
> > -            # some NIC will always strip tx crc
> > -            tx_bytes_exp -= 4
> > -            if vlan is True:
> > -                # vlan strip default is on
> > -                tx_bytes_exp -= 4
> > -        elif self.nic in ["springville", "powerville"]:
> > -            if vlan is True:
> > -                # vlan strip default is on
> > -                tx_bytes_exp -= 4
> >          else:
> > -            # some NIC will always include tx crc
> > -            if crcStrip is True:
> > -                rx_bytes_exp -= 4
> > -            if vlan is True:
> > -                # vlan strip default is on
> > -                tx_bytes_exp -= 4
> > -
> 
> Here maybe one bug for all packet length should be the same between NICs.
> 
> > +             if self.nic not in ['kawela_4']:
> > +                 tx_bytes_exp -= 4
> > +                 if crcStrip is True:
> > +                     rx_bytes_exp -= 4
> > +             if vlan is True:
> > +                tx_bytes_exp -= 4
> > +
> >          if received:
> >              self.verify(p0tx_pkts == p1rx_pkts, "Wrong TX pkts p0_tx=%d,
> > p1_rx=%d" % (p0tx_pkts, p1rx_pkts))
> >              self.verify(p1rx_bytes == rx_bytes_exp, "Wrong Rx bytes
> > p1_rx=%d, expect=%d" % (p1rx_bytes, rx_bytes_exp))
> > --
> > 1.9.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dts] [DTS][PATCH] fix tx crc issue
  2015-11-25 11:11   ` Van Haaren, Harry
@ 2015-11-26  1:26     ` Liu, Yong
  2015-11-26 10:29       ` Tang, HaifengX
  0 siblings, 1 reply; 7+ messages in thread
From: Liu, Yong @ 2015-11-26  1:26 UTC (permalink / raw)
  To: Van Haaren, Harry, Tang, HaifengX, dts

Thanks for clear the message, Harry. Haifeng, please take care packet length of kawela_4. If it's different from other NICs, please submit one work request for it.

> -----Original Message-----
> From: Van Haaren, Harry
> Sent: Wednesday, November 25, 2015 7:12 PM
> To: Liu, Yong; Tang, HaifengX; dts@dpdk.org
> Subject: RE: [dts] [DTS][PATCH] fix tx crc issue
> 
> Hi All,
> 
> Recently I've removed all CRC bytes from the byte counter statistics.
> 
> This means when --crc-strip is enabled, or disabled, the byte counters
> should remain the same.
> 
> These changes apply to igb, ixgbe, i40e, while fmk10k already strips CRC
> bytes from its counters.
> 
> These patches were merged into dpdk.org master recently, commits
>   156c5a8 e1000/igb
>   c03fcee ixgbe
>   0834d15 i40e
> 
> 
> Note that VLAN stripping will still affect byte stats, same as before.
> 
> 
> If there are any questions regarding testing the byte statistics,
> feel free to ask.
> 
> -Harry
> 
> 
> 
> > -----Original Message-----
> > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Liu, Yong
> > Sent: Wednesday, November 25, 2015 9:25 AM
> > To: Tang, HaifengX <haifengx.tang@intel.com>; dts@dpdk.org
> > Subject: Re: [dts] [DTS][PATCH] fix tx crc issue
> >
> > Some comments below, thanks.
> >
> > > -----Original Message-----
> > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of haifeng
> > > Sent: Wednesday, November 25, 2015 3:56 PM
> > > To: dts@dpdk.org
> > > Subject: [dts] [DTS][PATCH] fix tx crc issue
> > >
> > > Signed-off-by: haifeng <haifengx.tang@intel.com>
> > > ---
> > >  tests/TestSuite_shutdown_api.py | 27 ++++++++-------------------
> > >  1 file changed, 8 insertions(+), 19 deletions(-)
> > >
> > > diff --git a/tests/TestSuite_shutdown_api.py
> > > b/tests/TestSuite_shutdown_api.py
> > > index 23888f4..411e4bf 100644
> > > --- a/tests/TestSuite_shutdown_api.py
> > > +++ b/tests/TestSuite_shutdown_api.py
> > > @@ -82,7 +82,7 @@ class TestShutdownApi(TestCase):
> > >          stats = output.get_pmd_stats(portid)
> > >          return stats
> > >
> > > -    def check_forwarding(self, ports=None, pktSize=68, received=True,
> > > vlan=False, promisc=False, crcStrip=False):
> > > +    def check_forwarding(self, ports=None, pktSize=68, received=True,
> > > vlan=False, promisc=False, crcStrip=True):
> >
> > The parameter "crcStrip" here is mean enable crc strip feature on port.
> > Please do not change the default for most case not enable crc strip.
> >
> > If packet length not include crc all the time, this parameter will be
> useless.
> > Please remove it from function parameters.
> >
> > >          if ports is None:
> > >              ports = self.ports
> > >          if len(ports) == 1:
> > > @@ -146,25 +146,14 @@ class TestShutdownApi(TestCase):
> > >                  # RRC will always strip rx/tx vlan
> > >                  rx_bytes_exp -= 4
> > >                  tx_bytes_exp -= 4
> > > -        elif self.nic in ["fortville_eagle", "fortville_spirit",
> > > -                        "fortville_spirit_single", "bartonhills"]:
> > > -            # some NIC will always strip tx crc
> > > -            tx_bytes_exp -= 4
> > > -            if vlan is True:
> > > -                # vlan strip default is on
> > > -                tx_bytes_exp -= 4
> > > -        elif self.nic in ["springville", "powerville"]:
> > > -            if vlan is True:
> > > -                # vlan strip default is on
> > > -                tx_bytes_exp -= 4
> > >          else:
> > > -            # some NIC will always include tx crc
> > > -            if crcStrip is True:
> > > -                rx_bytes_exp -= 4
> > > -            if vlan is True:
> > > -                # vlan strip default is on
> > > -                tx_bytes_exp -= 4
> > > -
> >
> > Here maybe one bug for all packet length should be the same between NICs.
> >
> > > +             if self.nic not in ['kawela_4']:
> > > +                 tx_bytes_exp -= 4
> > > +                 if crcStrip is True:
> > > +                     rx_bytes_exp -= 4
> > > +             if vlan is True:
> > > +                tx_bytes_exp -= 4
> > > +
> > >          if received:
> > >              self.verify(p0tx_pkts == p1rx_pkts, "Wrong TX pkts
> p0_tx=%d,
> > > p1_rx=%d" % (p0tx_pkts, p1rx_pkts))
> > >              self.verify(p1rx_bytes == rx_bytes_exp, "Wrong Rx bytes
> > > p1_rx=%d, expect=%d" % (p1rx_bytes, rx_bytes_exp))
> > > --
> > > 1.9.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dts] [DTS][PATCH] fix tx crc issue
  2015-11-26  1:26     ` Liu, Yong
@ 2015-11-26 10:29       ` Tang, HaifengX
  0 siblings, 0 replies; 7+ messages in thread
From: Tang, HaifengX @ 2015-11-26 10:29 UTC (permalink / raw)
  To: Liu, Yong, Van Haaren, Harry, dts

Yeah, I will check the nic again. thanks

-----Original Message-----
From: Liu, Yong 
Sent: Thursday, November 26, 2015 9:26 AM
To: Van Haaren, Harry; Tang, HaifengX; dts@dpdk.org
Subject: RE: [dts] [DTS][PATCH] fix tx crc issue

Thanks for clear the message, Harry. Haifeng, please take care packet length of kawela_4. If it's different from other NICs, please submit one work request for it.

> -----Original Message-----
> From: Van Haaren, Harry
> Sent: Wednesday, November 25, 2015 7:12 PM
> To: Liu, Yong; Tang, HaifengX; dts@dpdk.org
> Subject: RE: [dts] [DTS][PATCH] fix tx crc issue
> 
> Hi All,
> 
> Recently I've removed all CRC bytes from the byte counter statistics.
> 
> This means when --crc-strip is enabled, or disabled, the byte counters 
> should remain the same.
> 
> These changes apply to igb, ixgbe, i40e, while fmk10k already strips 
> CRC bytes from its counters.
> 
> These patches were merged into dpdk.org master recently, commits
>   156c5a8 e1000/igb
>   c03fcee ixgbe
>   0834d15 i40e
> 
> 
> Note that VLAN stripping will still affect byte stats, same as before.
> 
> 
> If there are any questions regarding testing the byte statistics, feel 
> free to ask.
> 
> -Harry
> 
> 
> 
> > -----Original Message-----
> > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Liu, Yong
> > Sent: Wednesday, November 25, 2015 9:25 AM
> > To: Tang, HaifengX <haifengx.tang@intel.com>; dts@dpdk.org
> > Subject: Re: [dts] [DTS][PATCH] fix tx crc issue
> >
> > Some comments below, thanks.
> >
> > > -----Original Message-----
> > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of haifeng
> > > Sent: Wednesday, November 25, 2015 3:56 PM
> > > To: dts@dpdk.org
> > > Subject: [dts] [DTS][PATCH] fix tx crc issue
> > >
> > > Signed-off-by: haifeng <haifengx.tang@intel.com>
> > > ---
> > >  tests/TestSuite_shutdown_api.py | 27 ++++++++-------------------
> > >  1 file changed, 8 insertions(+), 19 deletions(-)
> > >
> > > diff --git a/tests/TestSuite_shutdown_api.py 
> > > b/tests/TestSuite_shutdown_api.py index 23888f4..411e4bf 100644
> > > --- a/tests/TestSuite_shutdown_api.py
> > > +++ b/tests/TestSuite_shutdown_api.py
> > > @@ -82,7 +82,7 @@ class TestShutdownApi(TestCase):
> > >          stats = output.get_pmd_stats(portid)
> > >          return stats
> > >
> > > -    def check_forwarding(self, ports=None, pktSize=68, received=True,
> > > vlan=False, promisc=False, crcStrip=False):
> > > +    def check_forwarding(self, ports=None, pktSize=68, 
> > > + received=True,
> > > vlan=False, promisc=False, crcStrip=True):
> >
> > The parameter "crcStrip" here is mean enable crc strip feature on port.
> > Please do not change the default for most case not enable crc strip.
> >
> > If packet length not include crc all the time, this parameter will 
> > be
> useless.
> > Please remove it from function parameters.
> >
> > >          if ports is None:
> > >              ports = self.ports
> > >          if len(ports) == 1:
> > > @@ -146,25 +146,14 @@ class TestShutdownApi(TestCase):
> > >                  # RRC will always strip rx/tx vlan
> > >                  rx_bytes_exp -= 4
> > >                  tx_bytes_exp -= 4
> > > -        elif self.nic in ["fortville_eagle", "fortville_spirit",
> > > -                        "fortville_spirit_single", "bartonhills"]:
> > > -            # some NIC will always strip tx crc
> > > -            tx_bytes_exp -= 4
> > > -            if vlan is True:
> > > -                # vlan strip default is on
> > > -                tx_bytes_exp -= 4
> > > -        elif self.nic in ["springville", "powerville"]:
> > > -            if vlan is True:
> > > -                # vlan strip default is on
> > > -                tx_bytes_exp -= 4
> > >          else:
> > > -            # some NIC will always include tx crc
> > > -            if crcStrip is True:
> > > -                rx_bytes_exp -= 4
> > > -            if vlan is True:
> > > -                # vlan strip default is on
> > > -                tx_bytes_exp -= 4
> > > -
> >
> > Here maybe one bug for all packet length should be the same between NICs.
> >
> > > +             if self.nic not in ['kawela_4']:
> > > +                 tx_bytes_exp -= 4
> > > +                 if crcStrip is True:
> > > +                     rx_bytes_exp -= 4
> > > +             if vlan is True:
> > > +                tx_bytes_exp -= 4
> > > +
> > >          if received:
> > >              self.verify(p0tx_pkts == p1rx_pkts, "Wrong TX pkts
> p0_tx=%d,
> > > p1_rx=%d" % (p0tx_pkts, p1rx_pkts))
> > >              self.verify(p1rx_bytes == rx_bytes_exp, "Wrong Rx 
> > > bytes p1_rx=%d, expect=%d" % (p1rx_bytes, rx_bytes_exp))
> > > --
> > > 1.9.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-26 10:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-25  7:55 [dts] [DTS][PATCH] fix tx crc issue haifeng
2015-11-25  9:18 ` Liu, Yong
2015-11-25  9:24 ` Liu, Yong
2015-11-25 11:11   ` Van Haaren, Harry
2015-11-26  1:26     ` Liu, Yong
2015-11-26 10:29       ` Tang, HaifengX
2015-11-25 10:36 ` Xu, HuilongX

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).