From patchwork Fri May 20 05:46:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 111481 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 3D49CA0505; Fri, 20 May 2022 07:46:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 37FBF42B79; Fri, 20 May 2022 07:46:20 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 9763140156 for ; Fri, 20 May 2022 07:46:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653025578; x=1684561578; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4B5DH/cSs3y2U1lmuVx6mY1CNV+bunJe7lFPwtStqkw=; b=fFUDfW3SFeeDdK3pszL2c1wuoyyOxGIsvI9TdSQ0EzI7sxpI3F7xmJRj 86h/2rfDC0TReRrovtQpjUG1lJs/E6taWemyWiCR6EszYrFnFxqQt+2k7 3ZP7NwX97U/FdjxFtzLW6tble0Di/GXnaOrBXIdh/Yj6o0LwQQeJbLDug z9nIgWNDiieCLJOiby7oyJj7YcW5ZfSnCDpkvctaQbbufx3Zamjeloprn AsVihVGN796si22R0GJ9INHeJx/WtEBsZ7SBjrKJETHaSYJkMiE/VJ0BR xrQ2kJUwBuA790ZRoylEnp9NphEEv2aIolh/qZgoMus26+BYaFr+NAjcv w==; X-IronPort-AV: E=McAfee;i="6400,9594,10352"; a="272203116" X-IronPort-AV: E=Sophos;i="5.91,238,1647327600"; d="scan'208";a="272203116" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2022 22:46:18 -0700 X-IronPort-AV: E=Sophos;i="5.91,238,1647327600"; d="scan'208";a="546510860" Received: from unknown (HELO daily-regression-131.intel.com) ([10.239.251.131]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2022 22:46:17 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Subject: [dts] [PATCH V1 6/8] tests/ice_fdir: remove or replace ip fragment packets Date: Fri, 20 May 2022 13:46:03 +0800 Message-Id: <20220520054605.1856551-6-songx.jiale@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220520054605.1856551-1-songx.jiale@intel.com> References: <20220520054605.1856551-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 Signed-off-by: Jiale Song --- test_plans/ice_fdir_test_plan.rst | 23 +++++++++++------------ tests/TestSuite_ice_fdir.py | 27 +++++++++++++-------------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/test_plans/ice_fdir_test_plan.rst b/test_plans/ice_fdir_test_plan.rst index 906b3527..0bf5352c 100644 --- a/test_plans/ice_fdir_test_plan.rst +++ b/test_plans/ice_fdir_test_plan.rst @@ -210,7 +210,6 @@ Send packets matched packets:: sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=255, ttl=2, tos=4) / Raw('x' * 80)],iface="enp175s0f0") - sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=1, proto=255, ttl=2, tos=4)/Raw('x' * 80)],iface="enp175s0f0") unmatched packets:: @@ -819,11 +818,11 @@ Subcase 7: MAC_IPV4_PAY protocal 2. send matched packets:: pkt1 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=1) / Raw('x' * 80) - pkt2 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=1, proto=1) / Raw('x' * 80) + pkt2 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.19",dst="192.168.0.21", proto=1)/Raw('x' * 80) pkt3 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", ttl=2, tos=4) /UDP(sport=22,dport=23)/Raw('x' * 80) - pkt4 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=1, ttl=2, tos=4) /UDP(sport=22,dport=23)/Raw('x' * 80) + pkt4 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=17)/TCP(sport=22, dport=23)/Raw('x' * 80) pkt5 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=17, ttl=2, tos=4)/Raw('x' * 80) - pkt6 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=1, proto=17, ttl=2, tos=4)/Raw('x' * 80) + pkt6 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=17, ttl=2, tos=4)/UDP(sport=22,dport=23)/TCP(sport=22, dport=23)/Raw('x' * 80) check the pkt1 and pkt2 are redirected to queue 1 with FDIR matched ID=0x1. check the pkt3-pkt6 are distributed by RSS with FDIR matched ID=0x3. @@ -832,7 +831,7 @@ Subcase 7: MAC_IPV4_PAY protocal pkt7 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.22", proto=1) / Raw('x' * 80) pkt8 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=6) / Raw('x' * 80) pkt9 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/TCP(sport=22,dport=23)/ Raw('x' * 80) - pkt10 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=1)/TCP(sport=22,dport=23)/ Raw('x' * 80) + pkt10 = Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/TCP(sport=22,dport=23)/UDP(sport=22,dport=23)/Raw('x' * 80) check the packets received are distributed by RSS without FDIR matched ID. @@ -1055,15 +1054,15 @@ Subcase 7: MAC_IPV6_PAY protocal 1. create filter rules:: - flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 44 / end actions rss queues 5 6 end / mark id 1 / end + flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 17 / end actions rss queues 5 6 end / mark id 1 / end flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 6 / end actions mark id 2 / rss / end 2. send matched packets:: - pkt1 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010", nh=44, tc=1, hlim=2)/("X"*480) - pkt2 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010")/IPv6ExtHdrFragment(b'1000')/("X"*480) - pkt3 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010", nh=44)/TCP(sport=22,dport=23)/("X"*480) - pkt4 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010")/IPv6ExtHdrFragment(b'1000')/TCP(sport=22,dport=23)/("X"*480) + pkt1 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010", nh=17, tc=1, hlim=2)/("X"*480) + pkt2 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=17)/("X"*480) + pkt3 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010", nh=17)/TCP(sport=22,dport=23)/("X"*480) + pkt4 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", tc=1, hlim=2)/UDP(sport=22,dport=23)/TCP(sport=22,dport=23)/("X"*480) pkt5 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/("X"*480) pkt6 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*480) @@ -1071,8 +1070,8 @@ Subcase 7: MAC_IPV6_PAY protocal check pkt5 and pkt6 are distributed by RSS with FDIR matched ID=0x2. send unmatched packets:: - pkt8 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480) - pkt9 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=17)/("X"*480) + pkt8 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2021", nh=17)/("X"*480) + pkt9 = Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=1)/("X"*480) check the packets are distributed by RSS have not FDIR matched ID. diff --git a/tests/TestSuite_ice_fdir.py b/tests/TestSuite_ice_fdir.py index 7b642f70..ca1abd21 100644 --- a/tests/TestSuite_ice_fdir.py +++ b/tests/TestSuite_ice_fdir.py @@ -45,7 +45,6 @@ from framework.utils import GREEN, RED MAC_IPV4_PAY = { "match": [ 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=255, ttl=2, tos=4) / Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=1, proto=255, ttl=2, tos=4)/Raw("x" * 80)', ], "unmatched": [ 'Ether(dst="00:11:22:33:44:56")/IP(src="192.168.0.20",dst="192.168.0.22", proto=255, ttl=2, tos=4) / Raw("x" * 80)', @@ -3149,11 +3148,11 @@ class TestICEFdir(TestCase): ] rule_li = self.create_fdir_rule(rules, check_stats=True) pkt1 = 'Ether(dst="00:11:22:33:44:55") / IP(src="192.168.0.20", dst="192.168.0.21", proto=1) / Raw("x" * 80)' - pkt2 = 'Ether(dst="00:11:22:33:44:55") / IP(src="192.168.0.20", dst="192.168.0.21", frag=1, proto=1) / Raw("x" * 80)' + pkt2 = 'Ether(dst="00:11:22:33:44:55") / IP(src="192.168.0.19", dst="192.168.0.21", proto=1)/Raw("x" * 80)' pkt3 = 'Ether(dst="00:11:22:33:44:55") / IP(src="192.168.0.20", dst="192.168.0.21", ttl=2, tos=4) / UDP(sport=22, dport=23) / Raw("x" * 80)' - pkt4 = 'Ether(dst="00:11:22:33:44:55") / IP(src="192.168.0.20", dst="192.168.0.21", frag=1, ttl=2, tos=4) / UDP(sport=22, dport=23) / Raw("x" * 80)' + pkt4 = 'Ether(dst="00:11:22:33:44:55") / IP(src="192.168.0.20", dst="192.168.0.21", proto=17)/TCP(sport=22, dport=23)/Raw("x" * 80)' pkt5 = 'Ether(dst="00:11:22:33:44:55") / IP(src="192.168.0.20", dst="192.168.0.21", proto=17, ttl=2, tos=4) / Raw("x" * 80)' - pkt6 = 'Ether(dst="00:11:22:33:44:55") / IP(src="192.168.0.20", dst="192.168.0.21", frag=1, proto=17, ttl=2, tos=4) / Raw("x" * 80)' + pkt6 = 'Ether(dst="00:11:22:33:44:55") / IP(src="192.168.0.19", dst="192.168.0.21", proto=17, ttl=2, tos=4)/UDP(sport=22,dport=23)/TCP(sport=22, dport=23)/Raw("x" * 80)' out = self.send_pkts_getouput([pkt1, pkt2]) port_id = 0 @@ -3190,7 +3189,7 @@ class TestICEFdir(TestCase): pkt7 = 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.22", proto=1) / Raw("x" * 80)' pkt8 = 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=6) / Raw("x" * 80)' pkt9 = 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/TCP(sport=22,dport=23)/ Raw("x" * 80)' - pkt10 = 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=1)/TCP(sport=22,dport=23)/ Raw("x" * 80)' + pkt10 = 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/TCP(sport=22,dport=23)/UDP(sport=22,dport=23)/Raw("x" * 80)' out3 = self.send_pkts_getouput([pkt7, pkt8, pkt9, pkt10]) fdir_scanner = re.compile("FDIR matched ID=(0x\w+)") @@ -3220,14 +3219,14 @@ class TestICEFdir(TestCase): def test_mac_ipv6_pay_protocal(self): rules = [ - "flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 44 / end actions rss queues 5 6 end / mark id 1 / end", + "flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 17 / end actions rss queues 5 6 end / mark id 1 / end", "flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 6 / end actions mark id 2 / rss / end", ] rule_li = self.create_fdir_rule(rules, check_stats=True) - pkt1 = 'Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010", nh=44, tc=1, hlim=2)/("X"*480)' - pkt2 = 'Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010")/IPv6ExtHdrFragment(b"1000")/("X"*480)' - pkt3 = 'Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010", nh=44)/TCP(sport=22,dport=23)/("X"*480)' - pkt4 = 'Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010")/IPv6ExtHdrFragment(b"1000")/TCP(sport=22,dport=23)/("X"*480)' + pkt1 = 'Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010", nh=17, tc=1, hlim=2)/("X"*480)' + pkt2 = 'Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=17)/("X"*480)' + pkt3 = 'Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="ABAB:910A:2222:5498:8475:1111:3900:1010", nh=17)/TCP(sport=22,dport=23)/("X"*480)' + pkt4 = 'Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", tc=1, hlim=2)/UDP(sport=22,dport=23)/TCP(sport=22,dport=23)/("X"*480)' pkt5 = 'Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=6)/("X"*480)' pkt6 = 'Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*480)' @@ -3263,8 +3262,8 @@ class TestICEFdir(TestCase): "wrong received mark id %s, expect 0x2" % pkt_mark_id, ) - pkt8 = 'Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)' - pkt9 = 'Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=17)/("X"*480)' + pkt8 = 'Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2021", nh=17)/("X"*480)' + pkt9 = 'Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", nh=1)/("X"*480)' out3 = self.send_pkts_getouput([pkt8, pkt9]) fdir_scanner = re.compile("FDIR matched ID=(0x\w+)") @@ -3537,8 +3536,8 @@ class TestICEFdir(TestCase): check_param={"port_id": 1, "rss": True}, stats=False, ) - self.query_count(1, 2, 0, 0) - self.query_count(1, 2, 1, 0) + self.query_count(1, 1, 0, 0) + self.query_count(1, 1, 1, 0) self.check_fdir_rule(port_id=0, stats=True, rule_list=["0"]) self.check_fdir_rule(port_id=1, stats=True, rule_list=["0"]) self.destroy_fdir_rule(0, ["0"])