test suite reviews and discussions
 help / color / mirror / Atom feed
From: Lingli Chen <linglix.chen@intel.com>
To: dts@dpdk.org
Cc: Lingli Chen <linglix.chen@intel.com>
Subject: [dts] [PATCH V1 1/2] tests/mtu_update: modify igb and igc critical values
Date: Fri, 30 Apr 2021 15:48:12 +0000	[thread overview]
Message-ID: <20210430154813.15699-2-linglix.chen@intel.com> (raw)
In-Reply-To: <20210430154813.15699-1-linglix.chen@intel.com>

According to dpdk-26436:If LPE is 1b,the maximum packet size that Foxville can receive is defined in the RLPML.RLPML register.The RLPML.RLPML register was set to MTU + 14 + 4 bytes (must consider at lease 1 VLAN tag since VLAN tag is not included in MTU).

Signed-off-by: Lingli Chen <linglix.chen@intel.com>
---
 tests/TestSuite_mtu_update.py | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/tests/TestSuite_mtu_update.py b/tests/TestSuite_mtu_update.py
index 5fa17c97..f1da8660 100644
--- a/tests/TestSuite_mtu_update.py
+++ b/tests/TestSuite_mtu_update.py
@@ -108,7 +108,7 @@ 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
-        if self.kdriver == "ixgbe":
+        if self.kdriver in ["igb", "igc", "ixgbe"]:
             max_pktlen = pktsize + ETHER_HEADER_LEN + VLAN
             padding = max_pktlen - IP_HEADER_LEN - ETHER_HEADER_LEN-VLAN
         else:
@@ -172,7 +172,7 @@ class TestMtuUpdate(TestCase):
         self.port_mask = utils.create_mask([self.rx_port, self.tx_port])
 
         self.pmdout = PmdOutput(self.dut)
-        self.set_mtu(ETHER_JUMBO_FRAME_MTU + 600)
+        self.set_mtu(ETHER_JUMBO_FRAME_MTU + 200)
 
     def set_up(self):
         """
@@ -240,10 +240,17 @@ class TestMtuUpdate(TestCase):
         self.exec("port start all")
         self.exec("set fwd mac")
         self.exec("start")
-
-        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)
+        """
+        On 1G NICs, when the jubmo frame MTU set > 1500, the software adjust it to MTU+4.
+        """
+        if self.nic in ["powerville", "springville", "foxville"] and packet_size > 1500:
+            self.send_packet_of_size_to_tx_port(packet_size + 4 - 1, received=True)
+            self.send_packet_of_size_to_tx_port(packet_size + 4, received=True)
+            self.send_packet_of_size_to_tx_port(packet_size + 4 + 1, received=False)
+        else:
+            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)
 
         self.exec("stop")
         self.pmdout.quit()
-- 
2.17.1


  parent reply	other threads:[~2021-04-30  7:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30 15:48 [dts] [PATCH V1 0/2] modify igb and igc nic pktsize Lingli Chen
2021-04-30  7:18 ` Chen, LingliX
2021-04-30 15:48 ` Lingli Chen [this message]
2021-04-30 15:48 ` [dts] [PATCH V1 2/2] tests/shutdown_api: modify igb pktSize Lingli Chen
2021-05-25  5:38 ` [dts] [PATCH V1 0/2] modify igb and igc nic pktsize Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210430154813.15699-2-linglix.chen@intel.com \
    --to=linglix.chen@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).