test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/TestSuite_mtu_update.py: modify dts to adapt ixgbe
@ 2021-02-08 10:15 Xia Yan
  2021-02-09  6:35 ` Zhao, HaiyangX
  2021-02-19  8:20 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Xia Yan @ 2021-02-08 10:15 UTC (permalink / raw)
  To: dts; +Cc: Xia Yan

modify jumbo frames and add command to adapt ixgbe

Signed-off-by: Xia Yan <yanx.xia@intel.com>
---
 tests/TestSuite_mtu_update.py | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/tests/TestSuite_mtu_update.py b/tests/TestSuite_mtu_update.py
index 239272f2..5282754e 100644
--- a/tests/TestSuite_mtu_update.py
+++ b/tests/TestSuite_mtu_update.py
@@ -108,8 +108,12 @@ class TestMtuUpdate(TestCase):
         # The packet total size include ethernet header, ip header, and payload.
         # ethernet header length is 18 bytes, ip standard header length is 20 bytes.
         # pktlen = pktsize - ETHER_HEADER_LEN
-        max_pktlen = pktsize + ETHER_HEADER_LEN + VLAN * 2
-        padding = max_pktlen - IP_HEADER_LEN - ETHER_HEADER_LEN
+        if self.kdriver == "ixgbe":
+            max_pktlen = pktsize + ETHER_HEADER_LEN + VLAN
+            padding = max_pktlen - IP_HEADER_LEN - ETHER_HEADER_LEN-VLAN
+        else:
+            max_pktlen = pktsize + ETHER_HEADER_LEN + VLAN * 2
+            padding = max_pktlen - IP_HEADER_LEN - ETHER_HEADER_LEN
         out = self.send_scapy_packet(port_id,
                                      f'Ether(dst=dutmac, src="52:00:00:00:00:00")/IP()/Raw(load="\x50"*{padding})')
         return out
@@ -226,18 +230,18 @@ class TestMtuUpdate(TestCase):
         # Mellanox will need extra options to start testpmd
             self.pmdout.start_testpmd("Default", "--max-pkt-len=9500 --tx-offloads=0x8000 --enable-scatter -a")
         else:
-            self.pmdout.start_testpmd("Default")
+            self.pmdout.start_testpmd("Default", "--tx-offload=0x00008000")
         
         self.exec("port stop all")
         self.exec(f"port config mtu 0 {packet_size:d}")
         self.exec(f"port config mtu 1 {packet_size:d}")
         self.verify(int(self.pmdout.get_detail_from_port_info("MTU: ", "\d+", 0)) == packet_size, "MTU did not update")
         self.verify(int(self.pmdout.get_detail_from_port_info("MTU: ", "\d+", 1)) == packet_size, "MTU did not update")
-
+        self.exec("port config 1 tx_offload multi_segs on")
         self.exec("port start all")
         self.exec("set fwd mac")
         self.exec("start")
-
+        time.sleep(5)
         self.send_packet_of_size_to_tx_port(packet_size - 1, received=True)
         self.send_packet_of_size_to_tx_port(packet_size, received=True)
         self.send_packet_of_size_to_tx_port(packet_size + 1, received=False)
-- 
2.17.1


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

* Re: [dts] [PATCH V1] tests/TestSuite_mtu_update.py: modify dts to adapt ixgbe
  2021-02-08 10:15 [dts] [PATCH V1] tests/TestSuite_mtu_update.py: modify dts to adapt ixgbe Xia Yan
@ 2021-02-09  6:35 ` Zhao, HaiyangX
  2021-02-19  8:20 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Zhao, HaiyangX @ 2021-02-09  6:35 UTC (permalink / raw)
  To: Xia, YanX, dts; +Cc: Xia, YanX

Acked-by: Haiyang Zhao <haiyangx.zhao@intel.com>

Best Regards,
Zhao Haiyang

> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Xia Yan
> Sent: Monday, February 8, 2021 18:16
> To: dts@dpdk.org
> Cc: Xia, YanX <yanx.xia@intel.com>
> Subject: [dts] [PATCH V1] tests/TestSuite_mtu_update.py: modify dts to
> adapt ixgbe

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

