From patchwork Mon Feb 7 23:01:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yaqi Tang X-Patchwork-Id: 106977 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 C17FBA034F; Mon, 7 Feb 2022 16:04:07 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8BA4A410F3; Mon, 7 Feb 2022 16:04:07 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id C9A1C410EA for ; Mon, 7 Feb 2022 16:04:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644246246; x=1675782246; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=do1CIiq2foEN5hlgehn1B/W+Uhl3XZAQwL8OHPzpy18=; b=k+3j3aI1pjhN5op3Nv5Au4v7dHmKZMy0IK4ZdKlqWzbtbeOwEr2QnqXt hRbhvTpmAYe/NJb3r1rWk+Tjm+0rSohOhLrDr0o5n2XMlqcr0Ucc0FvXo bVUfxef+wLDmGfziylHvB4NnWBUnPJopkGY5YmMIIZz6h6uo1P1x08wAt DM1HtaxYWsmnPJMC9hQC1IavCduXuNDklI5B8UwVyW9jODa5qTYhtPfp0 x0Aec6iUqwXi2UnPl1JCGdRwcomKFmdxZg177jxfTXF311IdR6CMKBA3P d3oso6uFbKVlFtyCrA7eaFjPVD79mghCHWfhfxriiMHpBs2z0C/ZcppRC A==; X-IronPort-AV: E=McAfee;i="6200,9189,10250"; a="312030103" X-IronPort-AV: E=Sophos;i="5.88,350,1635231600"; d="scan'208";a="312030103" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2022 07:03:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,350,1635231600"; d="scan'208";a="770656371" Received: from dpdk-yaqi.sh.intel.com ([10.67.119.205]) by fmsmga006.fm.intel.com with ESMTP; 07 Feb 2022 07:03:42 -0800 From: Yaqi Tang To: dts@dpdk.org Cc: Yaqi Tang Subject: [dts][PATCH V4] test_plans/dcf_lifecycle_test_plan: add test plan for CVL DCF enable device reset API Date: Mon, 7 Feb 2022 23:01:57 +0000 Message-Id: <20220207230157.488289-1-yaqi.tang@intel.com> X-Mailer: git-send-email 2.25.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 The rte_eth_dev_reset API provides a more elegant way for the application to reset DCF through the command "port reset all" when reconnecting. Signed-off-by: Yaqi Tang Tested-by: Yaqi Tang < yaqi.tang@intel.com> --- test_plans/dcf_lifecycle_test_plan.rst | 247 ++++++++++++++----------- 1 file changed, 140 insertions(+), 107 deletions(-) diff --git a/test_plans/dcf_lifecycle_test_plan.rst b/test_plans/dcf_lifecycle_test_plan.rst index a8701338..42729318 100644 --- a/test_plans/dcf_lifecycle_test_plan.rst +++ b/test_plans/dcf_lifecycle_test_plan.rst @@ -1078,9 +1078,6 @@ CVL DCF enable device reset API Description =========== -The test plan includes ten test cases, such as two_testpmd_dcf_reset_port, two_testpmd_dcf_reset_device, two_testpmd_dcf_reset_port_detach, two_testpmd_dcf_reset_mtu, -two_testpmd_dcf_reset_mac, one_testpmd_dcf_reset_port, one_testpmd_dcf_reset_device, one_testpmd_dcf_reset_port_detach, one_testpmd_dcf_reset_mtu, one_testpmd_dcf_reset_mac. - DCF PMD need to support rte_eth_dev_reset.The reason is that when a DCF instance be killed, all the flow rules still exist in hardware. when DCF gets to reconnect, It has already lost the flow context, and if the application wants to create new rules, they may fail because FW reports that the rules already exist.The current workaround assumes that the user can turn off / turn on VF trust mode, so kernel PF will reset DCF by removing all old rules.The rte_eth_dev_reset API provides @@ -1100,44 +1097,39 @@ scapy: http://www.secdev.org/projects/scapy/ General Set Up -------------- -1. Copy specific ice package to /lib/firmware/updates/intel/ice/ddp/ice.pkg, - then load driver:: - - # cp ice_comms-1.3.31.0.pkg /lib/firmware/updates/intel/ice/ddp/ice.pkg - # rmmod ice - # insmod ice.ko - -2. Compile DPDK:: +1. Compile DPDK:: - # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc - # ninja -C x86_64-native-linuxapp-gcc -j 110 + # CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib --default-library=static + # ninja -C -j 110 -3. Get the pci device id and interface of DUT and tester. +2. Get the pci device id and interface of DUT and tester. + For example, 0000:3b:00.0 and 0000:af:00.0 is pci device id, + ens785f0 and ens260f0 is interface:: - # ./usertools/dpdk-devbind.py -s + # ./usertools/dpdk-devbind.py -s 0000:3b:00.0 'Ethernet Controller E810-C for SFP 1593' if=ens785f0 drv=ice unused=vfio-pci 0000:af:00.0 'Ethernet Controller XXV710 for 25GbE SFP28 158b' if=ens260f0 drv=i40e unused=vfio-pci -4. Generate 4 VFs on PF0:: +3. Generate 4 VFs on PF0:: # echo 4 > /sys/bus/pci/devices/0000:3b:00.0/sriov_numvfs -5. Get VF pci device id of DUT. +4. Get VF pci device id and interface of DUT. # ./usertools/dpdk-devbind.py -s 0000:3b:01.0 'Ethernet Adaptive Virtual Function 1889' if=ens785f0v0 drv=iavf unused=vfio-pci 0000:3b:01.1 'Ethernet Adaptive Virtual Function 1889' if=ens785f0v1 drv=iavf unused=vfio-pci -6. Set VF0 as trust:: +5. Set VF0 as trust:: # ip link set ens785f0 vf 0 trust on -7. Bind the VF ports of DUT to dpdk:: - - # ./usertools/dpdk-devbind.py -b vfio-pci 3b:01.0 3b:01.1 +6. Bind the DUT port to dpdk:: + # ./usertools/dpdk-devbind.py -b vfio-pci + Test case ========= @@ -1147,11 +1139,21 @@ The common steps launch two testpmds and kill DCF process, then relaunch two tes 1. Launch the userland ``testpmd`` application on DUT as follows:: - # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -v -c 0x6 -n 4 -a 0000:3b:01.0,cap=dcf --file-prefix=dcf -- -i + /app/dpdk-testpmd -a -- -i +..note:: + + For , you can use "-c 0x6 -n 4", you can also refer to testpmd doc for other setings. + For , you can use "0000:3b:01.0,cap=dcf --file-prefix=dcf" for this test plan. + 2. Launch another ``testpmd`` application on the VF1 of DUT as follows:: - # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -v -c 0x18 -n 4 -a 0000:3b:01.1 --file-prefix=vf -- -i + /app/dpdk-testpmd -a -- -i + +..note:: + + For , you can use "-c 0x18 -n 4", you can also refer to testpmd doc for other setings. + For this test plan, you can use "0000:3b:01.1 --file-prefix=vf" for this test plan. 3. Set verbose in VF testpmd:: @@ -1164,7 +1166,7 @@ The common steps launch two testpmds and kill DCF process, then relaunch two tes 5. Validate a switch rule to VF1 in DCF testpmd:: - testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1172,7 +1174,7 @@ The common steps launch two testpmds and kill DCF process, then relaunch two tes 6. Create a switch rule to VF1 in DCF testpmd and list rules:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1185,11 +1187,11 @@ The common steps launch two testpmds and kill DCF process, then relaunch two tes ID Group Prio Attr Rule 0 0 0 i-- ETH IPV4 => VF -7. Send a matched packet in scapy to VF1, check the VF1 of DUT can receive the packet:: +7. Send a matched packet in scapy to VF1, check the VF1 of DUT can receive the packet. Tester:: - >>> sendp([Ether(src="00:11:22:33:44:55", dst='C6:44:32:0A:EC:E1')/IP(src='192.168.0.2', dst='192.168.0.3')/("X"*64)],iface="ens260f0",count=1) + >>> sendp([Ether(src="",dst="")/IP(src="",dst="")/("X"*64)], iface="") the VF1 of DUT:: @@ -1197,20 +1199,37 @@ the VF1 of DUT:: src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 - l2_len=14 - l3_len=20 - Receive queue=0x0 ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN -8. Check the process ID and kill DCF process:: +All the packets in this test plan use below settings: +dst src: 00:11:22:33:44:55 +dst mac: C6:44:32:0A:EC:E1 +ipv4 src: 192.168.0.2 +ipv4 dst: 192.168.0.3 + +Test Case 1: two_testpmd_dcf_reset_port +--------------------------------------- +The test case resets DCF by killing DCF and resetting the port, and DCF should clean up all old rules. + +Test Steps +~~~~~~~~~~ +1. Check the process ID and kill DCF process:: # ps -ef |grep testpmd # kill -9 ##### -9. Relaunch the userland ``testpmd`` application on DUT as follows:: +2. Relaunch the userland ``testpmd`` application on DUT as follows:: + + /app/dpdk-testpmd -a -- -i + +..note:: - # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -v -c 0x6 -n 4 -a 0000:3b:01.0,cap=dcf --file-prefix=dcf -- -i + For , you can use "-c 0x6 -n 4", you can also refer to testpmd doc for other setings. + For , you can use "0000:3b:01.0,cap=dcf --file-prefix=dcf" for this test plan. -10. Send a matched packet in scapy to VF1, DCF flow rule is still valid and check the VF1 of DUT can receive the packet:: +3. Send a matched packet in scapy to VF1, DCF flow rule is still valid and check the VF1 of DUT can receive the packet. Tester:: - >>> sendp([Ether(src="00:11:22:33:44:55", dst="C6:44:32:0A:EC:E1")/IP(src="192.168.0.2", dst="192.168.0.3")/("X"*64)],iface="ens260f0",count=1,inter=0,verbose=False) + >>> sendp([Ether(src="",dst="")/IP(src="",dst="")/("X"*64)], iface="") the VF1 of DUT:: @@ -1218,31 +1237,26 @@ the VF1 of DUT:: src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 - l2_len=14 - l3_len=20 - Receive queue=0x0 ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN -Test Case 1: two_testpmd_dcf_reset_port ---------------------------------------- -The test case resets DCF by resetting the port, and DCF should clean up all old rules. - -Test Steps -~~~~~~~~~~ -1. Reset port in DCF testpmd:: +4. Reset port in DCF testpmd:: testpmd> stop testpmd> port stop all testpmd> port reset all testpmd> port start all testpmd> start + testpmd> flow list 0 -2. Validate a switch rule to VF1 in DCF testpmd:: +5. Validate a switch rule to VF1 in DCF testpmd:: - testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: Flow rule validated -3. Create a switch rule to VF1 in DCF testpmd and list rules:: +6. Create a switch rule to VF1 in DCF testpmd and list rules:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1255,11 +1269,11 @@ Test Steps ID Group Prio Attr Rule 0 0 0 i-- ETH IPV4 => VF -4. Send a matched packet in scapy to VF1, and check the VF1 of DUT can receive the packet:: +7. Send a matched packet in scapy to VF1, and check the VF1 of DUT can receive the packet. Tester:: - >>> sendp([Ether(src="00:11:22:33:44:55", dst="C6:44:32:0A:EC:E1")/IP(src="192.168.0.2", dst="192.168.0.3")/("X"*64)],iface="ens260f0",count=1,inter=0,verbose=False) + >>> sendp([Ether(src="",dst="")/IP(src="",dst="")/("X"*64)], iface="") the VF1 of DUT:: @@ -1284,10 +1298,11 @@ Test Steps testpmd> port reset all testpmd> port start all testpmd> start + testpmd> flow list 0 3. Validate a switch rule to VF1 in DCF testpmd:: - testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1295,7 +1310,7 @@ Test Steps 4. Create a switch rule to VF1 in DCF testpmd and list rules:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1308,11 +1323,11 @@ Test Steps ID Group Prio Attr Rule 0 0 0 i-- ETH IPV4 => VF -5. Send a matched packet in scapy to VF1, and check the VF1 of DUT can receive the packet:: +5. Send a matched packet in scapy to VF1, and check the VF1 of DUT can receive the packet. Tester:: - >>> sendp([Ether(src="00:11:22:33:44:55", dst="C6:44:32:0A:EC:E1")/IP(src="192.168.0.2", dst="192.168.0.3")/("X"*64)],iface="ens260f0",count=1,inter=0,verbose=False) + >>> sendp([Ether(src="",dst="")/IP(src="",dst="")/("X"*64)], iface="") the VF1 of DUT:: @@ -1339,10 +1354,11 @@ Test Steps testpmd> port reset 0 testpmd> port start 0 testpmd> start + testpmd> flow list 0 3. Validate a switch rule to VF1 in DCF testpmd:: - testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1350,7 +1366,7 @@ Test Steps 4. Create a switch rule to VF1 in DCF testpmd and list rules:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1363,11 +1379,11 @@ Test Steps ID Group Prio Attr Rule 0 0 0 i-- ETH IPV4 => VF -5. Send a matched packet in scapy to VF1, and check the VF1 of DUT can receive the packet:: +5. Send a matched packet in scapy to VF1, and check the VF1 of DUT can receive the packet. Tester:: - >>> sendp([Ether(src="00:11:22:33:44:55", dst="C6:44:32:0A:EC:E1")/IP(src="192.168.0.2", dst="192.168.0.3")/("X"*64)],iface="ens260f0",count=1,inter=0,verbose=False) + >>> sendp([Ether(src="",dst="")/IP(src="",dst="")/("X"*64)], iface="") the VF1 of DUT:: @@ -1377,7 +1393,7 @@ the VF1 of DUT:: Test Case 4: two_testpmd_dcf_reset_mtu -------------------------------------- -The test case resets DCF by reseting the mtu, and DCF should clean up all old rules. +The test case resets DCF by resetting the mtu, and DCF should clean up all old rules. Test Steps ~~~~~~~~~~ @@ -1392,10 +1408,11 @@ Test Steps testpmd> port reset all testpmd> port start all testpmd> start + testpmd> flow list 0 3. Validate a switch rule to VF1 in DCF testpmd:: - testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1403,7 +1420,7 @@ Test Steps 4. Create a switch rule to VF1 in DCF testpmd and list rules:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1416,11 +1433,11 @@ Test Steps ID Group Prio Attr Rule 0 0 0 i-- ETH IPV4 => VF -5. Send a matched packet in scapy to VF1, and check the VF1 of DUT can receive the packet:: +5. Send a matched packet in scapy to VF1, and check the VF1 of DUT can receive the packet. Tester:: - >>> sendp([Ether(src="00:11:22:33:44:55", dst="C6:44:32:0A:EC:E1")/IP(src="192.168.0.2", dst="192.168.0.3")/("X"*64)],iface="ens260f0",count=1,inter=0,verbose=False) + >>> sendp([Ether(src="",dst="")/IP(src="",dst="")/("X"*64)], iface="") the VF1 of DUT:: @@ -1430,7 +1447,7 @@ the VF1 of DUT:: Test Case 5: two_testpmd_dcf_reset_mac -------------------------------------- -The test case resets DCF by reseting mac addr, and DCF should clean up all old rules. +The test case resets DCF by resetting mac addr, and DCF should clean up all old rules. Test Steps ~~~~~~~~~~ @@ -1445,10 +1462,11 @@ Test Steps testpmd> port reset all testpmd> port start all testpmd> start + testpmd> flow list 0 3. Validate a switch rule to VF1 in DCF testpmd:: - testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1456,7 +1474,7 @@ Test Steps 4. Create a switch rule to VF1 in DCF testpmd and list rules:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1469,11 +1487,11 @@ Test Steps ID Group Prio Attr Rule 0 0 0 i-- ETH IPV4 => VF -5. Send a matched packet in scapy to VF1, and check the VF1 of DUT can receive the packet:: +5. Send a matched packet in scapy to VF1, and check the VF1 of DUT can receive the packet. Tester:: - >>> sendp([Ether(src="00:11:22:33:44:55", dst="C6:44:32:0A:EC:E1")/IP(src="192.168.0.2", dst="192.168.0.3")/("X"*64)],iface="ens260f0",count=1,inter=0,verbose=False) + >>> sendp([Ether(src="",dst="")/IP(src="",dst="")/("X"*64)], iface="") the VF1 of DUT:: @@ -1487,7 +1505,12 @@ The common steps launch one testpmd and kill DCF process, then relaunch one test 1. Launch the userland ``testpmd`` application on DUT as follows:: - # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -v -c 0x6 -n 4 -a 3b:01.0,cap=dcf -a 3b:01.1 --file-prefix=dcf -- -i + /app/dpdk-testpmd -a -- -i + +..note:: + + For , you can use "-c 0x6 -n 4", you can also refer to testpmd doc for other setings. + For , you can use"-a 3b:01.0,cap=dcf -a 3b:01.1 --file-prefix=dcf" for this test plan. 2. Set verbose:: @@ -1500,7 +1523,7 @@ The common steps launch one testpmd and kill DCF process, then relaunch one test 4. Validate a switch rule to VF1:: - testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1508,7 +1531,7 @@ The common steps launch one testpmd and kill DCF process, then relaunch one test 5. Create a switch rule to VF1 and list rules:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1521,11 +1544,11 @@ The common steps launch one testpmd and kill DCF process, then relaunch one test ID Group Prio Attr Rule 0 0 0 i-- ETH IPV4 => VF -6. Send a matched packet in scapy to VF1, check DUT can receive the packet:: +6. Send a matched packet in scapy to VF1, check DUT can receive the packet. Tester:: - >>> sendp([Ether(src="00:11:22:33:44:55", dst="C6:44:32:0A:EC:E1")/IP(src="192.168.0.2", dst="192.168.0.3")/("X"*64)],iface="ens260f0",count=1,inter=0,verbose=False) + >>> sendp([Ether(src="",dst="")/IP(src="",dst="")/("X"*64)], iface="") DUT:: @@ -1533,41 +1556,47 @@ DUT:: src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 - l2_len=14 - l3_len=20 - Receive queue=0x0 ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN -7. Check the process ID and kill DCF process:: +Test Case 6: one_testpmd_dcf_reset_port +--------------------------------------- +The test case resets DCF by killing DCF and resetting the port, and DCF should clean up all old rules. + +Test Steps +~~~~~~~~~~ +1. Check the process ID and kill DCF process:: # ps -ef |grep testpmd # kill -9 ##### -8. Relaunch the userland ``testpmd`` application on DUT as follows:: +2. Relaunch the userland ``testpmd`` application on DUT as follows:: + + /app/dpdk-testpmd -a -- -i + +..note:: - # ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -v -c 0x6 -n 4 -a 3b:01.0,cap=dcf -a 3b:01.1 --file-prefix=dcf -- -i + For , you can use "-c 0x6 -n 4", you can also refer to testpmd doc for other setings. + For , you can use"-a 3b:01.0,cap=dcf -a 3b:01.1 --file-prefix=dcf" for this test plan. -9. Set verbose:: +3. Set verbose:: testpmd> set verbose 1 -10. Set fwd engine and start:: +4. Set fwd engine and start:: testpmd> set fwd mac testpmd> start + testpmd> flow list 0 -11. Send a matched packet in scapy to VF1, DCF flow rule is cleared and check DUT can't receive the packet:: +5. Send a matched packet in scapy to VF1, DCF flow rule is cleared and check DUT can't receive the packet. Tester:: - >>> sendp([Ether(src="00:11:22:33:44:55", dst="C6:44:32:0A:EC:E1")/IP(src="192.168.0.2", dst="192.168.0.3")/("X"*64)],iface="ens260f0",count=1,inter=0,verbose=False) + >>> sendp([Ether(src="",dst="")/IP(src="",dst="")/("X"*64)], iface="") DUT:: testpmd> -Test Case 6: one_testpmd_dcf_reset_port ---------------------------------------- -The test case resets DCF by resetting the port, and DCF should clean up all old rules. - -Test Steps -~~~~~~~~~~ -1. Reset port in testpmd:: +6. Reset port in testpmd:: testpmd> stop testpmd> port stop all @@ -1575,17 +1604,17 @@ Test Steps testpmd> port start all testpmd> start -2. Validate a switch rule to VF1:: +7. Validate a switch rule to VF1:: - testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: Flow rule validated -3. Create a switch rule to VF1 and list rules:: +8. Create a switch rule to VF1 and list rules:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1598,11 +1627,11 @@ Test Steps ID Group Prio Attr Rule 0 0 0 i-- ETH IPV4 => VF -4. Send a matched packet in scapy to VF1, and check DUT can receive the packet:: +9. Send a matched packet in scapy to VF1, and check DUT can receive the packet. Tester:: - >>> sendp([Ether(src="00:11:22:33:44:55", dst="C6:44:32:0A:EC:E1")/IP(src="192.168.0.2", dst="192.168.0.3")/("X"*64)],iface="ens260f0",count=1,inter=0,verbose=False) + >>> sendp([Ether(src="",dst="")/IP(src="",dst="")/("X"*64)], iface="") DUT:: @@ -1627,10 +1656,11 @@ Test Steps testpmd> port reset all testpmd> port start all testpmd> start + testpmd> flow list 0 3. Validate a switch rule to VF1:: - testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1638,7 +1668,7 @@ Test Steps 4. Create a switch rule to VF1 and list rules:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1651,11 +1681,11 @@ Test Steps ID Group Prio Attr Rule 0 0 0 i-- ETH IPV4 => VF -5. Send a matched packet in scapy to VF1, and check DUT can receive the packet:: +5. Send a matched packet in scapy to VF1, and check DUT can receive the packet. Tester:: - >>> sendp([Ether(src="00:11:22:33:44:55", dst="C6:44:32:0A:EC:E1")/IP(src="192.168.0.2", dst="192.168.0.3")/("X"*64)],iface="ens260f0",count=1,inter=0,verbose=False) + >>> sendp([Ether(src="",dst="")/IP(src="",dst="")/("X"*64)], iface="") DUT:: @@ -1682,10 +1712,11 @@ Test Steps testpmd> port reset 0 testpmd> port start 0 testpmd> start + testpmd> flow list 0 3. Validate a switch rule to VF1:: - testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1693,7 +1724,7 @@ Test Steps 4. Create a switch rule to VF1 and list rules:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1706,11 +1737,11 @@ Test Steps ID Group Prio Attr Rule 0 0 0 i-- ETH IPV4 => VF -5. Send a matched packet in scapy to VF1, and check DUT can receive the packet:: +5. Send a matched packet in scapy to VF1, and check DUT can receive the packet. Tester:: - >>> sendp([Ether(src="00:11:22:33:44:55", dst="C6:44:32:0A:EC:E1")/IP(src="192.168.0.2", dst="192.168.0.3")/("X"*64)],iface="ens260f0",count=1,inter=0,verbose=False) + >>> sendp([Ether(src="",dst="")/IP(src="",dst="")/("X"*64)], iface="") DUT:: @@ -1735,10 +1766,11 @@ Test Steps testpmd> port reset all testpmd> port start all testpmd> start - + testpmd> flow list 0 + 3. Validate a switch rule to VF1:: - testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1746,7 +1778,7 @@ Test Steps 4. Create a switch rule to VF1 and list rules:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1759,13 +1791,13 @@ Test Steps ID Group Prio Attr Rule 0 0 0 i-- ETH IPV4 => VF -5. Send a matched packet in scapy to VF1, and check DUT can receive the packet:: +5. Send a matched packet in scapy to VF1, and check DUT can receive the packet. Tester:: - >>> sendp([Ether(src="00:11:22:33:44:55", dst="C6:44:32:0A:EC:E1")/IP(src="192.168.0.2", dst="192.168.0.3")/("X"*64)],iface="ens260f0",count=1,inter=0,verbose=False) + >>> sendp([Ether(src="",dst="")/IP(src="",dst="")/("X"*64)], iface="") -DUT:: +:wqDUT:: testpmd> port 1/queue 0: received 1 packets src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 - l2_len=14 - l3_len=20 - Receive queue=0x0 @@ -1788,10 +1820,11 @@ Test Steps testpmd> port reset all testpmd> port start all testpmd> start + testpmd> flow list 0 3. Validate a switch rule to VF1:: - testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1799,7 +1832,7 @@ Test Steps 4. Create a switch rule to VF1 and list rules:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is dst is / end actions vf id 1 / end Get the message:: @@ -1812,11 +1845,11 @@ Test Steps ID Group Prio Attr Rule 0 0 0 i-- ETH IPV4 => VF -5. Send a matched packet in scapy to VF1, and check DUT can receive the packet:: +5. Send a matched packet in scapy to VF1, and check DUT can receive the packet. Tester:: - >>> sendp([Ether(src="00:11:22:33:44:55", dst="C6:44:32:0A:EC:E1")/IP(src="192.168.0.2", dst="192.168.0.3")/("X"*64)],iface="ens260f0",count=1,inter=0,verbose=False) + >>> sendp([Ether(src="",dst="")/IP(src="",dst="")/("X"*64)], iface="") DUT:: @@ -1824,4 +1857,4 @@ DUT:: src=00:11:22:33:44:55 - dst=C6:44:32:0A:EC:E1 - type=0x0800 - length=98 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 - l2_len=14 - l3_len=20 - Receive queue=0x0 ol_flags: RTE_MBUF_F_RX_L4_CKSUM_GOOD RTE_MBUF_F_RX_IP_CKSUM_GOOD RTE_MBUF_F_RX_OUTER_L4_CKSUM_UNKNOWN - +