test suite reviews and discussions
 help / color / mirror / Atom feed
From: Weiyuan Li <weiyuanx.li@intel.com>
To: dts@dpdk.org, yuan.peng@intel.com
Cc: Weiyuan Li <weiyuanx.li@intel.com>
Subject: [dts][PATCH V1 1/2] tests/smoke_base modify ixgbe support vf jumbo verify.
Date: Mon,  9 May 2022 15:46:38 +0800	[thread overview]
Message-ID: <20220509074639.4135273-1-weiyuanx.li@intel.com> (raw)

the ixgbe NIC only supports one global MTU per physical port.
So when the user sets different MTUs on PF and VF ports in one physical port,
the real MTU for all these PF and VF ports is the largest value set.
This behavior is based on the kernel driver behavior.

So, modify script supports the verification packet sent is greater than PF MTU for ixgbe driver.

Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
 tests/smoke_base.py | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/tests/smoke_base.py b/tests/smoke_base.py
index bb49c784..4b3fe9eb 100644
--- a/tests/smoke_base.py
+++ b/tests/smoke_base.py
@@ -51,12 +51,23 @@ class SmokeTest(object):
             setattr(self, name, kwargs[name])
 
     def send_pkg_return_stats(
-        self, pkt_size=COMMON_PKT_LEN, l3_src=IPV4_SRC, l3_dst=IPV4_DST, rss=False
+        self, pkt_size=COMMON_PKT_LEN, l3_src=IPV4_SRC, l3_dst=IPV4_DST, rss=False, driver=None
     ):
         self.test_case.dut.send_expect("clear port stats all", "testpmd> ")
         l3_len = pkt_size - HEADER_SIZE["eth"]
         payload = pkt_size - HEADER_SIZE["eth"] - HEADER_SIZE["ip"]
         hash_flag = False
+        # For ixgbe, jumbo frame is not supported. MTU is determined by pf.
+        # so, testpmd max-pkt-len=9000 don't work.
+        # Although the user can set the MTU separately on PF and VF ports,
+        # the ixgbe NIC only supports one global MTU per physical port.
+        # So when the user sets different MTUs on PF and VF ports in one physical port,
+        # the real MTU for all these PF and VF ports is the largest value set.
+        # This behavior is based on the kernel driver behavior.
+        # The packet sent is greater than PF MTU 9000, the payload equal to 8083,
+        # PF received packet MTU = payload + IP, 8083 + 20 = 9001
+        if driver == 'ixgbe':
+            payload = pkt_size - HEADER_SIZE["eth"]
         if rss:
             pkt = []
             # generate PACKAGE_COUNT count package, the IP dst is random.
@@ -113,14 +124,14 @@ class SmokeTest(object):
             return queues[0], stats
         return None, stats
 
-    def check_jumbo_frames(self):
+    def check_jumbo_frames(self, kdriver=None):
         """
         The packet total size include ethernet header, ip header, and payload.
         ethernet header length is 18 bytes, ip standard header length is 20 bytes.
         The packet forwarded failed.
         """
         pkg_size = JUMBO_FRAME_LENGTH + 1
-        queues, stats = self.send_pkg_return_stats(pkg_size)
+        queues, stats = self.send_pkg_return_stats(pkg_size, driver=kdriver)
         if 1 != stats["RX-errors"] and 0 != stats["TX-packets"]:
             self.test_case.logger.info(
                 "jumbo frame: The RX[{}] or TX[{}] packet error".format(
-- 
2.18.2


             reply	other threads:[~2022-05-09  7:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09  7:46 Weiyuan Li [this message]
2022-05-09  7:46 ` [dts][PATCH V1 2/2] tests/vf_smoke " Weiyuan Li
2022-05-10  2:46   ` Chen, LingliX
2022-05-10  3:31 ` [dts][PATCH V1 1/2] tests/smoke_base " Peng, Yuan

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=20220509074639.4135273-1-weiyuanx.li@intel.com \
    --to=weiyuanx.li@intel.com \
    --cc=dts@dpdk.org \
    --cc=yuan.peng@intel.com \
    /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).