[V1,1/2] tests/TestSuite_vf_jumboframe:Rx packet size should be equal to packet size

Message ID 20210106065233.5401-2-weix.xie@intel.com (mailing list archive)
State Changes Requested
Headers
Series DTS framework has switched i40evf to iavf, so align with it |

Commit Message

Xie, WeiX Jan. 6, 2021, 6:52 a.m. UTC
  DTS framework has switched i40evf to iavf, so align with it.
After testing, found that:
when send a packet which length is 1513 bytes.
for iavf driver; the statistic from "show port stats 0" is: RX-bytes: 1513
for i40evf driver; the statistic from "show port stats 0" is: RX-bytes: 1517

Signed-off-by: Xie wei <weix.xie@intel.com>
---
 tests/TestSuite_vf_jumboframe.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
  

Comments

Tu, Lijuan Jan. 7, 2021, 5:16 a.m. UTC | #1
> DTS framework has switched i40evf to iavf, so align with it.
> After testing, found that:
> when send a packet which length is 1513 bytes.
> for iavf driver; the statistic from "show port stats 0" is: RX-bytes: 1513 for
> i40evf driver; the statistic from "show port stats 0" is: RX-bytes: 1517
> 
> Signed-off-by: Xie wei <weix.xie@intel.com>
> ---
>  tests/TestSuite_vf_jumboframe.py | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/tests/TestSuite_vf_jumboframe.py
> b/tests/TestSuite_vf_jumboframe.py
> index 6da2c5e5..75480f1f 100644
> --- a/tests/TestSuite_vf_jumboframe.py
> +++ b/tests/TestSuite_vf_jumboframe.py
> @@ -219,10 +219,8 @@ class TestVfJumboFrame(TestCase):
>          if received:
>              self.verify((rx_pkts == 1) and (tx_pkts == 1), "Packet forward assert
> error")
> 
> -            if self.kdriver == "ixgbe" or self.kdriver == 'ice':
> +            if self.kdriver in ["ixgbe", "ice", "i40e"]:
>                  self.verify((rx_bytes + 4) == pktsize, "Rx packet size should be
> packet size - 4")
> -            else:
> -                self.verify(rx_bytes == pktsize, "Rx packet size should be equal to
> packet size")

If not matched the if condition, miss verification, so there is a gap, thanks.

> 
>              if self.kdriver == "igb":
>                  self.verify(tx_bytes == pktsize, "Tx packet size should be packet
> size")
> --
> 2.17.1
  

Patch

diff --git a/tests/TestSuite_vf_jumboframe.py b/tests/TestSuite_vf_jumboframe.py
index 6da2c5e5..75480f1f 100644
--- a/tests/TestSuite_vf_jumboframe.py
+++ b/tests/TestSuite_vf_jumboframe.py
@@ -219,10 +219,8 @@  class TestVfJumboFrame(TestCase):
         if received:
             self.verify((rx_pkts == 1) and (tx_pkts == 1), "Packet forward assert error")
 
-            if self.kdriver == "ixgbe" or self.kdriver == 'ice':
+            if self.kdriver in ["ixgbe", "ice", "i40e"]:
                 self.verify((rx_bytes + 4) == pktsize, "Rx packet size should be packet size - 4")
-            else:
-                self.verify(rx_bytes == pktsize, "Rx packet size should be equal to packet size")
 
             if self.kdriver == "igb":
                 self.verify(tx_bytes == pktsize, "Tx packet size should be packet size")