From patchwork Tue Aug 2 03:13:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 114505 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 6B44AA00C3; Tue, 2 Aug 2022 05:54:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 65231427EE; Tue, 2 Aug 2022 05:54:26 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 5DE5F400D7 for ; Tue, 2 Aug 2022 05:54:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659412464; x=1690948464; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=sM3SdoV6Mk7an8Uwo40k2GtglCPnYFGOUrgBzEYPJ/w=; b=MtI+ladZoWhN/BwHwd7QesmDjQJVhMeRr7FyymM4kr9elHuQH4+T7xL8 3xagIKpmI1Su8py875A+aLa+BSBET/0EboAOjhc0hUoI6e33pIHbZd4Ds H2U5fY8Rwihv3m0VkGMBxoTJ6Emi/CC2LbSeztQt7yKe9IFWyUK3Jdn63 CN4BWgd/Jy5YB96Xjny6/hNi+pLcTaZS0N48qPflRxEg/Sfz9k2fDntAe WRpYNQj016cL75qNzhbeV/HtAM+o0610pn7i6FEAjXk7QdV5OUGWgfcVF fhDU9flxIFm0VdxFhmlyNNV+zFujA5rM2Vw4UefSnF1rxhDBosxCFToU9 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10426"; a="272356818" X-IronPort-AV: E=Sophos;i="5.93,210,1654585200"; d="scan'208";a="272356818" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2022 20:54:23 -0700 X-IronPort-AV: E=Sophos;i="5.93,210,1654585200"; d="scan'208";a="599164663" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2022 20:54:21 -0700 From: Lingli Chen To: dts@dpdk.org Cc: yuan.peng@intel.com, Lingli Chen Subject: [dts][PATCH V1 1/3] test_plans/generic_flow_api: add i40e case fdir_for_vlan Date: Mon, 1 Aug 2022 23:13:08 -0400 Message-Id: <20220802031310.5523-1-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 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. i40e case fdir_for_vlan add in testplan 2. case fdir_wrong_parameters add validate step Signed-off-by: Lingli Chen Acked-by: Peng, Yuan Signed-off-by: Lingli Chen --- test_plans/generic_flow_api_test_plan.rst | 144 +++++++++++++++++++++- 1 file changed, 143 insertions(+), 1 deletion(-) diff --git a/test_plans/generic_flow_api_test_plan.rst b/test_plans/generic_flow_api_test_plan.rst index 93812f49..97d321db 100644 --- a/test_plans/generic_flow_api_test_plan.rst +++ b/test_plans/generic_flow_api_test_plan.rst @@ -366,6 +366,144 @@ Test case: Intel® Ethernet 700 Series fdir for ipv6 testpmd> flow flush 0 testpmd> flow list 0 +Test case: Intel® Ethernet 700 Series fdir for vlan +=================================================== + +Prerequisites: + + add 2 vf on dpdk pf, then bind the vf to vfio-pci:: + + echo 2 >/sys/bus/pci/devices/0000:05:00.0/max_vfs + ./usertools/dpdk-devbind.py -b vfio-pci 05:02.0 05:02.1 + +1. Launch the app ``testpmd`` with the following arguments:: + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 1ffff -n 4 -a 05:00.0 --file-prefix=pf --socket-mem=1024,1024 --legacy-mem -- -i --rxq=16 --txq=16 --disable-rss + testpmd> set fwd rxonly + testpmd> set verbose 1 + testpmd> start + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 1e0000 -n 4 -a 05:02.0 --file-prefix=vf0 --socket-mem=1024,1024 --legacy-mem -- -i --rxq=4 --txq=4 --disable-rss --pkt-filter-mode=perfect + testpmd> set fwd rxonly + testpmd> set verbose 1 + testpmd> start + + ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 1e00000 -n 4 -a 05:02.1 --file-prefix=vf1 --socket-mem=1024,1024 --legacy-mem -- -i --rxq=4 --txq=4 --disable-rss --pkt-filter-mode=perfect + testpmd> set fwd rxonly + testpmd> set verbose 1 + testpmd> start + +2. validated and create filter rules + + testpmd> flow create 0 ingress pattern eth / vlan tci is 91 / ipv4 / end actions queue index 1 / end + testpmd> flow create 0 ingress pattern eth / vlan tci is 1978 / ipv4 / udp / end actions queue index 2 / end + testpmd> flow create 0 ingress pattern eth / vlan tci is 2391 / ipv4 / tcp / end actions queue index 3 / end + testpmd> flow create 0 ingress pattern eth / vlan tci is 4028 / ipv4 / sctp / end actions queue index 4 / end + testpmd> flow create 0 ingress transfer pattern eth / vlan tci is 1276 / ipv4 / vf id is 0 / end actions queue index 2 / end + testpmd> flow create 0 ingress transfer pattern eth / vlan tci is 2221 / ipv4 / sctp / vf id is 1 / end actions queue index 3 / end + testpmd> flow create 0 ingress pattern eth / vlan tci is 986 / ipv4 / sctp / end actions drop / end + testpmd> flow create 0 ingress transfer pattern eth / vlan tci is 2446 / ipv4 / udp / vf id is 1 / end actions drop / end + + testpmd> flow create 0 ingress pattern eth / vlan tci is 2477 / ipv6 / end actions queue index 1 / end + testpmd> flow create 0 ingress pattern eth / vlan tci is 3407 / ipv6 / udp / end actions queue index 2 / end + testpmd> flow create 0 ingress pattern eth / vlan tci is 2283 / ipv6 / tcp / end actions queue index 3 / end + testpmd> flow create 0 ingress pattern eth / vlan tci is 2709 / ipv6 / sctp / end actions queue index 4 / end + testpmd> flow create 0 ingress transfer pattern eth / vlan tci is 2972 / ipv6 / vf id is 0 / end actions queue index 0 / end + testpmd> flow create 0 ingress transfer pattern eth / vlan tci is 942 / ipv6 / tcp / vf id is 1 / end actions queue index 1 / end + testpmd> flow create 0 ingress pattern eth / vlan tci is 3734 / ipv6 / sctp / end actions drop / end + testpmd> flow create 0 ingress transfer pattern eth / vlan tci is 3455 / ipv6 / tcp / vf id is 1 / end actions drop / end + + testpmd> flow validate 0 ingress pattern eth / vlan tci is 1967 / ipv4 / end actions queue index 7 / end + testpmd> flow validate 0 ingress pattern eth / vlan tci is 1611 / ipv4 / udp / end actions queue index 3 / end + testpmd> flow validate 0 ingress pattern eth / vlan tci is 3211 / ipv4 / tcp / end actions queue index 12 / end + testpmd> flow validate 0 ingress pattern eth / vlan tci is 1198 / ipv4 / sctp / end actions queue index 7 / end + testpmd> flow validate 0 ingress transfer pattern eth / vlan tci is 144 / ipv4 / vf id is 0 / end actions queue index 2 / end + testpmd> flow validate 0 ingress transfer pattern eth / vlan tci is 2469 / ipv4 / sctp / vf id is 1 / end actions queue index 3 / end + testpmd> flow validate 0 ingress pattern eth / vlan tci is 2615 / ipv4 / sctp / end actions drop / end + testpmd> flow validate 0 ingress transfer pattern eth / vlan tci is 1048 / ipv4 / udp / vf id is 1 / end actions drop / end + + testpmd> flow validate 0 ingress pattern eth / vlan tci is 31 / ipv6 / end actions queue index 9 / end + testpmd> flow validate 0 ingress pattern eth / vlan tci is 2220 / ipv6 / udp / end actions queue index 3 / end + testpmd> flow validate 0 ingress pattern eth / vlan tci is 1772 / ipv6 / tcp / end actions queue index 5 / end + testpmd> flow validate 0 ingress pattern eth / vlan tci is 3101 / ipv6 / sctp / end actions queue index 9 / end + testpmd> flow validate 0 ingress transfer pattern eth / vlan tci is 3353 / ipv6 / vf id is 0 / end actions queue index 1 / end + testpmd> flow validate 0 ingress transfer pattern eth / vlan tci is 210 / ipv6 / tcp / vf id is 1 / end actions queue index 0 / end + testpmd> flow validate 0 ingress pattern eth / vlan tci is 1249 / ipv6 / sctp / end actions drop / end + testpmd> flow validate 0 ingress transfer pattern eth / vlan tci is 3771 / ipv6 / tcp / vf id is 1 / end actions drop / end + +3. send the packets with dst/src ip and dst/src port:: + + pkt1 = [Ether(dst='3c:fd:fe:9c:5b:b8')/Dot1Q(vlan=91)/IP()/Raw('x' * 20)] + pkt2 = [Ether(dst="3c:fd:fe:9c:5b:b8")/Dot1Q(vlan=91)/IP(src="192.168.0.1", dst="192.168.0.2", proto=3)/Raw("x" * 20)] + + pkt3 = [Ether(dst='3c:fd:fe:9c:5b:b8')/Dot1Q(vlan=1978)/IP()/UDP()/Raw('x' * 20)] + pkt4 = [Ether(dst="3c:fd:fe:9c:5b:b8")/Dot1Q(vlan=1978)/IP(src="192.168.0.1", dst="192.168.0.2", tos=3)/UDP()/Raw("x" * 20)] + + pkt5 = [Ether(dst='3c:fd:fe:9c:5b:b8')/Dot1Q(vlan=2391)/IP()/TCP()/Raw('x' * 20)] + pkt6 = [Ether(dst="3c:fd:fe:9c:5b:b8")/Dot1Q(vlan=2391)/IP(src="192.168.0.1", dst="192.168.0.2", ttl=3)/TCP()/Raw("x" * 20)] + + pkt7 = [Ether(dst='3c:fd:fe:9c:5b:b8')/Dot1Q(vlan=4028)/IP()/SCTP()/Raw('x' * 20)] + pkt8 = [Ether(dst="3c:fd:fe:9c:5b:b8")/Dot1Q(vlan=4028)/IP(src="192.168.0.1", dst="192.168.0.2", tos=3, ttl=3)/SCTP()/Raw("x" * 20)] + + pkt9 = [Ether(dst="3c:fd:fe:9c:5b:b8")/Dot1Q(vlan=2391)/IP()/UDP()/Raw("x" * 20)] + pkt10 = [Ether(dst="3c:fd:fe:9c:5b:b8")/Dot1Q(vlan=4028)/IP(src="192.168.0.1", dst="192.168.0.2", ttl=3)/TCP()/Raw("x" * 20)] + pkt11 = [Ether(dst='00:11:22:33:44:77')/Dot1Q(vlan=1276)/IP()/Raw('x' * 20)] + pkt12 = [Ether(dst='00:11:22:33:44:77')/Dot1Q(vlan=2221)/IP()/SCTP()/Raw('x' * 20)] + + pkt13 = [Ether(dst='3c:fd:fe:9c:5b:b8')/Dot1Q(vlan=986)/IP()/SCTP()/Raw('x' * 20)] + pkt14 = [Ether(dst="3c:fd:fe:9c:5b:b8")/Dot1Q(vlan=986)/IP(src="192.168.0.5", dst="192.168.0.6", tos=3, ttl=3)/SCTP(sport=44,dport=45,tag=1)/Raw("x" * 20)] + + pkt15 = [Ether(dst='00:11:22:33:44:77')/Dot1Q(vlan=2446)/IP()/UDP()/Raw('x' * 20)] + pkt16 = [Ether(dst="00:11:22:33:44:55")/Dot1Q(vlan=2446)/IP(src="192.168.0.5", dst="192.168.0.6", tos=3, ttl=3)/UDP(sport=44,dport=45)/SCTPChunkData(data="X" * 20)] + verify packet + pkt1,pkt2 to queue 1, pkt3,pkt4 to queue 2, pkt5,pkt6 to queue 3, + pkt7,pkt8 to queue 4, pkt9,pkt10 to queue 0, pkt11 to vf0 queue 2, pkt12 to vf1 queue 3, + pkt13, pkt14 can't be received by pf, pkt15, pkt16 can't be received by vf1. + + pkt17 = [Ether(dst='3c:fd:fe:9c:5b:b8')/Dot1Q(vlan=2477)/IPv6(src='cb5:c4a9:8855:e022:c66a:a5dc:f2b8:a4d9', dst='922c:9e24:a730:2c66:9b65:c00a:cfed:986')/Raw('x' * 20)] + pkt18 = [Ether(dst="3c:fd:fe:9c:5b:b8")/Dot1Q(vlan=2477)/IPv6(src="2001::1", dst="2001::2", tc=1, nh=5, hlim=10)/Raw("x" * 20)] + pkt19 = [Ether(dst='3c:fd:fe:9c:5b:b8')/Dot1Q(vlan=3407)/IPv6(src='4cff:139f:dad7:cb9f:bb6d:3e28:42b2:99b', dst='cb9e:cd92:b178:d273:de4d:c9fa:9952:5088')/UDP()/Raw('x' * 20)] + pkt20 = [Ether(dst="3c:fd:fe:9c:5b:b8")/Dot1Q(vlan=3407)/IPv6(src="2001::1", dst="2001::2", tc=2, hlim=20)/UDP(sport=22,dport=23)/Raw("x" * 20)] + pkt21 = [Ether(dst='3c:fd:fe:9c:5b:b8')/Dot1Q(vlan=2283)/IPv6(src='5548:dace:bc41:5829:ee11:1944:a56:18f9', dst='9ef3:710f:b492:778c:f87a:455f:4508:893e')/TCP()/Raw('x' * 20)] + pkt22 = [Ether(dst="3c:fd:fe:9c:5b:b8")/Dot1Q(vlan=2283)/IPv6(src="2001::1", dst="2001::2", tc=2, hlim=20)/TCP(sport=32,dport=33)/Raw("x" * 20)] + pkt23 = [Ether(dst='3c:fd:fe:9c:5b:b8')/Dot1Q(vlan=2709)/IPv6(src='7d7d:ca46:bd95:676e:b680:b7e9:4c21:d7cc', dst='c7bc:8b28:a48a:a7eb:bfd0:3313:1548:7579', nh=132)/SCTP()/Raw('x' * 20)] + pkt24 = [Ether(dst="3c:fd:fe:9c:5b:b8")/Dot1Q(vlan=2709)/IPv6(src="2001::1", dst="2001::2", tc=4, nh=132, hlim=40)/SCTP(sport=44,dport=45,tag=1)/SCTPChunkData(data="X" * 20)] + + pkt25 = [Ether(dst='00:11:22:33:44:77')/Dot1Q(vlan=2972)/IPv6(src='816d:2dfd:17f8:69bd:ec68:581f:740f:42db', dst='68c8:243:b709:3a8b:658:9ebb:f60f:c493')/Raw('x' * 20)] + pkt26 = [Ether(dst='00:11:22:33:44:77')/Dot1Q(vlan=942)/IPv6(src='9550:be5c:599b:705e:275c:6164:c034:b4e7', dst='3450:bddc:a4a6:23cd:b8e:f85f:7424:4f8f')/TCP()/Raw('x' * 20)] + pkt27 = [Ether(dst='3c:fd:fe:9c:5b:b8')/Dot1Q(vlan=3734)/IPv6(src='1529:7d1c:6f:914a:2fe2:269f:3b16:3f60', dst='fd68:fd59:bb7c:12d4:3b19:20b2:1ef3:7100', nh=132)/SCTP()/Raw('x' * 20)] + pkt28 = [Ether(dst="3c:fd:fe:9c:5b:b8")/Dot1Q(vlan=3734)/IPv6(src="2001::1", dst="2001::2", tc=4, nh=132, hlim=40)/SCTP(sport=44,dport=45,tag=1)/SCTPChunkData(data="X" * 20)] + pkt29 = [Ether(dst='00:11:22:33:44:77')/Dot1Q(vlan=3455)/IPv6(src='ffdf:e23b:9cc4:b99b:cdc:a881:6b7a:bac2', dst='c90b:3b2a:2c42:6d12:e51f:8657:e941:1fe1')/TCP()/Raw('x' * 20)] + pkt30 = [Ether(dst="00:11:22:33:44:55")/Dot1Q(vlan=3455)/IPv6(src="2001::1", dst="2001::2", tc=2, hlim=20)/TCP(sport=32,dport=33)/Raw("x" * 20)] + verify packet + pkt17,pkt18 to queue 1, pkt19,pkt20 to queue 2, pkt21,pkt22 to queue 3, + pkt23,pkt24 to queue 4, pkt25 to vf0 queue 0, pkt26 to vf1 queue 1, + pkt27, pkt28 can't be received by pf, pkt29, pkt30 can't be received by vf1. + +4. verify rules can be listed and destroyed:: + + testpmd> flow list 0 + ID Group Prio Attr Rule + 0 0 0 i-- ETH VLAN IPV4 => QUEUE + 1 0 0 i-- ETH VLAN IPV4 UDP => QUEUE + 2 0 0 i-- ETH VLAN IPV4 TCP => QUEUE + 3 0 0 i-- ETH VLAN IPV4 SCTP => QUEUE + 4 0 0 i-t ETH VLAN IPV4 VF => QUEUE + 5 0 0 i-t ETH VLAN IPV4 SCTP VF => QUEUE + 6 0 0 i-- ETH VLAN IPV4 SCTP => DROP + 7 0 0 i-t ETH VLAN IPV4 UDP VF => DROP + 8 0 0 i-- ETH VLAN IPV6 => QUEUE + 9 0 0 i-- ETH VLAN IPV6 UDP => QUEUE + 10 0 0 i-- ETH VLAN IPV6 TCP => QUEUE + 11 0 0 i-- ETH VLAN IPV6 SCTP => QUEUE + 12 0 0 i-t ETH VLAN IPV6 VF => QUEUE + 13 0 0 i-t ETH VLAN IPV6 TCP VF => QUEUE + 14 0 0 i-- ETH VLAN IPV6 SCTP => DROP + 15 0 0 i-t ETH VLAN IPV6 TCP VF => DROP + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + testpmd> flow flush 0 + testpmd> flow list 0 Test case: Intel® Ethernet 700 Series fdir wrong parameters =========================================================== @@ -379,8 +517,9 @@ Test case: Intel® Ethernet 700 Series fdir wrong parameters 2. create filter rules - Exceeds maximum payload limit:: +1) Exceeds maximum payload limit:: + testpmd> flow validate 0 ingress pattern eth type is 0x0807 / raw relative is 1 pattern is abcdefghijklmnopq / end actions queue index 1 / end testpmd> flow create 0 ingress pattern eth / ipv4 src is 2.2.2.4 dst is 2.2.2.5 / sctp src is 42 / raw relative is 1 offset is 2 pattern is abcdefghijklmnopq / end actions queue index 5 / end it shows "Caught error type 9 (specific pattern item): cause: 0x7fd87ff60160 @@ -388,6 +527,7 @@ Test case: Intel® Ethernet 700 Series fdir wrong parameters 2) can't set mac_addr when setting fdir filter:: + testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 4095 / ipv6 src is 2001::3 dst is 2001::4 tc is 6 hop is 60 / tcp src is 32 dst is 33 / end actions queue index 2 / end testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 4095 / ipv6 src is 2001::3 dst is 2001::4 tc is 6 hop is 60 / tcp src is 32 dst is 33 / end actions queue index 3 / end it shows "Caught error type 9 (specific pattern item): cause: 0x7f463ff60100 @@ -402,6 +542,7 @@ Test case: Intel® Ethernet 700 Series fdir wrong parameters 4) invalid queue ID:: + testpmd> flow validate 0 ingress pattern eth / ipv6 src is 2001::3 dst is 2001::4 tc is 6 hop is 60 / tcp src is 32 dst is 33 / end actions queue index 16 / end testpmd> flow create 0 ingress pattern eth / ipv6 src is 2001::3 dst is 2001::4 tc is 6 hop is 60 / tcp src is 32 dst is 33 / end actions queue index 16 / end it shows "Caught error type 11 (specific action): cause: 0x7ffc7bb9a338, @@ -409,6 +550,7 @@ Test case: Intel® Ethernet 700 Series fdir wrong parameters If create a rule on vf that has invalid queue ID:: + testpmd> flow validate 0 ingress transfer pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 proto is 3 / vf id is 0 / end actions queue index 4 / end testpmd> flow create 0 ingress transfer pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 proto is 3 / vf id is 0 / end actions queue index 4 / end it shows "Caught error type 11 (specific action): cause: 0x7ffc7bb9a338, From patchwork Tue Aug 2 03:13:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 114506 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 8B88CA00C3; Tue, 2 Aug 2022 05:54:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8620C42B74; Tue, 2 Aug 2022 05:54:27 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 28253400D7 for ; Tue, 2 Aug 2022 05:54:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659412466; x=1690948466; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=fME9Ew/ZpwUD7c/qST+/RRfQ5XRxPIYzjVaEyOI1j5A=; b=QmzCQjA9K2+H8ovLJ7S1F0AYDGOBpfqrQN6oy7Gpgg/Wt0fJ9r9xz3Yc X/k2OTP5u2GmTX6fyEqjrOV/NeHUQDwQ3pjXCOuadqr2Lj6CP/7V+hRC0 0rENVC6FmL0BEANIGDq12ea6SaokyqOtf5iM4nCbswk5OZWr7gL6LSeKf T+m+O2XMZv3N73ae1YZFEmK0M7Qa15n49rSeYgkg2CuRdB8yKu2jD8yW4 IOvYSFi1swR2Xc8RBBg3NuwLI5DiQ0fxa2OM/Lix1EGKqg5bZpSRjOYlW bf2RelJ57Fa6A846MvD4Hq31t3aGD276sqKbcWWjw+KWeThldAcE6dWOQ w==; X-IronPort-AV: E=McAfee;i="6400,9594,10426"; a="272356819" X-IronPort-AV: E=Sophos;i="5.93,210,1654585200"; d="scan'208";a="272356819" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2022 20:54:25 -0700 X-IronPort-AV: E=Sophos;i="5.93,210,1654585200"; d="scan'208";a="599164666" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2022 20:54:23 -0700 From: Lingli Chen To: dts@dpdk.org Cc: yuan.peng@intel.com, Lingli Chen Subject: [dts][PATCH V1 2/3] conf/test_case_checklist: add case fdir_wrong_parameters Date: Mon, 1 Aug 2022 23:13:09 -0400 Message-Id: <20220802031310.5523-2-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220802031310.5523-1-linglix.chen@intel.com> References: <20220802031310.5523-1-linglix.chen@intel.com> 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 fdir_wrong_parameters: testpmd not support socket-mem param in freebsd Signed-off-by: Lingli Chen Acked-by: Peng, Yuan Signed-off-by: Lingli Chen --- conf/test_case_checklist.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/conf/test_case_checklist.json b/conf/test_case_checklist.json index 5d166cb2..e3784ec5 100644 --- a/conf/test_case_checklist.json +++ b/conf/test_case_checklist.json @@ -3777,5 +3777,20 @@ "Bug ID": "", "Comments": "the nic on the environment not support this case" } + ], + "fdir_wrong_parameters":[ + { + "OS": [ + "freebsd" + ], + "NIC": [ + "ALL" + ], + "Target": [ + "ALL" + ], + "Bug ID": "", + "Comments": "testpmd not support socket-mem param in freebsd" + } ] } From patchwork Tue Aug 2 03:13:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 114507 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 B0CE1A00C3; Tue, 2 Aug 2022 05:54:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC3EF40141; Tue, 2 Aug 2022 05:54:29 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id ED402400D7 for ; Tue, 2 Aug 2022 05:54:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659412467; x=1690948467; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ujwMfCZlag4xE0IAXgbsiDAzf/LDenvtJq+IA6rYZgU=; b=dcNrCp3z5XI1CFOJ1xg1b1XsH7LWg8c0FePTRVnKbVSebmiqT/jStLp6 wkxW4wRZUAMQkjjJJp+Tfzjq8lLjeq+nC6sFSlxarCNF4Kb+Y0E6zfz6M P8x7zncMJXwTdmB1kpHYQZF5lakl/HqLZcTk/rUxKOK6A/DQELVrNW4tQ hPmyzbbQIPXgwpoyyLpwJz07sEdT4MTYs47yrAG9GRI0dNFacYnFpCeDT Oew88y73MQfFQo1NmXCkfejio4D95ixxk+i4u4qICcC+rIuP8S0G7qeE/ Inx+cbD3tR6aFxtAGbxfEyCJBP3JUKOErz2+70iyhTGnzftg/9ESd/Szt w==; X-IronPort-AV: E=McAfee;i="6400,9594,10426"; a="272356821" X-IronPort-AV: E=Sophos;i="5.93,210,1654585200"; d="scan'208";a="272356821" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2022 20:54:26 -0700 X-IronPort-AV: E=Sophos;i="5.93,210,1654585200"; d="scan'208";a="599164671" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Aug 2022 20:54:25 -0700 From: Lingli Chen To: dts@dpdk.org Cc: yuan.peng@intel.com, Lingli Chen Subject: [dts][PATCH V1 3/3] tests/generic_flow_api: add case fdir_wrong_parameters sync with testplan Date: Mon, 1 Aug 2022 23:13:10 -0400 Message-Id: <20220802031310.5523-3-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220802031310.5523-1-linglix.chen@intel.com> References: <20220802031310.5523-1-linglix.chen@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 i40e case fdir_wrong_parameters sync with testplan 2. test_fdir_for_flexbytes: remove Exceeds maximum payload limit rules test because incloud in case fdir_wrong_parameters. Signed-off-by: Lingli Chen Tested-by: Chenyu Huang Acked-by: Peng, Yuan Signed-off-by: Lingli Chen Acked-by: Lijuan Tu --- tests/TestSuite_generic_flow_api.py | 102 +++++++++++++++++++++++++--- 1 file changed, 93 insertions(+), 9 deletions(-) diff --git a/tests/TestSuite_generic_flow_api.py b/tests/TestSuite_generic_flow_api.py index 73689a0e..0881956c 100644 --- a/tests/TestSuite_generic_flow_api.py +++ b/tests/TestSuite_generic_flow_api.py @@ -3438,6 +3438,99 @@ class TestGeneric_flow_api(TestCase): rule_num = extrapkt_rulenum["rulenum"] self.verify_rulenum(rule_num + 1) + support_nic = [ + "I40E_10G-SFP_XL710", + "I40E_25G-25G_SFP28", + "I40E_40G-QSFP_A", + "I40E_10G-10G_BASE_T_BC", + "I40E_40G-QSFP_B", + "I40E_10G-SFP_X722", + "I40E_10G-10G_BASE_T_X722", + ] + + @check_supported_nic(support_nic) + def test_fdir_wrong_parameters(self): + """ + Test case: Intel® Ethernet 700 Series fdir wrong parameters + """ + + self.pmdout.start_testpmd( + "%s" % self.pf_cores, + "--disable-rss --rxq=%d --txq=%d --pkt-filter-mode=perfect" + % (MAX_QUEUE + 1, MAX_QUEUE + 1), + "-a %s --socket-mem 1024,1024 --file-prefix=pf " % self.pf_pci, + ) + self.dut.send_expect("set fwd rxonly", "testpmd> ") + self.dut.send_expect("set verbose 1", "testpmd> ") + self.dut.send_expect("start", "testpmd> ") + time.sleep(2) + + # creat the flow rules + # l2-payload exceeds the max length of raw match is 16bytes + self.dut.send_expect( + "flow validate 0 ingress pattern eth type is 0x0807 / raw relative is 1 pattern is abcdefghijklmnopq / end actions queue index 1 / end", + "error", + ) + self.dut.send_expect( + "flow create 0 ingress pattern eth type is 0x0807 / raw relative is 1 pattern is abcdefghijklmnopq / end actions queue index 1 / end", + "Exceeds maximal payload limit", + ) + + # can't set mac_addr when setting fdir filter + self.dut.send_expect( + "flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 4095 / ipv6 src is 2001::3 dst is 2001::4 tc is 6 hop is 60 / tcp src is 32 dst is 33 / end actions queue index 2 / end", + "error", + ) + self.dut.send_expect( + "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 4095 / ipv6 src is 2001::3 dst is 2001::4 tc is 6 hop is 60 / tcp src is 32 dst is 33 / end actions queue index 3 / end", + "error", + ) + + # can't change the configuration of the same packet type + self.dut.send_expect( + "flow create 0 ingress pattern eth / vlan tci is 3 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 4 / sctp src is 44 dst is 45 tag is 1 / end actions passthru / flag / end", + "created", + ) + self.dut.send_expect( + "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 4 / sctp src is 34 dst is 35 tag is 1 / end actions passthru / flag / end", + "error", + ) + + # invalid queue ID + self.dut.send_expect( + "flow validate 0 ingress pattern eth / ipv6 src is 2001::3 dst is 2001::4 tc is 6 hop is 60 / tcp src is 32 dst is 33 / end actions queue index 16 / end", + "error", + ) + self.dut.send_expect( + "flow create 0 ingress pattern eth / ipv6 src is 2001::3 dst is 2001::4 tc is 6 hop is 60 / tcp src is 32 dst is 33 / end actions queue index 16 / end", + "error", + ) + self.dut.send_expect("quit", "# ") + time.sleep(2) + + self.dut.generate_sriov_vfs_by_port(self.dut_ports[0], 1, self.kdriver) + self.vf_port = self.dut.ports_info[self.dut_ports[0]]["vfs_port"][0] + self.vf_port.bind_driver(driver="vfio-pci") + self.vf_port_pci = self.dut.ports_info[self.dut_ports[0]]["sriov_vfs_pci"][0] + # start testpmd on vf0 + self.pmdout.start_testpmd( + "default", + "--rxq=4 --txq=4 --disable-rss --pkt-filter-mode=perfect", + eal_param="-a %s --socket-mem 1024,1024 --file-prefix=vf" + % self.vf_port_pci, + ) + self.dut.send_expect("start", "testpmd>") + time.sleep(2) + # create a rule on vf that has invalid queue ID + self.dut.send_expect( + "flow validate 0 ingress transfer pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 proto is 3 / vf id is 0 / end actions queue index 4 / end", + "error", + ) + self.dut.send_expect( + "flow create 0 ingress transfer pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 proto is 3 / vf id is 0 / end actions queue index 4 / end", + "error", + ) + def test_fdir_for_flexbytes(self): """ The filter structure is different between igb, ixgbe and i40e @@ -3485,15 +3578,6 @@ class TestGeneric_flow_api(TestCase): time.sleep(2) # creat the flow rules - # l2-payload exceeds the max length of raw match is 16bytes - self.dut.send_expect( - "flow validate 0 ingress pattern eth type is 0x0807 / raw relative is 1 pattern is abcdefghijklmnopq / end actions queue index 1 / end", - "error", - ) - self.dut.send_expect( - "flow create 0 ingress pattern eth type is 0x0807 / raw relative is 1 pattern is abcdefghijklmnopq / end actions queue index 1 / end", - "Exceeds maximal payload limit", - ) # l2-payload equal the max length of raw match is 16bytes self.dut.send_expect( "flow validate 0 ingress pattern eth type is 0x0807 / raw relative is 1 pattern is abcdefghijklmnop / end actions queue index 1 / end",