From patchwork Mon Apr 17 17:41:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 126170 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2BC984296C; Mon, 17 Apr 2023 11:24:25 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27CFE42B8C; Mon, 17 Apr 2023 11:24:25 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 6FABE40144 for ; Mon, 17 Apr 2023 11:24:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681723463; x=1713259463; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=spC9K2FevmmpO5rhqR6QJFIOwUtaTA6bc002UCbwxjs=; b=BiRnsX5DFSWE1jUlpb9ADHHUvo/+5UJhj6v4UWVLUuh9O5YMzN2fiiGf 8XL3gzYbYcVSrH8Qgcbm51XBZcecnOxeZyzutFuxFlJvH72nDzTq3KnBB l6tgbLdFQf4In88SyBabDAfsVJ6RQ8+/2DX680dC33DbB5gw0qwaICoGq 05Jr0+HuF69CSuK4/LR86bxLCKXYiJ74D1lZ8yeMOOCaQ0KOpiaoXENRr D2/xuTn384n45zF2y4x78pWJlqmz9JpSCP9ryXwMd+wGpgjEqRnF97bdQ buLIOswT+CjH9rQANw1QakjSbThOSaWsjymp2egySSozEPhMFgU4cr+JN w==; X-IronPort-AV: E=McAfee;i="6600,9927,10682"; a="333642302" X-IronPort-AV: E=Sophos;i="5.99,203,1677571200"; d="scan'208";a="333642302" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Apr 2023 02:24:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10682"; a="640897825" X-IronPort-AV: E=Sophos;i="5.99,203,1677571200"; d="scan'208";a="640897825" Received: from unknown (HELO localhost.localdomain) ([10.239.252.96]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Apr 2023 02:24:21 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Subject: [dts] [PATCH V1 2/4] tests/kernelpf_iavf: add testing steps to test vlan priority value Date: Mon, 17 Apr 2023 17:41:53 +0000 Message-Id: <20230417174155.146540-3-songx.jiale@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230417174155.146540-1-songx.jiale@intel.com> References: <20230417174155.146540-1-songx.jiale@intel.com> MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org 1. add testing steps to test vlan priority value. 2. modify test scripts to support i40e nic. Signed-off-by: Jiale Song --- tests/TestSuite_kernelpf_iavf.py | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py index 6b6c573c..c69b8748 100644 --- a/tests/TestSuite_kernelpf_iavf.py +++ b/tests/TestSuite_kernelpf_iavf.py @@ -128,10 +128,9 @@ class TestKernelpfIavf(TestCase): self.verify(res, "%s link status is down" % self.host_intf) out = self.dut.send_expect("ethtool %s" % self.host_intf, "#") self.speed = int(re.findall("Speed: (\d*)", out)[0]) // 1000 - if self.is_eth_series_nic(800): - self.dut.send_expect( - "ip link set %s vf 0 spoofchk off" % (self.host_intf), "# " - ) + self.dut.send_expect( + "ip link set %s vf 0 spoofchk off" % (self.host_intf), "# " + ) if self.running_case == "test_vf_multicast": self.dut.send_expect( "ethtool --set-priv-flags %s vf-true-promisc-support on" @@ -849,14 +848,13 @@ class TestKernelpfIavf(TestCase): packets = len(re.findall("received 1 packets", out)) self.verify(packets == 10, "Not receive expected packet") - @check_supported_nic(ice_nic) def test_iavf_dual_vlan_filter(self): """ Test case: IAVF DUAL VLAN filtering """ self.skip_case(not self.dcf_mode, "the case not support dcf mode") pkt_list1 = [ - 'Ether(dst="%s",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="196.222.232.221")/("X"*480)' + 'Ether(dst="%s",type=0x8100)/Dot1Q(vlan=1,type=0x8100,prio=1)/Dot1Q(vlan=2,type=0x0800,prio=2)/IP(src="196.222.232.221")/("X"*480)' % self.vf_mac, 'Ether(dst="%s",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="196.222.232.221")/("X"*480)' % self.vf_mac, @@ -888,8 +886,16 @@ class TestKernelpfIavf(TestCase): tcpdump_out = self.get_tcpdump_package() receive_pkt = re.findall("dst=%s" % self.vf_mac, out) self.verify(len(receive_pkt) == 2, "Failed error received vlan packet!") - tester_pkt = re.findall("vlan \d+", tcpdump_out) - self.verify(len(tester_pkt) == 6, "Failed pass received vlan packet!") + tester_pkt = re.findall("vlan\s+\d+, p\s+\d+", tcpdump_out) + vlan_prio_1 = re.findall("vlan\s+\d+, p\s+1", tcpdump_out) + vlan_prio_2 = re.findall("vlan\s+\d+, p\s+2", tcpdump_out) + self.verify(len(tester_pkt) == 6, "Received incorrect vlan packet!") + self.verify( + len(vlan_prio_1) == 2, "Received incorrect priority 1 vlan packet!!" + ) + self.verify( + len(vlan_prio_2) == 2, "Received incorrect priority 2 vlan packet!!!" + ) out = self.send_pkts_getouput(self.tester_intf, pkt_list2) receive_pkt = re.findall("dst=%s" % self.vf_mac, out) @@ -903,7 +909,6 @@ class TestKernelpfIavf(TestCase): else: self.verify(len(receive_pkt) == 2, "Failed error received vlan packet!") - @check_supported_nic(ice_nic) def test_iavf_dual_vlan_strip(self): """ Test case: IAVF DUAL VLAN header stripping @@ -1047,7 +1052,6 @@ class TestKernelpfIavf(TestCase): return [] return value_list - @check_supported_nic(ice_nic) def test_iavf_dual_vlan_insert(self): """ Test case: IAVF DUAL VLAN header insertion