From patchwork Mon Jul 18 02:54:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 113991 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 E708EA0547; Mon, 18 Jul 2022 04:55:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E15FE40F1A; Mon, 18 Jul 2022 04:55:03 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 0DCE240F1A for ; Mon, 18 Jul 2022 04:55:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658112902; x=1689648902; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=jv6l9W3NV6ua1X3Qyn2u82FufPwb5+9EDAtmTEx2FNM=; b=BgthZ2psBPD3dAVBGqQ/sAPZ3ysWyt29BS/UjJrPizqdjajBffDfBGq9 1z8hPDHFSxI5RPYB9LpEZABYLs81rVq7Pi1ZK/413VPu/iwELz3GGgxNq X679IbIJJ8dLvsKjyvqN0Tvx2tsCXcGYG4g/vSEn9IudbuS9dLJ5UqSl4 f/PsMsjHXh6yBIo9VfiXE2ITrUIwwYdLzNCiGveAah7HGGWL8PUZALCn6 hv6cRLUcoxIqDAFCkE43wLzKAIDKWxcJkeXfZkc8GaubIsKUNTVOemMNT WOzkvoTwTb3J36OVEkXs75r29fcZhCbNK7KO6clqSyqdZn74rF6rrkZez A==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="311796677" X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="311796677" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:01 -0700 X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="624541942" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:54:59 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 01/12] tests/kernelpf_iavf: update dts code for dpdk csum change Date: Mon, 18 Jul 2022 10:54:36 +0800 Message-Id: <20220718025447.13287-1-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 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 According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify the script adapt to this chagne. 1. Modify VF case to enable promisc. 2. Modify PF case to send packet dst mac is random. Signed-off-by: Weiyuan Li --- tests/TestSuite_kernelpf_iavf.py | 46 ++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py index d7d17ac4..57944770 100644 --- a/tests/TestSuite_kernelpf_iavf.py +++ b/tests/TestSuite_kernelpf_iavf.py @@ -75,6 +75,14 @@ class TestKernelpfIavf(TestCase): self.flag = "vf-vlan-pruning" self.default_stats = self.dut.get_priv_flags_state(self.host_intf, self.flag) + def ip_link_set(self, host_intf=None, cmd=None, port=None, types=None, value=0): + if host_intf is None or cmd is None or port is None or types is None: + return + set_command = f"ip link set {host_intf} {cmd} {port} {types} {value}" + out = self.dut.send_expect(set_command, "# ") + if "RTNETLINK answers: Invalid argument" in out: + self.dut.send_expect(set_command, "# ") + def set_up(self): if self.running_case == "test_vf_mac_filter": @@ -120,6 +128,22 @@ class TestKernelpfIavf(TestCase): "ip link set %s vf 0 mac %s" % (self.host_intf, self.vf_mac), "# " ) + if self.running_case == "test_vf_tso": + self.host_intf_0 = self.dut.ports_info[self.used_dut_port]["intf"] + self.ip_link_set( + host_intf=self.host_intf_0, + cmd="vf", + port=0, + types="trust", + value="on", + ) + self.ip_link_set( + host_intf=self.host_intf_0, + cmd="vf", + port=0, + types="spoofchk", + value="off", + ) try: for port in self.sriov_vfs_port: @@ -656,9 +680,10 @@ class TestKernelpfIavf(TestCase): self.tester.scapy_foreground() time.sleep(5) self.start_tcpdump(self.tester_intf) + vf_mac = "00:01:23:45:67:80" pkt = ( - 'sendp([Ether(dst="%s")/IP(chksum=0x1234)/TCP(flags=0x10,chksum=0x1234)/' - 'Raw(RandString(5214))], iface="%s")' % (self.vf_mac, self.tester_intf) + 'sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x1234)/TCP(flags=0x10,chksum=0x1234)/' + 'Raw(RandString(5214))], iface="%s")' % (vf_mac, self.tester_intf) ) self.tester.scapy_append(pkt) self.tester.scapy_execute() @@ -927,6 +952,23 @@ class TestKernelpfIavf(TestCase): self.destroy_vm_env() self.dut.send_expect("ip link set dev %s vf 0 trust off" % self.host_intf, "# ") + if self.running_case == "test_vf_tso": + self.host_intf_0 = self.dut.ports_info[self.used_dut_port]["intf"] + self.ip_link_set( + host_intf=self.host_intf_0, + cmd="vf", + port=0, + types="trust", + value="off", + ) + self.ip_link_set( + host_intf=self.host_intf_0, + cmd="vf", + port=0, + types="spoofchk", + value="on", + ) + def tear_down_all(self): """ When the case of this test suite finished, the environment should From patchwork Mon Jul 18 02:54:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 113992 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 24C04A0547; Mon, 18 Jul 2022 04:55:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 16AF540E25; Mon, 18 Jul 2022 04:55:06 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 3891C40E25 for ; Mon, 18 Jul 2022 04:55:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658112903; x=1689648903; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TkHF8ffHKVHzOtPKNKuwoBRJrMXr3+gcX9RkmtXm+JY=; b=AX/kHMtXaBMWsIa8g9RCwHqDMOjpbZ1yrTJ3QSckKdSuwE0VjYSmZoYa hlQPCEd/W2pNCwuL1VZ9+xaCoN5VfOmUpKQFRgrRwEKV2uAzq8jwKpfSb KcHtq0k646ZbeMWlsR9lg+8FmLYhihEXMJwj557E/0xaxaQtCAXoWgJsr +d9NWiQzaVgGvexKan6Klu7t7mW/QcT1I1314jHXj7pF2cP2pOqht+rZu mMFXsN4voZNL5HsiignNhtjURg8O4J/GGhvlz5y1NwqKhC6SND3bIVSvX 9Wc30JKuaIplPf/wCztzZO2F9i93Yj2651YaT7fZm/ZQG+xiTRQQLqghc A==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="311796679" X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="311796679" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:02 -0700 X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="624541965" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:01 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 02/12] tests/vf_offload: update dts code for dpdk csum change Date: Mon, 18 Jul 2022 10:54:37 +0800 Message-Id: <20220718025447.13287-2-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220718025447.13287-1-weiyuanx.li@intel.com> References: <20220718025447.13287-1-weiyuanx.li@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 According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify the script adapt to this chagne. 1. Modify VF case to enable promisc. 2. Modify PF case to send packet dst mac is random. Signed-off-by: Weiyuan Li --- tests/TestSuite_vf_offload.py | 106 ++++++++++++++++++++++++---------- 1 file changed, 76 insertions(+), 30 deletions(-) diff --git a/tests/TestSuite_vf_offload.py b/tests/TestSuite_vf_offload.py index 4dd05cac..393e68a4 100644 --- a/tests/TestSuite_vf_offload.py +++ b/tests/TestSuite_vf_offload.py @@ -43,7 +43,7 @@ class TestVfOffload(TestCase): self.setup_2pf_2vf_1vm_env_flag = 0 self.setup_2pf_2vf_1vm_env(driver="") self.vm0_dut_ports = self.vm_dut_0.get_ports("any") - self.portMask = utils.create_mask([self.vm0_dut_ports[0]]) + self.portMask = utils.create_mask(self.vm0_dut_ports) self.vm0_testpmd = PmdOutput(self.vm_dut_0) self.tester.send_expect( "ifconfig %s mtu %s" @@ -59,6 +59,14 @@ class TestVfOffload(TestCase): def set_up(self): pass + def ip_link_set(self, host_intf=None, cmd=None, port=None, types=None, value=0): + if host_intf is None or cmd is None or port is None or types is None: + return + set_command = f"ip link set {host_intf} {cmd} {port} {types} {value}" + out = self.dut.send_expect(set_command, "# ") + if "RTNETLINK answers: Invalid argument" in out: + self.dut.send_expect(set_command, "# ") + def setup_2pf_2vf_1vm_env(self, driver="default"): self.used_dut_port_0 = self.dut_ports[0] @@ -68,6 +76,37 @@ class TestVfOffload(TestCase): self.dut.generate_sriov_vfs_by_port(self.used_dut_port_1, 1, driver=driver) self.sriov_vfs_port_1 = self.dut.ports_info[self.used_dut_port_1]["vfs_port"] + self.host_intf_0 = self.dut.ports_info[self.used_dut_port_0]["intf"] + self.host_intf_1 = self.dut.ports_info[self.used_dut_port_1]["intf"] + + self.ip_link_set( + host_intf=self.host_intf_0, + cmd="vf", + port=0, + types="trust", + value="on", + ) + self.ip_link_set( + host_intf=self.host_intf_1, + cmd="vf", + port=0, + types="trust", + value="on", + ) + self.ip_link_set( + host_intf=self.host_intf_0, + cmd="vf", + port=0, + types="spoofchk", + value="off", + ) + self.ip_link_set( + host_intf=self.host_intf_1, + cmd="vf", + port=0, + types="spoofchk", + value="off", + ) try: for port in self.sriov_vfs_port_0: @@ -136,6 +175,10 @@ class TestVfOffload(TestCase): dut.send_expect("csum set udp hw %d" % port, "testpmd>") dut.send_expect("csum set tcp hw %d" % port, "testpmd>") dut.send_expect("csum set sctp hw %d" % port, "testpmd>") + dut.send_expect("csum set ip hw %d" % 1, "testpmd>") + dut.send_expect("csum set udp hw %d" % 1, "testpmd>") + dut.send_expect("csum set tcp hw %d" % 1, "testpmd>") + dut.send_expect("csum set sctp hw %d" % 1, "testpmd>") dut.send_expect("port start all", "testpmd>") def checksum_enablesw(self, port, dut): @@ -144,6 +187,10 @@ class TestVfOffload(TestCase): dut.send_expect("csum set udp sw %d" % port, "testpmd>") dut.send_expect("csum set tcp sw %d" % port, "testpmd>") dut.send_expect("csum set sctp sw %d" % port, "testpmd>") + dut.send_expect("csum set ip sw %d" % 1, "testpmd>") + dut.send_expect("csum set udp sw %d" % 1, "testpmd>") + dut.send_expect("csum set tcp sw %d" % 1, "testpmd>") + dut.send_expect("csum set sctp sw %d" % 1, "testpmd>") dut.send_expect("port start all", "testpmd>") def checksum_validate(self, packets_sent, packets_expected): @@ -154,12 +201,11 @@ class TestVfOffload(TestCase): self.tester.get_local_port(self.dut_ports[0]) ) rx_interface = self.tester.get_interface( - self.tester.get_local_port(self.dut_ports[0]) + self.tester.get_local_port(self.dut_ports[1]) ) - sniff_src = self.vm0_testpmd.get_port_mac(0) checksum_pattern = re.compile("chksum.*=.*(0x[0-9a-z]+)") - + sniff_src = "52:00:00:00:00:00" chksum = dict() result = dict() @@ -175,16 +221,11 @@ class TestVfOffload(TestCase): self.tester.send_expect("exit()", "#") self.tester.scapy_background() - self.tester.scapy_append( - 'p = sniff(filter="ether src %s", iface="%s", count=%d)' - % (sniff_src, rx_interface, len(packets_sent)) + inst = self.tester.tcpdump_sniff_packets( + intf=rx_interface, + count=len(packets_sent), + filters=[{"layer": "ether", "config": {"src": sniff_src}}], ) - self.tester.scapy_append("nr_packets=len(p)") - self.tester.scapy_append( - 'reslist = [p[i].sprintf("%IP.chksum%;%TCP.chksum%;%UDP.chksum%;%SCTP.chksum%") for i in range(nr_packets)]' - ) - self.tester.scapy_append("import string") - self.tester.scapy_append('RESULT = ",".join(reslist)') # Send packet. self.tester.scapy_foreground() @@ -196,7 +237,15 @@ class TestVfOffload(TestCase): self.tester.scapy_execute() out = self.tester.scapy_get_result() - packets_received = out.split(",") + + p = self.tester.load_tcpdump_sniff_packets(inst) + nr_packets = len(p) + print(p) + packets_received = [ + p[i].sprintf("%IP.chksum%;%TCP.chksum%;%UDP.chksum%;%SCTP.chksum%") + for i in range(nr_packets) + ] + self.verify( len(packets_sent) == len(packets_received), "Unexpected Packets Drop" ) @@ -251,17 +300,15 @@ class TestVfOffload(TestCase): """ self.vm0_testpmd.start_testpmd( VM_CORES_MASK, - "--portmask=%s " % (self.portMask) - + "--enable-rx-cksum " - + "" - + "--port-topology=loop", + "--portmask=%s " % (self.portMask) + "--enable-rx-cksum " + "", ) self.vm0_testpmd.execute_cmd("set fwd csum") + self.vm0_testpmd.execute_cmd("set promisc 1 on") + self.vm0_testpmd.execute_cmd("set promisc 0 on") time.sleep(2) port_id_0 = 0 mac = self.vm0_testpmd.get_port_mac(0) - sndIP = "10.0.0.1" sndIPv6 = "::1" pkts = { @@ -280,15 +327,15 @@ class TestVfOffload(TestCase): expIP = sndIP expIPv6 = sndIPv6 pkts_ref = { - "IP/UDP": 'Ether(dst="02:00:00:00:00:00", src="%s")/IP(src="%s")/UDP()/("X"*46)' + "IP/UDP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="%s")/UDP()/("X"*46)' % (mac, expIP), - "IP/TCP": 'Ether(dst="02:00:00:00:00:00", src="%s")/IP(src="%s")/TCP()/("X"*46)' + "IP/TCP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="%s")/TCP()/("X"*46)' % (mac, expIP), - "IP/SCTP": 'Ether(dst="02:00:00:00:00:00", src="%s")/IP(src="%s")/SCTP()/("X"*48)' + "IP/SCTP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="%s")/SCTP()/("X"*48)' % (mac, expIP), - "IPv6/UDP": 'Ether(dst="02:00:00:00:00:00", src="%s")/IPv6(src="%s")/UDP()/("X"*46)' + "IPv6/UDP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="%s")/UDP()/("X"*46)' % (mac, expIPv6), - "IPv6/TCP": 'Ether(dst="02:00:00:00:00:00", src="%s")/IPv6(src="%s")/TCP()/("X"*46)' + "IPv6/TCP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="%s")/TCP()/("X"*46)' % (mac, expIPv6), } @@ -311,14 +358,13 @@ class TestVfOffload(TestCase): Enable SW checksum offload. Send same packet with incorrect checksum and verify checksum is valid. """ - self.vm0_testpmd.start_testpmd( VM_CORES_MASK, - "--portmask=%s " % (self.portMask) - + "--enable-rx-cksum " - + "--port-topology=loop", + "--portmask=%s " % (self.portMask) + "--enable-rx-cksum " + "", ) self.vm0_testpmd.execute_cmd("set fwd csum") + self.vm0_testpmd.execute_cmd("set promisc 1 on") + self.vm0_testpmd.execute_cmd("set promisc 0 on") time.sleep(2) @@ -457,7 +503,6 @@ class TestVfOffload(TestCase): ) mac = self.vm0_testpmd.get_port_mac(0) - self.vm0_testpmd.execute_cmd("set verbose 1", "testpmd> ", 120) self.vm0_testpmd.execute_cmd("port stop all", "testpmd> ", 120) self.vm0_testpmd.execute_cmd( @@ -501,7 +546,8 @@ class TestVfOffload(TestCase): self.vm0_testpmd.execute_cmd("tso set 800 %d" % self.vm0_dut_ports[1]) self.vm0_testpmd.execute_cmd("set fwd csum") self.vm0_testpmd.execute_cmd("port start all", "testpmd> ", 120) - self.vm0_testpmd.execute_cmd("set promisc all off", "testpmd> ", 120) + self.vm0_testpmd.execute_cmd("set promisc 0 on", "testpmd> ", 120) + self.vm0_testpmd.execute_cmd("set promisc 1 on", "testpmd> ", 120) self.vm0_testpmd.execute_cmd("start") self.tester.scapy_foreground() From patchwork Mon Jul 18 02:54:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 113994 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 71713A0548; Mon, 18 Jul 2022 04:55:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6B7BA415D7; Mon, 18 Jul 2022 04:55:09 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id A824F41109 for ; Mon, 18 Jul 2022 04:55:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658112907; x=1689648907; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PiljPDfk6oad5y9Ds/Cyj7Yae3OXjR7qiPMC8kuuPyE=; b=K/Ce8xvAr6P3s7rBiubJiDN1MebJIT4PuY86nXL2Ef/T3FsJRdtyGhEE 4InvGLT94Z/lvv5FYPOxcp7fwX8D5/U97MQH/mDoqmtg8YIHG4hIWEZrV KA0FDAADhDInJl05PgD7HC16Ml5OiwEI4ftSxpvFK4Sa+o8eoYmwEl0k/ HO795eHc/JACzZzydbWO33ugPNjdpDp4z1NhnQ6X6467ftnRJa1seW0iC 08MaGt2zUdjghBSdPBexedMdis4GRxvXRXmIezPt2JEcPHuVybPK6Kbz4 weBeVG1TWrh3kVCPuANL79P9WHRse53ITlymDfNSISpYaDmxcEKECB+TC g==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="311796684" X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="311796684" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:06 -0700 X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="624541974" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:03 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 03/12] tests/checksum_offload: update dts code for dpdk csum change Date: Mon, 18 Jul 2022 10:54:38 +0800 Message-Id: <20220718025447.13287-3-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220718025447.13287-1-weiyuanx.li@intel.com> References: <20220718025447.13287-1-weiyuanx.li@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 According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify the script adapt to this chagne. 1. Modify VF case to enable promisc. 2. Modify PF case to send packet dst mac is random. Signed-off-by: Weiyuan Li --- tests/TestSuite_checksum_offload.py | 31 ++++++++++++++++++----------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py index 3554f5eb..ffc48b96 100644 --- a/tests/TestSuite_checksum_offload.py +++ b/tests/TestSuite_checksum_offload.py @@ -76,6 +76,7 @@ class TestChecksumOffload(TestCase): self.output_path = os.sep.join([cur_path, self.logger.log_path]) # log debug used self.count = 0 + self.src_mac = "52:00:00:00:00:00" def set_up(self): """ @@ -204,15 +205,14 @@ class TestChecksumOffload(TestCase): self.tester.get_local_port(self.dut_ports[0]) ) - sniff_src = self.dut.get_mac_address(self.dut_ports[0]) + sniff_src = "52:00:00:00:00:00" result = dict() chksum = self.get_chksum_values(packets_expected) - inst = self.tester.tcpdump_sniff_packets( intf=rx_interface, count=len(packets_sent) * 4, - filters=[{"layer": "ether", "config": {"src": sniff_src}}], + filters=[{"layer": "ether", "config": {"src": self.src_mac}}], ) self.pkt = packet.Packet() @@ -369,6 +369,7 @@ class TestChecksumOffload(TestCase): return self.tester.send_expect(cmd, ">>>", timeout=timeout) def get_packets(self, dut_mac, tester_mac): + tester_mac = "52:00:00:00:00:00" eth = Ether(dst=dut_mac, src=tester_mac) packets = [] checksum_options = ( @@ -424,8 +425,9 @@ class TestChecksumOffload(TestCase): ): if os.path.isfile(capture_file_path): os.remove(capture_file_path) + src_mac = "52:00:00:00:00:00" self.tester.send_expect( - f"tcpdump -i '{iface}' ether src {dut_mac} -s 0 -w {capture_file_path} &", + f"tcpdump -i '{iface}' ether src {src_mac} -s 0 -w {capture_file_path} -Q in &", "# ", ) @@ -502,7 +504,8 @@ class TestChecksumOffload(TestCase): Verify that the same number of packet are correctly received on the traffic generator side. """ - mac = self.dut.get_mac_address(self.dut_ports[0]) + # mac = self.dut.get_mac_address(self.dut_ports[0]) + mac = "23:00:00:00:00:00" pktsChkErr = { "IP/UDP": 'Ether(dst="%s", src="52:00:00:00:00:00")/Dot1Q(vlan=1)/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)' @@ -546,7 +549,7 @@ class TestChecksumOffload(TestCase): transmit packet.Enable Checksum offload. Verify the checksum valid-flags. """ - mac = self.dut.get_mac_address(self.dut_ports[0]) + mac = "23:00:00:00:00:00" pkts_ref = { "IP/UDP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IP()/UDP()/("X"*46)' @@ -611,7 +614,7 @@ class TestChecksumOffload(TestCase): Verify that the same number of packet are correctly received on the traffic generator side. """ - mac = self.dut.get_mac_address(self.dut_ports[0]) + mac = "23:00:00:00:00:00" pkts = { "IP/UDP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)' @@ -660,7 +663,7 @@ class TestChecksumOffload(TestCase): Verify that the same number of packet are correctly received on the traffic generator side. """ - mac = self.dut.get_mac_address(self.dut_ports[0]) + mac = "23:00:00:00:00:00" sndIP = "10.0.0.1" sndIPv6 = "::1" sndPkts = { @@ -818,7 +821,8 @@ class TestChecksumOffload(TestCase): iface = self.tester.get_interface(self.tester.get_local_port(self.dut_ports[0])) dut_mac = self.dut.get_mac_address(self.dut_ports[0]) tester_mac = self.tester.get_mac(self.tester.get_local_port(self.dut_ports[0])) - + dut_mac = "23:00:00:00:00:00" + tester_mac = "52:00:00:00:00:00" self.scapy_exec(f"eth = Ether(dst='{dut_mac}', src='{tester_mac}')") self.scapy_exec(f"iface = '{iface}'") @@ -850,6 +854,8 @@ class TestChecksumOffload(TestCase): iface = self.tester.get_interface(self.tester.get_local_port(self.dut_ports[0])) dut_mac = self.dut.get_mac_address(self.dut_ports[0]) tester_mac = self.tester.get_mac(self.tester.get_local_port(self.dut_ports[0])) + dut_mac = "23:00:00:00:00:00" + tester_mac = "52:00:00:00:00:00" eth = Ether(dst=dut_mac, src=tester_mac) checksum_options = ( @@ -905,7 +911,8 @@ class TestChecksumOffload(TestCase): iface = self.tester.get_interface(self.tester.get_local_port(self.dut_ports[0])) dut_mac = self.dut.get_mac_address(self.dut_ports[0]) tester_mac = self.tester.get_mac(self.tester.get_local_port(self.dut_ports[0])) - + dut_mac = "23:00:00:00:00:00" + tester_mac = "52:00:00:00:00:00" self.tester.send_expect("scapy", ">>> ") self.scapy_exec(f"eth = Ether(dst='{dut_mac}', src='{tester_mac}')") self.scapy_exec(f"iface = '{iface}'") @@ -1005,7 +1012,8 @@ class TestChecksumOffload(TestCase): iface = self.tester.get_interface(self.tester.get_local_port(self.dut_ports[0])) dut_mac = self.dut.get_mac_address(self.dut_ports[0]) tester_mac = self.tester.get_mac(self.tester.get_local_port(self.dut_ports[0])) - + dut_mac = "23:00:00:00:00:00" + tester_mac = "52:00:00:00:00:00" packets = self.get_packets(dut_mac, tester_mac) capture_file_name = "test_hardware_checksum_check_l4_tx_capture.pcap" @@ -1022,7 +1030,6 @@ class TestChecksumOffload(TestCase): ) captured_packets = rdpcap("output/tmp/pcap/" + capture_file_name) - self.verify( len(packets) == len(captured_packets), "Not all packets were received" ) From patchwork Mon Jul 18 02:54:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 113993 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 54D57A0547; Mon, 18 Jul 2022 04:55:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F97A410F6; Mon, 18 Jul 2022 04:55:09 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 1B00B4069F for ; Mon, 18 Jul 2022 04:55:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658112907; x=1689648907; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wRWE2bJF6MzSrtnw0AJtDawVo8MxdZu7OfTO89/IiYw=; b=M3TRq+mxAYQytRzUI1RUKKpa41Eba4XXQ5rXIvjYTEwjHt3JZXqqa3G9 ysvrKX6wspTj/xUZzQxSnu/UbuGBQQnAzL/Jm8ugnnUJZxGmDN41vOC5i 4rh+XMGkYT59Jl1jUktJELVAY831W7JjD9bnzf9Ql045CMJvXCE2yiJHm 8gzZbA17rXYaWx0f9hNVGbzKcZN1dhwmc497sWyueuh5ngv12soxldlxr Dn/sn+t30Jw4O71wulU7DjLfMtVFAVbJEU8etIXTni59x42uDnrBwyCbD hagu69o/tdq38VDV93AALbEqTz22D5yM1Rjrcg+e+fOWVfyntacBpCecA A==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="287263497" X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="287263497" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:06 -0700 X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="624541985" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:04 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 04/12] tests/ice_advanced_iavf_rss: update dts code for dpdk csum change Date: Mon, 18 Jul 2022 10:54:39 +0800 Message-Id: <20220718025447.13287-4-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220718025447.13287-1-weiyuanx.li@intel.com> References: <20220718025447.13287-1-weiyuanx.li@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 According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify the script adapt to this chagne. 1. Modify VF case to enable promisc. 2. Modify PF case to send packet dst mac is random. Signed-off-by: Weiyuan Li --- tests/TestSuite_ice_advanced_iavf_rss.py | 70 +++++++++++++++++++----- 1 file changed, 56 insertions(+), 14 deletions(-) diff --git a/tests/TestSuite_ice_advanced_iavf_rss.py b/tests/TestSuite_ice_advanced_iavf_rss.py index e560c9e6..5ed68d1c 100644 --- a/tests/TestSuite_ice_advanced_iavf_rss.py +++ b/tests/TestSuite_ice_advanced_iavf_rss.py @@ -5781,10 +5781,34 @@ class AdvancedIavfRSSTest(TestCase): self.vf_flag = False self.create_iavf() + def ip_link_set(self, host_intf=None, cmd=None, port=None, types=None, value=0): + if host_intf is None or cmd is None or port is None or types is None: + return + set_command = f"ip link set {host_intf} {cmd} {port} {types} {value}" + out = self.dut.send_expect(set_command, "# ") + if "RTNETLINK answers: Invalid argument" in out: + self.dut.send_expect(set_command, "# ") + def set_up(self): """ Run before each test case. """ + if self.running_case == "test_flow_rule_not_impact_rx_tx_chksum": + self.host_intf_0 = self.dut.ports_info[self.used_dut_port]["intf"] + self.ip_link_set( + host_intf=self.host_intf_0, + cmd="vf", + port=0, + types="trust", + value="on", + ) + self.ip_link_set( + host_intf=self.host_intf_0, + cmd="vf", + port=0, + types="spoofchk", + value="off", + ) self.pkt = Packet() self.pmd_output = PmdOutput(self.dut) self.launch_testpmd() @@ -6371,6 +6395,7 @@ class AdvancedIavfRSSTest(TestCase): checksum_pattern = re.compile("chksum.*=.*(0x[0-9a-z]+)") self.tester.send_expect("scapy", ">>> ") sniff_src = self.dut.get_mac_address(self.dut_ports[0]) + vf0_mac = "52:00:00:00:00:00" for pkt in expect_pkts: self.tester.send_expect("p = %s" % expect_pkts[pkt], ">>>") out = self.tester.send_expect("p.show2()", ">>>") @@ -6418,23 +6443,24 @@ class AdvancedIavfRSSTest(TestCase): self.pmd_output.execute_cmd("csum set sctp hw 0") self.pmd_output.execute_cmd("port start all") self.pmd_output.execute_cmd("start") + random_dst_mac = "00:11:22:33:44:56" pkt_list = { - "IP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48)', - "IP/TCP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22, chksum=0xfff3)/("X"*48)', - "IP/UDP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22, chksum=0x1)/("X"*48)', - "IP/SCTP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22, chksum=0x0)/("X"*48)', - "IPv6/TCP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48)', - "IPv6/UDP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48)', - "IPv6/SCTP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22, chksum=0x0)/("X"*48)', + "IP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48)', + "IP/TCP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22, chksum=0xfff3)/("X"*48)', + "IP/UDP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22, chksum=0x1)/("X"*48)', + "IP/SCTP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22, chksum=0x0)/("X"*48)', + "IPv6/TCP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48)', + "IPv6/UDP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48)', + "IPv6/SCTP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22, chksum=0x0)/("X"*48)', } expect_pkt = { - "IP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48)', - "IP/TCP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22)/("X"*48)', - "IP/UDP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22)/("X"*48)', - "IP/SCTP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22)/("X"*48)', - "IPv6/TCP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22)/("X"*48)', - "IPv6/UDP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22)/("X"*48)', - "IPv6/SCTP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22)/("X"*48)', + "IP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48)', + "IP/TCP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22)/("X"*48)', + "IP/UDP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22)/("X"*48)', + "IP/SCTP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22)/("X"*48)', + "IPv6/TCP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22)/("X"*48)', + "IPv6/UDP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22)/("X"*48)', + "IPv6/SCTP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22)/("X"*48)', } rule_list = [ "flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-chksum end queues end / end", @@ -6631,6 +6657,22 @@ class AdvancedIavfRSSTest(TestCase): self.dut.send_command("clear port stats all", timeout=1) self.pmd_output.execute_cmd("stop") self.pmd_output.execute_cmd("quit", "#") + if self.running_case == "test_flow_rule_not_impact_rx_tx_chksum": + self.host_intf_0 = self.dut.ports_info[self.used_dut_port]["intf"] + self.ip_link_set( + host_intf=self.host_intf_0, + cmd="vf", + port=0, + types="trust", + value="off", + ) + self.ip_link_set( + host_intf=self.host_intf_0, + cmd="vf", + port=0, + types="spoofchk", + value="on", + ) def tear_down_all(self): self.dut.kill_all() From patchwork Mon Jul 18 02:54:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 113995 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 9D0F3A0552; Mon, 18 Jul 2022 04:55:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 94D5D41181; Mon, 18 Jul 2022 04:55:10 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id D362A4069F for ; Mon, 18 Jul 2022 04:55:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658112909; x=1689648909; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lq5crEKXCCNC6S56cGhqxReNtzCEkROFWO2gCzFzBxw=; b=TGUUgU4Mpf9QXEWQi501OHqf//MF4wDOZJOKANuswnU4sWwSZpCcRsBP V+MhcnstEXWaICPG+Eb54J7MW+57or27nP8Btza1T7/J0eBVZjenn+GQP gPaOJZYwtKA33XMas6hmeParMPo3pegE8E98FlpOgaV8Yt3cES6y+wLA7 brYNeOB7PT8GLvXo0NnOAOVUs0NTetSMGlArbTgOThPluutIBK/2MJcvl 2cI9Ef8sUDgDexjoS3Za4pIVpDxYUPcyjGScuJXqLNOuOREJb04oKv6i7 5PNQGOyeioq5igHe80qd+jOw0nEGWWAcOtxSaFVOHwW9UUVQvoOCfiX/q A==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="286855698" X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="286855698" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:08 -0700 X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="624541999" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:06 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 05/12] tests/ice_advanced_rss: update dts code for dpdk csum change Date: Mon, 18 Jul 2022 10:54:40 +0800 Message-Id: <20220718025447.13287-5-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220718025447.13287-1-weiyuanx.li@intel.com> References: <20220718025447.13287-1-weiyuanx.li@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 According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify the script adapt to this chagne. 1. Modify VF case to enable promisc. 2. Modify PF case to send packet dst mac is random. Signed-off-by: Weiyuan Li --- tests/TestSuite_ice_advanced_rss.py | 30 +++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/tests/TestSuite_ice_advanced_rss.py b/tests/TestSuite_ice_advanced_rss.py index 0c246cca..2adad457 100644 --- a/tests/TestSuite_ice_advanced_rss.py +++ b/tests/TestSuite_ice_advanced_rss.py @@ -5494,6 +5494,7 @@ class AdvancedRSSTest(TestCase): checksum_pattern = re.compile("chksum.*=.*(0x[0-9a-z]+)") self.tester.send_expect("scapy", ">>> ") sniff_src = self.dut.get_mac_address(self.dut_ports[0]) + sniff_src = "52:00:00:00:00:00" for pkt in expect_pkts: self.tester.send_expect("p = %s" % expect_pkts[pkt], ">>>") out = self.tester.send_expect("p.show2()", ">>>") @@ -5541,23 +5542,24 @@ class AdvancedRSSTest(TestCase): self.pmd_output.execute_cmd("csum set sctp hw 0") self.pmd_output.execute_cmd("port start all") self.pmd_output.execute_cmd("start") + random_dst_mac = "00:11:22:33:44:56" pkt_list = { - "IP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48)', - "IP/TCP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22, chksum=0xfff3)/("X"*48)', - "IP/UDP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22, chksum=0x1)/("X"*48)', - "IP/SCTP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22, chksum=0x0)/("X"*48)', - "IPv6/TCP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48)', - "IPv6/UDP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48)', - "IPv6/SCTP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22, chksum=0x0)/("X"*48)', + "IP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48)', + "IP/TCP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22, chksum=0xfff3)/("X"*48)', + "IP/UDP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22, chksum=0x1)/("X"*48)', + "IP/SCTP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22, chksum=0x0)/("X"*48)', + "IPv6/TCP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48)', + "IPv6/UDP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48)', + "IPv6/SCTP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22, chksum=0x0)/("X"*48)', } expect_pkt = { - "IP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48)', - "IP/TCP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22)/("X"*48)', - "IP/UDP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22)/("X"*48)', - "IP/SCTP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22)/("X"*48)', - "IPv6/TCP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22)/("X"*48)', - "IPv6/UDP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22)/("X"*48)', - "IPv6/SCTP": 'Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22)/("X"*48)', + "IP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48)', + "IP/TCP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22)/("X"*48)', + "IP/UDP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22)/("X"*48)', + "IP/SCTP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22)/("X"*48)', + "IPv6/TCP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22)/("X"*48)', + "IPv6/UDP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22)/("X"*48)', + "IPv6/SCTP": f'Ether(dst="{random_dst_mac}", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22)/("X"*48)', } rule_list = [ "flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-chksum end queues end / end", From patchwork Mon Jul 18 02:54:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 113996 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 CC832A0556; Mon, 18 Jul 2022 04:55:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BAA9642B77; Mon, 18 Jul 2022 04:55:10 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id E57BF410E6 for ; Mon, 18 Jul 2022 04:55:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658112910; x=1689648910; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gQ08WI5hJCMW/UQZghy/xjtEVFf6J2ST3TBAgITma8s=; b=YAhZpEcblk9Rf7XA5rHMo1PEq0NhSbNm5VDZduuyx3pJoB5ZTtSSyFKC ehLJ1l8u+NzoRFWpRui2JYjHThl/TDswxFi40rCzfp7pNi8QOF2MeGNFK t+cCL96bHvCTfaZlJBsC/rzIvSlu/HLzsuqzb0dW9DqwbdauIniQRi9nO 2n/rBqR3BMdYVqf9+zptCcaM1cFk5giFYJtCBm3g5Xc1t1sZy1ej0Kwup pAFVwhVNNCX9xidwQdXaauzfLnkG6EsRv3agWtcUmcF9qlorq7mIfF2P5 XQkYMFtWKL/F9kXS4xAXDMU7HKll8hfJYj89A+mcdG2tbTrD5zUUeX8of w==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="286855700" X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="286855700" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:09 -0700 X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="624542010" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:08 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 06/12] tests/ice_iavf_fdir: update dts code for dpdk csum change Date: Mon, 18 Jul 2022 10:54:41 +0800 Message-Id: <20220718025447.13287-6-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220718025447.13287-1-weiyuanx.li@intel.com> References: <20220718025447.13287-1-weiyuanx.li@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 According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify the script adapt to this chagne. 1. Modify VF case to enable promisc. 2. Modify PF case to send packet dst mac is random. Signed-off-by: Weiyuan Li --- tests/TestSuite_ice_iavf_fdir.py | 83 ++++++++++++++++++++++++++++++-- 1 file changed, 80 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_ice_iavf_fdir.py b/tests/TestSuite_ice_iavf_fdir.py index a4df6151..3ff7f6ad 100644 --- a/tests/TestSuite_ice_iavf_fdir.py +++ b/tests/TestSuite_ice_iavf_fdir.py @@ -8401,6 +8401,14 @@ class TestICEIAVFFdir(TestCase): self.dut_file_dir = "/tmp/" self.q_num = TXQ_RXQ_NUMBER + def ip_link_set(self, host_intf=None, cmd=None, port=None, types=None, value=0): + if host_intf is None or cmd is None or port is None or types is None: + return + set_command = f"ip link set {host_intf} {cmd} {port} {types} {value}" + out = self.dut.send_expect(set_command, "# ") + if "RTNETLINK answers: Invalid argument" in out: + self.dut.send_expect(set_command, "# ") + def set_up(self): """ Run before each test case. @@ -8422,6 +8430,42 @@ class TestICEIAVFFdir(TestCase): self.sriov_vfs_pf0 = self.dut.ports_info[self.used_dut_port_0]["vfs_port"] self.sriov_vfs_pf1 = self.dut.ports_info[self.used_dut_port_1]["vfs_port"] + self.host_intf_0 = self.dut.ports_info[self.used_dut_port_0]["intf"] + self.host_intf_1 = self.dut.ports_info[self.used_dut_port_0]["intf"] + + if self.running_case in [ + "test_pfcp_vlan_strip_off_sw_checksum", + "test_pfcp_vlan_strip_on_hw_checksum", + ]: + self.ip_link_set( + host_intf=self.host_intf_0, + cmd="vf", + port=0, + types="trust", + value="on", + ) + self.ip_link_set( + host_intf=self.host_intf_0, + cmd="vf", + port=0, + types="spoofchk", + value="off", + ) + self.ip_link_set( + host_intf=self.host_intf_1, + cmd="vf", + port=0, + types="trust", + value="on", + ) + self.ip_link_set( + host_intf=self.host_intf_1, + cmd="vf", + port=0, + types="spoofchk", + value="off", + ) + self.dut.send_expect( "ip link set %s vf 0 mac 00:11:22:33:44:55" % self.pf0_intf, "#" ) @@ -10791,7 +10835,7 @@ class TestICEIAVFFdir(TestCase): tx_interface = self.tester_iface0 rx_interface = self.tester_iface0 - sniff_src = "00:11:22:33:44:55" + sniff_src = "52:00:00:00:00:00" result = dict() pkt = Packet() chksum = self.get_chksum_values(packets_expected) @@ -10896,7 +10940,7 @@ class TestICEIAVFFdir(TestCase): socket=self.ports_socket, ) vlan = 51 - mac = "00:11:22:33:44:55" + mac = "00:11:22:33:44:56" sndIP = "10.0.0.1" sndIPv6 = "::1" pkts_sent = { @@ -11051,7 +11095,7 @@ class TestICEIAVFFdir(TestCase): socket=self.ports_socket, ) vlan = 51 - mac = "00:11:22:33:44:55" + mac = "00:11:22:33:44:56" sndIP = "10.0.0.1" sndIPv6 = "::1" pkts_sent = { @@ -11610,6 +11654,39 @@ class TestICEIAVFFdir(TestCase): if getattr(self, "session_third", None): self.dut.close_session(self.session_third) + if self.running_case in [ + "test_pfcp_vlan_strip_off_sw_checksum", + "test_pfcp_vlan_strip_on_hw_checksum", + ]: + self.ip_link_set( + host_intf=self.host_intf_0, + cmd="vf", + port=0, + types="trust", + value="off", + ) + self.ip_link_set( + host_intf=self.host_intf_0, + cmd="vf", + port=0, + types="spoofchk", + value="on", + ) + self.ip_link_set( + host_intf=self.host_intf_1, + cmd="vf", + port=0, + types="trust", + value="off", + ) + self.ip_link_set( + host_intf=self.host_intf_1, + cmd="vf", + port=0, + types="spoofchk", + value="on", + ) + def tear_down_all(self): self.dut.kill_all() self.destroy_env() From patchwork Mon Jul 18 02:54:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 113997 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 14E28A0547; Mon, 18 Jul 2022 04:55:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C16B410E6; Mon, 18 Jul 2022 04:55:13 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 7F0044069F for ; Mon, 18 Jul 2022 04:55:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658112911; x=1689648911; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ruS5HvSMfIi1EMzUTSQ7K2t5Np+ORNKIw9rhvqdPRRM=; b=cIedPNuQQqeKlicCFHaRP3YHQ0Bt1lIjf0luDw/MRDntr7kDfX5HyCV/ GuwLRlJSsQSsIj9DaVGn0+CdNqH531DsegQP9+YawissuUjljFJgLAftP FXaQVqngzksgNh9Am4+xjP8syTgRrUcI+YE5k3X7ALVjQUHjXxqUoBopJ 2vbK9giN5vLthUD1exFd/Cfd6fvkeBJ1d7H2bgQrgw8qd1GsY4m6R/QFf CNfWN58OFyLrRfG2/jRlgCriyul8PU6+NvgIerROW6QnjEnHdzrixPAHL ULhux/UtbUb2hvInUU8YJWR3ilQc5SYIEI/7yXjDrhSXGYYaVdNJGlWkk g==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="286855704" X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="286855704" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:11 -0700 X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="624542021" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:09 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 07/12] tests/tx_preparation: update dts code for dpdk csum change Date: Mon, 18 Jul 2022 10:54:42 +0800 Message-Id: <20220718025447.13287-7-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220718025447.13287-1-weiyuanx.li@intel.com> References: <20220718025447.13287-1-weiyuanx.li@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 According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify the script adapt to this chagne. 1. Modify VF case to enable promisc. 2. Modify PF case to send packet dst mac is random. Signed-off-by: Weiyuan Li --- tests/TestSuite_tx_preparation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_tx_preparation.py b/tests/TestSuite_tx_preparation.py index 9b70699c..ac0680c6 100644 --- a/tests/TestSuite_tx_preparation.py +++ b/tests/TestSuite_tx_preparation.py @@ -73,7 +73,7 @@ class TestTX_preparation(TestCase): " --portmask=1 --port-topology=chained --max-pkt-len=%s --tx-offloads=0x8000" % Max_mtu, ) - self.dmac = self.dut_testpmd.get_port_mac(0) + self.dmac = "23:00:00:00:00:00" self.dut_testpmd.execute_cmd("set fwd csum") self.dut_testpmd.execute_cmd("set verbose 1") # enable ip/udp/tcp hardware checksum @@ -84,7 +84,7 @@ class TestTX_preparation(TestCase): def start_tcpdump(self, rxItf): # only sniff form dut packet and filter lldp packet - param = "ether[12:2]!=0x88cc and ether src %s" % self.dmac + param = "ether[12:2]!=0x88cc and ether dst %s -Q in" % self.dmac self.tester.send_expect("rm -rf ./getPackageByTcpdump.cap", "#") self.tester.send_expect( "tcpdump %s -i %s -n -e -vv -w\ From patchwork Mon Jul 18 02:54:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 113998 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 3373DA0548; Mon, 18 Jul 2022 04:55:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2E54142B75; Mon, 18 Jul 2022 04:55:14 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 1DB9242B75 for ; Mon, 18 Jul 2022 04:55:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658112913; x=1689648913; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BBpDp5wcTQU4+0s1qiJJrt1Vz/CV2KAWFJ6Le4LQ2wA=; b=UKLFSa/UofjHDDHDMUZQK7uIeu15W0+dE/VcwrcWW+3wA8OpaKxZzLPk GZeNAP+K6+3colLsjeAnTzrUzojJQQTd4OCiQ4n3gTkpCB3R3jX+r1G/9 fpcpHmF34uYnT5evmxKCiYLSINdZ7No+A/WV0gWYdLO9bkjMTe7eiG8il j8rEtMgfFg2kLHHEc+wjoWYzwDM+G0NsjUiBVVs72ShQa0mzWBF5R3RpD GRTqLomoOMn62x7jlRA+pHPJO5dvj3l0zWDF0GOYnHVcZoGB+gqHdui9Q 5RKwahp+HH02m5UiK981leg4eIOm6N51VNP/IT/Ji3pxR0Lasqmcttfvy g==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="286855709" X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="286855709" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:12 -0700 X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="624542032" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:11 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 08/12] test_plans/kernelpf_iavf: update dts code for dpdk csum change Date: Mon, 18 Jul 2022 10:54:43 +0800 Message-Id: <20220718025447.13287-8-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220718025447.13287-1-weiyuanx.li@intel.com> References: <20220718025447.13287-1-weiyuanx.li@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 According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify the script adapt to this chagne. Signed-off-by: Weiyuan Li --- test_plans/kernelpf_iavf_test_plan.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test_plans/kernelpf_iavf_test_plan.rst b/test_plans/kernelpf_iavf_test_plan.rst index 8c7d1ad5..18c59964 100644 --- a/test_plans/kernelpf_iavf_test_plan.rst +++ b/test_plans/kernelpf_iavf_test_plan.rst @@ -330,6 +330,11 @@ Change mtu for large packet:: ifconfig 'tester interface' mtu 9000 +IP link set VF trust on and spoofchk off on DUT:: + + ip link set $PF_INTF vf 0 trust on + ip link set $PF_INTF vf 0 spoofchk off + Launch the ``testpmd`` with the following arguments, add "--max-pkt-len" for large packet:: From patchwork Mon Jul 18 02:54:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 113999 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 543FFA0547; Mon, 18 Jul 2022 04:55:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5064242B7C; Mon, 18 Jul 2022 04:55:16 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id AD6214069F for ; Mon, 18 Jul 2022 04:55:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658112914; x=1689648914; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ml3NfBoftV02xWt+G1YSybeaSrZP7uIpuStIpacArv0=; b=JakoghPNMCyEOTgXasDQeS1tXwKHnSNi2SkDNZl6IvztT9sNThLSsnuD 0CjWJyZogmuu6PpXKCrODVGBO5p53lTCyyFwG/pN/iGYhf/fVq/uEcMd5 tkEGQaKJ9875+OBF7j7fbKHzNT5RAffDNUAfEg8+6SFJ53dW4z/hz8lTV 7Mi13et1EZHr8syOnJLafqXum8OpC2ItUUv+yDHNBTMDhhM2XXNlaaRR1 L9xxLtNksW/Zxh/nPssXXbMohjSo5eFPAF8VQMFpn7YcePvJOQeGt0Kcg gQ13infzZRqcWAOXc+cwePRz8EpDyUubnqEOsbon4FaCqYOPZZnBGAUoE w==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="286855712" X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="286855712" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:14 -0700 X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="624542050" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:13 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 09/12] test_plans/vf_offload: update dts code for dpdk csum change Date: Mon, 18 Jul 2022 10:54:44 +0800 Message-Id: <20220718025447.13287-9-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220718025447.13287-1-weiyuanx.li@intel.com> References: <20220718025447.13287-1-weiyuanx.li@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 According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify the script adapt to this chagne. Signed-off-by: Weiyuan Li --- test_plans/vf_offload_test_plan.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test_plans/vf_offload_test_plan.rst b/test_plans/vf_offload_test_plan.rst index 522fc017..d8cf8f1c 100644 --- a/test_plans/vf_offload_test_plan.rst +++ b/test_plans/vf_offload_test_plan.rst @@ -17,6 +17,11 @@ to the device under test:: modprobe vfio-pci usertools/dpdk-devbind.py --bind=vfio-pci device_bus_id +IP link set VF trust on and spoofchk off on DUT:: + + ip link set $PF_INTF vf 0 trust on + ip link set $PF_INTF vf 0 spoofchk off + Assuming that ports ``0`` and ``1`` are connected to a traffic generator, enable hardware rx checksum offload with "--enable-rx-cksum", launch the ``testpmd`` with the following arguments:: From patchwork Mon Jul 18 02:54:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 114000 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 74157A0547; Mon, 18 Jul 2022 04:55:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6FC4A410EC; Mon, 18 Jul 2022 04:55:18 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 4A0464069F for ; Mon, 18 Jul 2022 04:55:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658112916; x=1689648916; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4dzadyJqfMTRQHKfPrNSs/Htam5fqoJCyLmWDVnJ25c=; b=Fle2UNjA9ytmbHDo8MNs5og1L3/Jgw+ECgSQ+E+WMmZSjSD54KKL3OHt lk6pGP90Te5P8uQhTCIBfT8n1HOokGwH7CmM+ABxyZhnEFzdl21D6VaRI HGRIWvjWTI5s9PDQewRGKrCzlLJAyAn2i7gq0Dhy9l/M3PB8ezOf05xJO /mIX2aQ7mmHM76BU9T50NhVqCd1WsQo7YcfRBHARmJyfOGKURghvFNja0 YGE/yinh/MYvKRjkNwzDeenFimB1Z6QLFjZLTgqmcu+JVVHjfG1ou3CoF /FJqYvx/nGEElS0BsVHL/ffNXaqRvI1PD1xzMI/IFW6uDJX///oy+Is98 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="286855716" X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="286855716" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:16 -0700 X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="624542057" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:14 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 10/12] test_plans/ice_advanced_iavf_rss: update dts code for dpdk csum change Date: Mon, 18 Jul 2022 10:54:45 +0800 Message-Id: <20220718025447.13287-10-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220718025447.13287-1-weiyuanx.li@intel.com> References: <20220718025447.13287-1-weiyuanx.li@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 According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify the script adapt to this chagne. Signed-off-by: Weiyuan Li --- test_plans/ice_advanced_iavf_rss_test_plan.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test_plans/ice_advanced_iavf_rss_test_plan.rst b/test_plans/ice_advanced_iavf_rss_test_plan.rst index 2400f01a..fac4b082 100644 --- a/test_plans/ice_advanced_iavf_rss_test_plan.rst +++ b/test_plans/ice_advanced_iavf_rss_test_plan.rst @@ -310,6 +310,10 @@ Prerequisites echo 1 > /sys/bus/pci/devices/0000\:18\:00.0/sriov_numvfs ip link set enp24s0f0 vf 0 mac 00:11:22:33:44:55 + If test set HW csum flow rule does not impact RX checksum and TX checksum: + ip link set enp24s0f0 vf 0 trust on + ip link set enp24s0f0 vf 0 spoofchk off + 4. bind the VF to dpdk driver in DUT:: modprobe vfio-pci From patchwork Mon Jul 18 02:54:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 114001 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 9A991A0548; Mon, 18 Jul 2022 04:55:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F58040FAE; Mon, 18 Jul 2022 04:55:19 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id DFF154069F for ; Mon, 18 Jul 2022 04:55:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658112918; x=1689648918; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wPopa7xOGuWOUBljbbLPNgCYYxxsDz27O+6d2l/+uSY=; b=W4aqji0DKDZ9zw2l5z+o9EbN9WoPAJuVJ8SKpuL5+qxcwBm33INEnyBP PC96zHMiZkwMzSVRZj+GpU+jt3CPfl9D1gedY3WbdPOyZMd4/ayNwVTN5 ql9Gy9I7vdPmWOOq7Ol5Fdt6hnRlFcV/Or56mv9jtbNNpw2VYm8HuROfS WM+HXj6IVdoj/uq1F8MEbUPpeV5mraJ5GR9W/Eb5rLzmP7UaXVoSfBqg2 vcrNJBou384oLJg1wzSi5UwnxUX6H5NEeP4RQO78H+uSqiITiveWIhu5K s+iZpDuiaV0GfDk26Tm2C/2xW0dGjsHjnPqtnLBvbDyhWKrpg/MSJROvx A==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="286855721" X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="286855721" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:17 -0700 X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="624542065" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:16 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 11/12] test_plans/ice_advanced_rss: update dts code for dpdk csum change Date: Mon, 18 Jul 2022 10:54:46 +0800 Message-Id: <20220718025447.13287-11-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220718025447.13287-1-weiyuanx.li@intel.com> References: <20220718025447.13287-1-weiyuanx.li@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 According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify the script adapt to this chagne. Signed-off-by: Weiyuan Li --- test_plans/ice_advanced_rss_test_plan.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test_plans/ice_advanced_rss_test_plan.rst b/test_plans/ice_advanced_rss_test_plan.rst index 48dcc545..b6488573 100644 --- a/test_plans/ice_advanced_rss_test_plan.rst +++ b/test_plans/ice_advanced_rss_test_plan.rst @@ -2461,21 +2461,21 @@ Test case: Set HW csum, flow rule does not impact RX checksum and TX checksum 3. Capture the tx packet at tester port and check checksum values same as expect pkts:: take a IPV4 for example: - p = Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48) + p = Ether(dst="00:11:22:33:44:56", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48) p.show2() expect pkts checksum value: chksum= 0x3b0f - tcpdump -i ens7 'ether src 40:a6:b7:0b:76:28 and ether[12:2] != 0x88cc' -Q in -w /tmp/tester/sniff_ens7.pcap -c 7 + tcpdump -i ens7 'ether src 52:00:00:00:00:00 and ether[12:2] != 0x88cc' -Q in -w /tmp/tester/sniff_ens7.pcap -c 7 4. Send packets:: - p1=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48) - p2=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22, chksum=0xfff3)/("X"*48) - p3=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22, chksum=0x1)/("X"*48) - p4=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22, chksum=0x1)/("X"*48) - p5=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48) - p6=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48) - p7=Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22, chksum=0xf)/("X"*48) + p1=Ether(dst="00:11:22:33:44:56", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48) + p2=Ether(dst="00:11:22:33:44:56", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/TCP(sport=22, chksum=0xfff3)/("X"*48) + p3=Ether(dst="00:11:22:33:44:56", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/UDP(sport=22, chksum=0x1)/("X"*48) + p4=Ether(dst="00:11:22:33:44:56", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/SCTP(sport=22, chksum=0x1)/("X"*48) + p5=Ether(dst="00:11:22:33:44:56", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48) + p6=Ether(dst="00:11:22:33:44:56", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48) + p7=Ether(dst="00:11:22:33:44:56", src="52:00:00:00:00:00")/IPv6()/SCTP(sport=22, chksum=0xf)/("X"*48) take a IPV4 for example: get sniff_ens7.pcap checksum value: 0x3b0f From patchwork Mon Jul 18 02:54:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 114002 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 C00ADA0547; Mon, 18 Jul 2022 04:55:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB9DC40DF6; Mon, 18 Jul 2022 04:55:21 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 7B65C4069F for ; Mon, 18 Jul 2022 04:55:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658112919; x=1689648919; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nG0BCAHXbCK1i4nyhESPdx0ZQfooHSOXYNVGYpcxpEw=; b=R7V+w63H76LsIrBhidmzIq7EiwKLXD4Zt63I70mMnr4pMK2hJnfXSYdl vq7RVULGPX0oSjddwS428LOfvr1l3kBy0YWG65R/C66y1Lj+zbpeiIkC1 D2SNI2EX+KR+LBJx5NQgwm4FeTbz/B6Smne7bEE1y7ENDhvZfHCMm9kBs +ABKkiLMpnD5veDnbLXlQuujsNda0tWKYl6Ip7CKLDstniuX3c8LO7g06 eqgJi0rohcHIx1fy/QiZ+T0/nIvBTSd3wpJpHTu0cPfLQg9kzohCDjqur lTEZlg1M4F4/WrVjEfPJNXuz2mq7KUyYEdYgcwPicMHwa2ekNwGd0trww w==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="286855724" X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="286855724" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:19 -0700 X-IronPort-AV: E=Sophos;i="5.92,280,1650956400"; d="scan'208";a="624542072" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2022 19:55:17 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 12/12] test_plans/ice_iavf_fdir: update dts code for dpdk csum change Date: Mon, 18 Jul 2022 10:54:47 +0800 Message-Id: <20220718025447.13287-12-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220718025447.13287-1-weiyuanx.li@intel.com> References: <20220718025447.13287-1-weiyuanx.li@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 According to dpdk commit 9b4ea7ae77fa(app/testpmd: revert MAC update in checksum forwarding) modify the script adapt to this chagne. Signed-off-by: Weiyuan Li Tested-by: Jiale Song < songx.jiale@intel.com> --- test_plans/ice_iavf_fdir_test_plan.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test_plans/ice_iavf_fdir_test_plan.rst b/test_plans/ice_iavf_fdir_test_plan.rst index b485f899..1e788d0d 100644 --- a/test_plans/ice_iavf_fdir_test_plan.rst +++ b/test_plans/ice_iavf_fdir_test_plan.rst @@ -195,6 +195,12 @@ Prerequisites ip link set enp134s0f1 vf 0 mac 00:11:22:33:44:77 ip link set enp134s0f1 vf 1 mac 00:11:22:33:44:88 + If test set HW checksum and SW checksum: + ip link set enp24s0f0 vf 0 trust on + ip link set enp24s0f0 vf 0 spoofchk off + ip link set enp24s0f0 vf 1 trust on + ip link set enp24s0f0 vf 1 spoofchk off + 0000:86:00.0 generate 0000:86:01.0 and 0000:86:01.1 0000:86:00.1 generate 0000:86:11.0 and 0000:86:11.1 define 86:01.0 as vf00, 86:01.1 as vf01, 86:11.0 as vf10, 86:11.1 as vf11.