* Re: [dts] [PATCH V1] tests/TestSuite_mtu_update.py: modify dts to adapt ixgbe
  2021-02-08 10:15 [dts] [PATCH V1] tests/TestSuite_mtu_update.py: modify dts to adapt ixgbe Xia Yan
  2021-02-09  6:35 ` Zhao, HaiyangX
@ 2021-02-19  8:20 ` Tu, Lijuan
  1 sibling, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2021-02-19  8:20 UTC (permalink / raw)
  To: Xia, YanX, dts; +Cc: Xia, YanX



> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Xia Yan
> Sent: 2021年2月8日 18:16
> To: dts@dpdk.org
> Cc: Xia, YanX <yanx.xia@intel.com>
> Subject: [dts] [PATCH V1] tests/TestSuite_mtu_update.py: modify dts to adapt
> ixgbe
> 
> modify jumbo frames and add command to adapt ixgbe
> 
> Signed-off-by: Xia Yan <yanx.xia@intel.com>
> ---
>  tests/TestSuite_mtu_update.py | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/TestSuite_mtu_update.py b/tests/TestSuite_mtu_update.py
> index 239272f2..5282754e 100644
> --- a/tests/TestSuite_mtu_update.py
> +++ b/tests/TestSuite_mtu_update.py
> @@ -108,8 +108,12 @@ class TestMtuUpdate(TestCase):
>          # The packet total size include ethernet header, ip header, and payload.
>          # ethernet header length is 18 bytes, ip standard header length is 20 bytes.
>          # pktlen = pktsize - ETHER_HEADER_LEN
> -        max_pktlen = pktsize + ETHER_HEADER_LEN + VLAN * 2
> -        padding = max_pktlen - IP_HEADER_LEN - ETHER_HEADER_LEN
> +        if self.kdriver == "ixgbe":
> +            max_pktlen = pktsize + ETHER_HEADER_LEN + VLAN
> +            padding = max_pktlen - IP_HEADER_LEN - ETHER_HEADER_LEN-VLAN
> +        else:
> +            max_pktlen = pktsize + ETHER_HEADER_LEN + VLAN * 2
> +            padding = max_pktlen - IP_HEADER_LEN - ETHER_HEADER_LEN
>          out = self.send_scapy_packet(port_id,
>                                       f'Ether(dst=dutmac,
> src="52:00:00:00:00:00")/IP()/Raw(load="\x50"*{padding})')
>          return out
> @@ -226,18 +230,18 @@ class TestMtuUpdate(TestCase):
>          # Mellanox will need extra options to start testpmd
>              self.pmdout.start_testpmd("Default", "--max-pkt-len=9500 --tx-
> offloads=0x8000 --enable-scatter -a")
>          else:
> -            self.pmdout.start_testpmd("Default")
> +            self.pmdout.start_testpmd("Default",
> + "--tx-offload=0x00008000")

Why enable DEV_TX_OFFLOAD_MULTI_SEGS ?

> 
>          self.exec("port stop all")
>          self.exec(f"port config mtu 0 {packet_size:d}")
>          self.exec(f"port config mtu 1 {packet_size:d}")
>          self.verify(int(self.pmdout.get_detail_from_port_info("MTU: ", "\d+", 0))
> == packet_size, "MTU did not update")
>          self.verify(int(self.pmdout.get_detail_from_port_info("MTU: ", "\d+", 1))
> == packet_size, "MTU did not update")
> -
> +        self.exec("port config 1 tx_offload multi_segs on")
>          self.exec("port start all")
>          self.exec("set fwd mac")
>          self.exec("start")
> -
> +        time.sleep(5)
>          self.send_packet_of_size_to_tx_port(packet_size - 1, received=True)
>          self.send_packet_of_size_to_tx_port(packet_size, received=True)
>          self.send_packet_of_size_to_tx_port(packet_size + 1, received=False)
> --
> 2.17.1


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

end of thread, other threads:[~2021-02-19  8:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08 10:15 [dts] [PATCH V1] tests/TestSuite_mtu_update.py: modify dts to adapt ixgbe Xia Yan
2021-02-09  6:35 ` Zhao, HaiyangX
2021-02-19  8:20 ` Tu, Lijuan

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