diff mbox series

[V1,1/2] tests/vf_jumboframe: fix Rx bytes statistics

Message ID 20210118070924.23616-2-weix.xie@intel.com (mailing list archive)
State Superseded
Headers show
Series fix Rx bytes statistics. | expand

Commit Message

Xie, WeiX Jan. 18, 2021, 7:09 a.m. UTC
According to dpdk commit e8326d3, fix Rx bytes statistics.
After testing, found that:
when send a packet which length is 1513 bytes.
for i40e nic; the statistic from "show port stats 0" is: RX-bytes: 1513,
but before that it show "RX-bytes: 1517".

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

Patch

diff --git a/tests/TestSuite_vf_jumboframe.py b/tests/TestSuite_vf_jumboframe.py
index cb77cf31..75480f1f 100644
--- a/tests/TestSuite_vf_jumboframe.py
+++ b/tests/TestSuite_vf_jumboframe.py
@@ -192,11 +192,6 @@  class TestVfJumboFrame(TestCase):
         else:
             return None
 
-    def check_vf_driver(self):
-        output = self.vm_testpmd.execute_cmd("show port info 0")
-        vf0_driver = re.findall("Driver\s*name:\s*(\w+)", output)
-        return vf0_driver[0]
-
     def jumboframes_send_packet(self, pktsize, received=True):
         """
         Send 1 packet to portid
@@ -221,19 +216,11 @@  class TestVfJumboFrame(TestCase):
         rx_bytes -= rx_bytes_ori
         rx_err -= rx_err_ori
 
-        vf_driver = self.check_vf_driver()
-
         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:
-                if self.kdriver == "i40e":
-                    if vf_driver == "net_iavf":
-                        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")