test suite reviews and discussions
 help / color / mirror / Atom feed
From: Zhimin Huang <zhiminx.huang@intel.com>
To: dts@dpdk.org
Cc: Zhimin Huang <zhiminx.huang@intel.com>
Subject: [dts][PATCH V1] kernelpf_iavf: add driver version check to adapt to dpdk changes
Date: Thu,  9 Feb 2023 18:35:49 +0000	[thread overview]
Message-ID: <20230209183549.367681-1-zhiminx.huang@intel.com> (raw)

according to dpdk commit d048a0aaae27809523969904c2f7b71fe3cc1bb6,
the ice driver version newer than 1.8.9 not support insert correct vlan
tag in avx512.
add driver version check in test script, newer than 1.8.9 will skip in test.

Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 test_plans/kernelpf_iavf_test_plan.rst |  5 ++++
 tests/TestSuite_kernelpf_iavf.py       | 34 +++++++++++++++++++++++++-
 2 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/test_plans/kernelpf_iavf_test_plan.rst b/test_plans/kernelpf_iavf_test_plan.rst
index 5b91d38b..df98b65f 100644
--- a/test_plans/kernelpf_iavf_test_plan.rst
+++ b/test_plans/kernelpf_iavf_test_plan.rst
@@ -522,6 +522,11 @@ Test case: IAVF DUAL VLAN header stripping
 Test case: IAVF DUAL VLAN header insertion
 ==========================================
 
+..note::
+
+   according to dpdk commit d048a0aaae27809523969904c2f7b71fe3cc1bb6,
+   when the ice driver version newer than 1.8.9, avx512 tx path not support insert correct vlag tag(outer of QinQ)
+
 1. enable vlan filtering on port VF::
 
     testpmd> vlan set filter on 0
diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py
index 5e955feb..66c9094e 100644
--- a/tests/TestSuite_kernelpf_iavf.py
+++ b/tests/TestSuite_kernelpf_iavf.py
@@ -16,7 +16,11 @@ import time
 import framework.utils as utils
 from framework.packet import Packet
 from framework.pmd_output import PmdOutput
-from framework.settings import DPDK_DCFMODE_SETTING, load_global_setting
+from framework.settings import (
+    DPDK_DCFMODE_SETTING,
+    DPDK_RXMODE_SETTING,
+    load_global_setting,
+)
 from framework.test_case import TestCase, check_supported_nic
 from framework.utils import RED
 from framework.virt_common import VM
@@ -81,6 +85,7 @@ class TestKernelpfIavf(TestCase):
         self.flag = "vf-vlan-pruning"
         self.default_stats = self.dut.get_priv_flags_state(self.host_intf, self.flag)
         self.dcf_mode = load_global_setting(DPDK_DCFMODE_SETTING)
+        self.rx_mode = load_global_setting(DPDK_RXMODE_SETTING)
 
     def set_up(self):
 
@@ -1016,12 +1021,39 @@ class TestKernelpfIavf(TestCase):
                     "port {} should not received a packets".format(port_id),
                 )
 
+    def convert_driver_version_value(self, check_version):
+        """
+        convert the driver version to int list
+        take the first three values in the list for comparison and limit intree driver
+        for example:
+            6.0.7-060007-generic: [6, 0, 7-060007-generic]
+            1.11.0_rc59: [1, 11, 0]
+            1.11.11: [1, 11, 11]
+        """
+        try:
+            value_list = list(map(int, re.split(r"[.|_]", check_version)[:3]))
+        except ValueError as e:
+            self.logger.warning(e)
+            # the intree-driver has character, so set the return value is null list as the lowest driver version
+            return []
+        return value_list
+
     @check_supported_nic(ice_nic)
     def test_iavf_dual_vlan_insert(self):
         """
         Test case: IAVF DUAL VLAN header insertion
         """
+
+        """
+        according to dpdk commit d048a0aaae27809523969904c2f7b71fe3cc1bb6,
+        when the ice driver version newer than 1.8.9, avx512 tx path not support
+        insert correct vlag tag(outer of QinQ)
+        """
         self.skip_case(not self.dcf_mode, "the case not support this dcf mode")
+        if self.rx_mode == "avx512" and self.convert_driver_version_value(
+            self.driver_version
+        ) > self.convert_driver_version_value("1.8.9"):
+            self.skip_case(False, "avx512 tx path not support insert correct vlan tag")
         out_vlan = 1
         pkt_list = [
             'Ether(dst="%s",type=0x0800)/IP(src="196.222.232.221")/("X"*480)'
-- 
2.25.1


             reply	other threads:[~2023-02-09 10:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-09 18:35 Zhimin Huang [this message]
2023-03-07  5:47 ` lijuan.tu

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=20230209183549.367681-1-zhiminx.huang@intel.com \
    --to=zhiminx.huang@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).