From patchwork Fri Aug 26 02:42:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 115440 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 CD52FA0551; Fri, 26 Aug 2022 04:43:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A43B40146; Fri, 26 Aug 2022 04:43:11 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id CF301400D6 for ; Fri, 26 Aug 2022 04:43: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=1661481790; x=1693017790; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Q0DpYI6zAynrwDTf0hYGMfM2WBSt927NBZ/MZC4hWkw=; b=enUViskSrAaQIb4uGh5zKIM5G5/7pwFTIOi24gtJ/63MTa+NDCfSwhhe v99rh/6zTbiRh3ZMdEgKqAWpQSqtsaj+hs6lRwaIBp3cN7hioKdcP/E/3 KYPNy7UPWJq5XodyRNjNB+0q0U9XoYKvt5SLnIuBD41695LVsUTVLpFWv BaJun4upxSeg9RjVbKXtSjYQbChLtOd99o8Po4AWhoRvViziSPhHJI4ZV IXfbFBnFI+O2dw7Wszq3Zfg0WX1VcacX0Z62MKhhUOdMnFdDokLM9Ypw7 sbx0+w8pV21ysTJgv0cnL7yOGzInhFobM/79COxlsfzx6YuPnniLLF86d w==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="295187340" X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="295187340" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:08 -0700 X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="671275170" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:06 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Jiale Song Subject: [dts][PATCH V2 01/10] tests/vf_offload: update dts code for dpdk csum change Date: Fri, 26 Aug 2022 10:42:59 +0800 Message-Id: <20220826024308.17447-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 --- Tested-by: Jiale Song < songx.jiale@intel.com> v2: -Added enable promisc model tests/TestSuite_vf_offload.py | 100 ++++++++++++++++++++++++---------- 1 file changed, 70 insertions(+), 30 deletions(-) diff --git a/tests/TestSuite_vf_offload.py b/tests/TestSuite_vf_offload.py index 4dd05cac..eee77c69 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: @@ -154,12 +193,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 +213,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 +229,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 +292,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,19 +319,20 @@ 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), } self.checksum_enablehw(0, self.vm_dut_0) + self.checksum_enablehw(1, self.vm_dut_0) self.vm0_testpmd.execute_cmd("start") result = self.checksum_validate(pkts, pkts_ref) @@ -311,14 +351,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) @@ -350,6 +389,7 @@ class TestVfOffload(TestCase): } self.checksum_enablesw(0, self.vm_dut_0) + self.checksum_enablesw(1, self.vm_dut_0) self.vm0_testpmd.execute_cmd("start") result = self.checksum_validate(sndPkts, expPkts) @@ -457,7 +497,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 +540,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 Fri Aug 26 02:43:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 115441 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 CA009A0552; Fri, 26 Aug 2022 04:43:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C13FE410D0; Fri, 26 Aug 2022 04:43:12 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 53C0A400D6 for ; Fri, 26 Aug 2022 04:43: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=1661481791; x=1693017791; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WKWhjwRjGa8JGHN8oOXMfUuBV7P3LeajpkynS8zOZp4=; b=McFIOoJSXRPQ1ICXWJmchklCQ7l5WvAerDl7EXCVUc+FF0W2C7af7cC7 5QD0QiDOQjmFciUUEqJ/iugM9lwrI0+3I32TO/63RU/ryH8zDGKod6fwM bOCYk6c7f/9QcYA4R/Q/5zbVWNRX4CQArS+4gYLlE23bOHhTWnpxXfjpP lSMmca/zCYNO5laLHwASl0qczaYH9klYh7Ch4hgiaFBmKWksZ3VzLbP+w 9lB6qwtseZ5gvKpfBTde0Gflx8LpUGc8gWIfIHk0omlqMRZGnojLy0ENN 29sNcolAz0PXFZCkCHJWxqDWOhFjiD8M7d0mHEWwdx4cjxeHp+2577SJT A==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="295187343" X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="295187343" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:09 -0700 X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="671275182" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:08 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Jiale Song Subject: [dts][PATCH V2 02/10] test_plans/vf_offload: update dts code for dpdk csum change Date: Fri, 26 Aug 2022 10:43:00 +0800 Message-Id: <20220826024308.17447-2-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220826024308.17447-1-weiyuanx.li@intel.com> References: <20220826024308.17447-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 --- Tested-by: Jiale Song < songx.jiale@intel.com> 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 Fri Aug 26 02:43:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 115442 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 E8AD0A0551; Fri, 26 Aug 2022 04:43:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3B0E40143; Fri, 26 Aug 2022 04:43:14 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id AB8FE400D6 for ; Fri, 26 Aug 2022 04:43: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=1661481792; x=1693017792; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1TsFJERQDU94Ol8JAVZJKDEmZDv/ZKMhrVhsAfTSAd4=; b=SBblJbQOSX0Tkrfn3QRf07arp2k6ABAfP15/iZR2BYwnYcLRu6a9arh4 wQBj7g7/J5tc/g3+j3mT2k81dwi75X/VBc3ClYYZCVfA1eJFor6MxQhAn 8dFLH8CSTC7FU9QVbXsEDg0oqSr0zmODYu7ULRvr29vq++ZkP/e5T5PPQ 3A5e10CJGzcmHo0ffZPr4feaMh+1UVHT778P/wvDCZiwzjbupxwDxds9P 4naMc4t3+45n+UDHaBwi9S+nEQ9XUNlF+jwcuAsOCzHc0jRiuqEmgLBkF 6mdbWXTELxwO9cpj3CB4EwOmaAU38PGX/KAto+HC3izBudukveLl6NV2q g==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="295187346" X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="295187346" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:11 -0700 X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="671275191" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:09 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Jiale Song Subject: [dts][PATCH V2 03/10] tests/checksum_offload: update dts code for dpdk csum change Date: Fri, 26 Aug 2022 10:43:01 +0800 Message-Id: <20220826024308.17447-3-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220826024308.17447-1-weiyuanx.li@intel.com> References: <20220826024308.17447-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 --- Tested-by: Jiale Song < songx.jiale@intel.com> v2: -modify dst mac address tests/TestSuite_checksum_offload.py | 35 +++++++++++++---------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py index 3554f5eb..1ccc884c 100644 --- a/tests/TestSuite_checksum_offload.py +++ b/tests/TestSuite_checksum_offload.py @@ -204,11 +204,10 @@ 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, @@ -424,8 +423,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 +502,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 = "52:00:00:00:00:01" 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 +547,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 = "52:00:00:00:00:01" pkts_ref = { "IP/UDP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IP()/UDP()/("X"*46)' @@ -611,7 +612,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 = "52:00:00:00:00:01" pkts = { "IP/UDP": 'Ether(dst="%s", src="52:00:00:00:00:00")/IP(chksum=0x0)/UDP(chksum=0xf)/("X"*46)' @@ -660,7 +661,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 = "52:00:00:00:00:01" sndIP = "10.0.0.1" sndIPv6 = "::1" sndPkts = { @@ -816,9 +817,8 @@ class TestChecksumOffload(TestCase): verification_errors: List[VerifyFailure] = [] 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 = "52:00:00:00:00:01" + 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}'") @@ -848,8 +848,8 @@ class TestChecksumOffload(TestCase): verification_errors: List[VerifyFailure] = [] 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 = "52:00:00:00:00:01" + tester_mac = "52:00:00:00:00:00" eth = Ether(dst=dut_mac, src=tester_mac) checksum_options = ( @@ -903,9 +903,8 @@ class TestChecksumOffload(TestCase): verification_errors: List[VerifyFailure] = [] 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 = "52:00:00:00:00:01" + 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}'") @@ -1003,9 +1002,8 @@ class TestChecksumOffload(TestCase): verification_errors: List[VerifyFailure] = [] 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 = "52:00:00:00:00:01" + 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 +1020,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 Fri Aug 26 02:43:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 115443 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 1609AA0552; Fri, 26 Aug 2022 04:43:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DEEB427F5; Fri, 26 Aug 2022 04:43:15 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 8213D400D6 for ; Fri, 26 Aug 2022 04:43:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661481793; x=1693017793; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ihE0LCeDAzycaxv80F0uzQargRVwyS39cm8g6IHN2ZI=; b=GAn7SofxUZnfYFOpNc3QDDkd/ToC7q82kuALskyUsIpAiCl0PVBaSlqz 9zz7zM1fuUcfcVEHFfgJjJMqE6bfl/a3MlIGewhrxSEDMcFFTJeCc8uth F65nPJHUBHRj8VcjQYZ8PMyIljaX0Ugp3HUwQ900vpct52eiek29Hq169 +ijTPb7f8VP+HLU6oHYiKSRtXwcIdNtWWFPE4BshLsxShzhVAd9DyuOY9 2oHGbnRwoSD4ey0dT8caHee8u6FWGJLkfRKAbwUhTMQ6+kYxXOKKs6H00 fkzX7heRxIxpMeCT7QIWU1FGpZZJ6D29+1qGcabTJUsmBxDclddRoxWXH w==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="295187355" X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="295187355" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:12 -0700 X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="671275194" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:11 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Jiale Song Subject: [dts][PATCH V2 04/10] tests/ice_advanced_iavf_rss: update dts code for dpdk csum change Date: Fri, 26 Aug 2022 10:43:02 +0800 Message-Id: <20220826024308.17447-4-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220826024308.17447-1-weiyuanx.li@intel.com> References: <20220826024308.17447-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 --- Tested-by: Jiale Song < songx.jiale@intel.com> v2: -modify the dst mac variable to 'dst_mac' -Added enable promisc model tests/TestSuite_ice_advanced_iavf_rss.py | 74 +++++++++++++++++++----- 1 file changed, 58 insertions(+), 16 deletions(-) diff --git a/tests/TestSuite_ice_advanced_iavf_rss.py b/tests/TestSuite_ice_advanced_iavf_rss.py index e560c9e6..bed1d1df 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() @@ -6370,7 +6394,7 @@ class AdvancedIavfRSSTest(TestCase): expect_chksum = dict() 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()", ">>>") @@ -6382,7 +6406,7 @@ class AdvancedIavfRSSTest(TestCase): inst = self.tester.tcpdump_sniff_packets( intf=self.tester_iface0, count=len(pkts), - filters=[{"layer": "ether", "config": {"src": vf0_mac}}], + filters=[{"layer": "ether", "config": {"src": sniff_src}}], ) out = self.rssprocess.send_pkt_get_output(pkts=pkts[pkt]) rece_pkt = self.tester.load_tcpdump_sniff_packets(inst) @@ -6417,24 +6441,26 @@ class AdvancedIavfRSSTest(TestCase): self.pmd_output.execute_cmd("csum set tcp hw 0") self.pmd_output.execute_cmd("csum set sctp hw 0") self.pmd_output.execute_cmd("port start all") + self.pmd_output.execute_cmd("set promisc 0 on") self.pmd_output.execute_cmd("start") + 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="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48)', + "IP/TCP": f'Ether(dst="{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="{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="{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="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48)', + "IPv6/UDP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48)', + "IPv6/SCTP": f'Ether(dst="{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="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48)', + "IP/TCP": f'Ether(dst="{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="{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="{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="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22)/("X"*48)', + "IPv6/UDP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22)/("X"*48)', + "IPv6/SCTP": f'Ether(dst="{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 Fri Aug 26 02:43:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 115444 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 37B8BA0551; Fri, 26 Aug 2022 04:43:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3001C427F4; Fri, 26 Aug 2022 04:43:16 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 505BA427F9 for ; Fri, 26 Aug 2022 04:43:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661481795; x=1693017795; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WSkkaR5pJCBN72VZgqcS0LdO1OHcBQ9r0n9IybMhYJM=; b=Oxy5Ly2M9hYTbShF50trJaEoV0uujkmpXCtdQqGviLarcKJXJKuDrXbI /CbV4ZyZ2QpEFKtxrfM+XkEfVyVwlUhhhvMpa3ZIL4D0+30EJwAZPMYJv KE8w6b0o3icSpwHhItTfV30GKkBK/SJl97oLz8pOBo8jcsKBvKmjjj8mE w4pO2F8F3BBS+EC29pugPk0QeJDnYIhLKT8+kEPtwMpysoRw7I5DWpK4Y vv2PQp8yJfNwSjX49KrhcKs3RUm44G1Xah1sdJdwqoGVcp9QzynbU1eIr PZYoRCTTUC+x6z/VVW8/RzDUapK1K5lTpE9sipD54CU2b34YoP+ZJRPdl g==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="295187357" X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="295187357" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:14 -0700 X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="671275203" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:12 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Jiale Song Subject: [dts][PATCH V2 05/10] test_plans/ice_advanced_iavf_rss: update dts code for dpdk csum change Date: Fri, 26 Aug 2022 10:43:03 +0800 Message-Id: <20220826024308.17447-5-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220826024308.17447-1-weiyuanx.li@intel.com> References: <20220826024308.17447-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 --- Tested-by: Jiale Song < songx.jiale@intel.com> 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 Fri Aug 26 02:43:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 115445 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 58EC4A0551; Fri, 26 Aug 2022 04:43:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54B1D41156; Fri, 26 Aug 2022 04:43:17 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 01B20400D6 for ; Fri, 26 Aug 2022 04:43:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661481796; x=1693017796; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6lRey79aZwL4qwhZv0bcareSapFw94/VIv4P/ruSK8s=; b=JGZUcRrTic7vTujFU4coIOLYwRqrNRctjEwPihDNT2vRPOC2jacuAQqz sfvgN4NeyRBsVHN2PGUsg7l0AjsSCaTAY70ovhp42QO4vaQf/PN0dXI/D r7YYJCM8GAiou6PIQj90tIpi4I06FP4Voj9kPQkxomZBi9h6qPmOia31Q TNrBjAnFzyOKxnz/rvdRyHgTA1j0Bse7hMQFZK01bOKWXnOugO1l7yvte u7XghFQ9euQqK70JYr3tkFC+kyMpDZWnnDZRGvdkRDR4y8jfYuD9ep1+3 1r1vgJessHDPOq7QGLmf5LTi7jYbTha4EJc8g70aMFh0x5FjN8YZo7CFu Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="295187360" X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="295187360" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:15 -0700 X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="671275208" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:14 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Jiale Song Subject: [dts][PATCH V2 06/10] tests/ice_advanced_rss: update dts code for dpdk csum change Date: Fri, 26 Aug 2022 10:43:04 +0800 Message-Id: <20220826024308.17447-6-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220826024308.17447-1-weiyuanx.li@intel.com> References: <20220826024308.17447-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 --- Tested-by: Jiale Song < songx.jiale@intel.com> v2: -modify the dst mac variable to 'dst_mac' tests/TestSuite_ice_advanced_rss.py | 31 +++++++++++++++-------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/tests/TestSuite_ice_advanced_rss.py b/tests/TestSuite_ice_advanced_rss.py index 0c246cca..a3318101 100644 --- a/tests/TestSuite_ice_advanced_rss.py +++ b/tests/TestSuite_ice_advanced_rss.py @@ -5493,7 +5493,7 @@ class AdvancedRSSTest(TestCase): expect_chksum = dict() 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 +5541,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") + 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="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1", chksum=0xfff3)/("X"*48)', + "IP/TCP": f'Ether(dst="{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="{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="{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="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22, chksum=0xe38)/("X"*48)', + "IPv6/UDP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22, chksum=0xe38)/("X"*48)', + "IPv6/SCTP": f'Ether(dst="{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="{dst_mac}", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48)', + "IP/TCP": f'Ether(dst="{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="{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="{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="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/TCP(sport=22)/("X"*48)', + "IPv6/UDP": f'Ether(dst="{dst_mac}", src="52:00:00:00:00:00")/IPv6()/UDP(sport=22)/("X"*48)', + "IPv6/SCTP": f'Ether(dst="{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 Fri Aug 26 02:43:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 115446 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 82EEAA0551; Fri, 26 Aug 2022 04:43:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76B7E4280C; Fri, 26 Aug 2022 04:43:19 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 76CE54281A for ; Fri, 26 Aug 2022 04:43: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=1661481797; x=1693017797; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7NM346jTtrWTl7wIbKaiwSVBMrt5YujZj9ektBTNJ1Q=; b=fF9GFnuGHRkilqSa15ITfXTKshrr+Lf9kMxobEqcPn7rf0Ue+vS22t2D WrsShQGc6ZNVMp5Wmkj7lP+YKbQZwqASwoPMUT55h4LpDTvMoKS8rW5z+ l4CKdr5BvzKBekJH29YztnW0jvcRBAHAeM5WbeekpXvmjj1qDM2NNSJw8 fRRV465f+KgZyzBBov8gpHCjBEd/lycN4K5fmUmx2Ft+/gVcfNPyPALnt F185ieebBO2yxLEH8vas+GTA5Cfllw9tv+R5KyS2z80cojEyq9XmVLXsJ nkASg8PsPIWnywTmMKSD4ZkwV5XWWl9jsl16v728P5QVpJOQoPBnZm9IO Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="295187365" X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="295187365" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:17 -0700 X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="671275214" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:15 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Jiale Song Subject: [dts][PATCH V2 07/10] test_plans/ice_advanced_rss: update dts code for dpdk csum change Date: Fri, 26 Aug 2022 10:43:05 +0800 Message-Id: <20220826024308.17447-7-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220826024308.17447-1-weiyuanx.li@intel.com> References: <20220826024308.17447-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 --- Tested-by: Jiale Song < songx.jiale@intel.com> 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 Fri Aug 26 02:43:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 115447 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 9F15BA0551; Fri, 26 Aug 2022 04:43:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A7684281C; Fri, 26 Aug 2022 04:43:20 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 1C84B400D6 for ; Fri, 26 Aug 2022 04:43:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661481799; x=1693017799; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2KI/LBgEYI56MtqRUb7BO1YCDntEQJnTg7wdvyeCN5E=; b=d4yE+1dnyxOTG/tZeSlFGu+WVbRakx8nEzSqGoVEmvEQzDMhrYMFWihK 7y7Uz13YAnO/R9J71Jg51B8PEo/q0BdKDFXrfHqd+SmHiKFxb5Fp8Z7/+ Uotqf/UEOb8oJfQ5p0KeRl0NC2TMbfgM9AJmEzLPpZIerAhlBdYt/PkQ/ eg45WwnA/HbFMmN+dpCvkHg59Un9yjcAtt7UwoXlzlh42UtYqSLtkjLa4 jV5fkCzTurtLUd+fMiP4mQAxpBh6I9S8gsNh+oIigsCNlWkZU3UcTPAMA be8OMaX0JCk2hbE1Q9VuFEAUenVbXlBOLeD9SyQl8QHLGZleSoHh3CAVn Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="295187367" X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="295187367" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:18 -0700 X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="671275223" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:17 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Jiale Song Subject: [dts][PATCH V2 08/10] test_plans/ice_iavf_fdir: update dts code for dpdk csum change Date: Fri, 26 Aug 2022 10:43:06 +0800 Message-Id: <20220826024308.17447-8-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220826024308.17447-1-weiyuanx.li@intel.com> References: <20220826024308.17447-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 --- Tested-by: Jiale Song < songx.jiale@intel.com> v2: -Added enable promisc model tests/TestSuite_ice_iavf_fdir.py | 84 ++++++++++++++++++++++++++++++-- 1 file changed, 81 insertions(+), 3 deletions(-) diff --git a/tests/TestSuite_ice_iavf_fdir.py b/tests/TestSuite_ice_iavf_fdir.py index a4df6151..1cc71f67 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, "#" ) @@ -10760,6 +10804,7 @@ class TestICEIAVFFdir(TestCase): self.dut.send_expect("csum set ip %s %d" % (hw, port), "testpmd>") self.dut.send_expect("csum set udp %s %d" % (hw, port), "testpmd>") self.dut.send_expect("port start all", "testpmd>") + self.dut.send_expect("set promisc 0 on", "testpmd>") self.dut.send_expect("start", "testpmd>") def get_chksum_values(self, packets_expected): @@ -10791,7 +10836,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 +10941,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 +11096,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 +11655,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 Fri Aug 26 02:43:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 115448 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 CC64FA0551; Fri, 26 Aug 2022 04:43:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C8299427F7; Fri, 26 Aug 2022 04:43:21 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 6EE15400D6 for ; Fri, 26 Aug 2022 04:43:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661481800; x=1693017800; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PBgT5og1jhJ87fPtzaoHx7w2vKQ3t4tivSyoszY6wMo=; b=DhbRKmIwsHtEK1ivI7szA5kItkxYIxNKroG687JbSfMVXfgpE13iyIw7 MT7oGW+ZgVYBPQNEaZBeqMRiRFTk9M6zJeKtE99OiX4yQVY1waINpyRER XOQxNqhUb7sfATp/68kkDzumrVAHK86zo10ijk7qbSx7AAamLQ2YQ/Qmu +1De2/peWD/tNB+oLYUHlpT7MH518+n+ETejfZ/pD9gXUcspwMQajF50P UdPdfH6UiGLu9Ardf2Z1SHaFYGKyMi0dwnfnycVwpK6zX9fTlZpNHYddT CK+OrMSek2/3bhnTVo+hU+ajWf+YgRtD9VV2nLA5neO+VtTC2MIx9LtiR Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="295187371" X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="295187371" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:20 -0700 X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="671275231" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:18 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Jiale Song Subject: [dts][PATCH V2 09/10] tests/tx_preparation: update dts code for dpdk csum change Date: Fri, 26 Aug 2022 10:43:07 +0800 Message-Id: <20220826024308.17447-9-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220826024308.17447-1-weiyuanx.li@intel.com> References: <20220826024308.17447-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 --- Tested-by: Jiale Song < songx.jiale@intel.com> 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..c3e90f72 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 = "00:11:22:33:44:55" 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 Fri Aug 26 02:43:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 115449 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 EABD8A0551; Fri, 26 Aug 2022 04:43:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E62D240156; Fri, 26 Aug 2022 04:43:23 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 4BBFF400D6 for ; Fri, 26 Aug 2022 04:43:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661481802; x=1693017802; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sPZSUlER7FRW6esZ/b4bY8pItDCZZyd1JHyNDQ7xras=; b=BTuZOWmGkEkM4kFrMcr8NCRRebV9sMVz7ZoIERjIgp0hL4RrctXZzhu5 cddNlUd5Ai03N844DdgG4gjn3aK+chdDwqlLTnNnkp0sxAvIL6D6yTkSU RqjtOZfPlKcdyTrgBHd+A7cZCTKX7Nt2XVI7Ko6bFcsm+GzaueWmwiNiF Zg3k2fLMVC495kBL5OZKDjAcQPJFBCnbSevHHc7C+qgeLM4N1gnmtg5L4 98/Tt5phaTUcqq0t0LZGlW8cuPcIFzB/SQ2EkG5mFNeL6lAzXMvy3qd+b jvoJP1iAsgSe4beC6NunR9nxX/wvBRMINE8So6x8gJp16fO9JlkFwzRXV g==; X-IronPort-AV: E=McAfee;i="6500,9779,10450"; a="295187374" X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="295187374" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:21 -0700 X-IronPort-AV: E=Sophos;i="5.93,264,1654585200"; d="scan'208";a="671275238" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 19:43:20 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Jiale Song Subject: [dts][PATCH V2 10/10] test_plans/ice_iavf_fdir: update dts code for dpdk csum change Date: Fri, 26 Aug 2022 10:43:08 +0800 Message-Id: <20220826024308.17447-10-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220826024308.17447-1-weiyuanx.li@intel.com> References: <20220826024308.17447-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 --- 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.