From patchwork Wed Jan 4 07:20:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ke Xu X-Patchwork-Id: 121559 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 5A715A00C2; Wed, 4 Jan 2023 08:22:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 83781410EA; Wed, 4 Jan 2023 08:22:34 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 7714C40697 for ; Wed, 4 Jan 2023 08:22:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672816952; x=1704352952; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HnSTSaKbDKE4UjHOzTUIMwXurEnTH+W9SvbBEpsFtpc=; b=LYAMPbt88xZ3C2UjzG7NLJHiHwkgyaHDUrj3eX9mFZT1wrRI9NQ+jYn6 FA6htuNA7ArvxJE1eH5QUm9sFcEH7irGYwRovdxr0qd8sYZvItd1vQEyt SZtpkTcz8r2iQhlZUanRyxaAsc8cCHoU9TGT1cVhWE0Wv88yACcuxPwqP 8qWsDznJx06x5E/QQFdLePWS/0bWnYedhww4azvFyJmVGSWwmzInqxYSs QwyZ62SxBSEToi3qvUeX2zRY47H59QQt6cd8PErGZdlN6kWs/3CsnQPZz wgI4T9VgfmNahFApkq/LW/q9dIzvQ1Kaw/DtdvlZS6gZrW5t38WE0Mn2M A==; X-IronPort-AV: E=McAfee;i="6500,9779,10579"; a="321928100" X-IronPort-AV: E=Sophos;i="5.96,299,1665471600"; d="scan'208";a="321928100" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jan 2023 23:22:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10579"; a="657022759" X-IronPort-AV: E=Sophos;i="5.96,299,1665471600"; d="scan'208";a="657022759" Received: from dpdk-xuke-lab.sh.intel.com ([10.67.119.8]) by fmsmga007.fm.intel.com with ESMTP; 03 Jan 2023 23:22:30 -0800 From: Ke Xu To: dts@dpdk.org Cc: lijuan.tu@intel.com, yuan.peng@intel.com, ke1.xu@intel.com Subject: [DTS][PATCH V3 1/3] test_plans/vf_offload: fix wrong example packets. Date: Wed, 4 Jan 2023 15:20:51 +0800 Message-Id: <20230104072053.86366-2-ke1.xu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230104072053.86366-1-ke1.xu@intel.com> References: <20230104072053.86366-1-ke1.xu@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 Here we are to use TCP packets for TSO but UDP is listed in the test plan. Signed-off-by: Ke Xu --- test_plans/vf_offload_test_plan.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test_plans/vf_offload_test_plan.rst b/test_plans/vf_offload_test_plan.rst index f1720e41..4a4e49f6 100644 --- a/test_plans/vf_offload_test_plan.rst +++ b/test_plans/vf_offload_test_plan.rst @@ -445,11 +445,11 @@ Launch the userland ``testpmd`` application on DUT as follows:: Test IPv4() in scapy:: - sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/UDP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s") + sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s") Test IPv6() in scapy:: - sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s") + sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s") Test case: csum fwd engine, use tunnel TSO @@ -497,9 +497,9 @@ Launch the userland ``testpmd`` application on DUT as follows:: Test IPv4() in scapy:: for one_outer_packet in outer_packet_list: - sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IP(src="192.168.1.1",dst="192.168.1.2")/UDP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s") + sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s") Test IPv6() in scapy:: for one_outer_packet in outer_packet_list: - sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/UDP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s") + sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s") From patchwork Wed Jan 4 07:20:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ke Xu X-Patchwork-Id: 121560 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 BC46DA00C2; Wed, 4 Jan 2023 08:22:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B85C440E28; Wed, 4 Jan 2023 08:22:36 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 9FBB042D1D for ; Wed, 4 Jan 2023 08:22:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672816954; x=1704352954; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YXZUtqnrpk0o5nJqluTyfvTG1WriSb1WMPribI8BCJ0=; b=eLG/L/tI621wHkIxZ5FZTtG9owSf4Z1VEQT8gtTjUv54OdPr7J4oHveQ kxpP2bL6zI7D2QzOlSeccsytfHyI63gqKF/po6jcI/PJ89/H7siseLR6D aQmp+J9PTLE64zFNka4g5CHxukshkgqtHpXLoRSaVjw1q5zt1RGE8GdHZ aeGdMg2JeVGOl+evvqC5doRAeOE88QDgl9uO2HtI0A3Kfp7em22zcpm0k TLfZ+jC2LGLmjYvU5q8bObJWJUHzDJiOYhr4P1pEg7kumMhogqQ738+RL D7L4XexdmjBSLBGls+CnPaM0OvMYetyIHH4edEI97CZHMHhorXTceAtlJ Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10579"; a="321928105" X-IronPort-AV: E=Sophos;i="5.96,299,1665471600"; d="scan'208";a="321928105" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jan 2023 23:22:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10579"; a="657022765" X-IronPort-AV: E=Sophos;i="5.96,299,1665471600"; d="scan'208";a="657022765" Received: from dpdk-xuke-lab.sh.intel.com ([10.67.119.8]) by fmsmga007.fm.intel.com with ESMTP; 03 Jan 2023 23:22:32 -0800 From: Ke Xu To: dts@dpdk.org Cc: lijuan.tu@intel.com, yuan.peng@intel.com, ke1.xu@intel.com Subject: [DTS][PATCH V3 2/3] test_plans/vf_offload: add packets count, super-long packets and random payload to the case. Date: Wed, 4 Jan 2023 15:20:52 +0800 Message-Id: <20230104072053.86366-3-ke1.xu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230104072053.86366-1-ke1.xu@intel.com> References: <20230104072053.86366-1-ke1.xu@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 Long packet and repeating packet sending helps triggering potential failures. For example, in DPDK 20.11 there was an MDD problem when handling long packets with TSO enabled. Signed-off-by: Ke Xu --- test_plans/vf_offload_test_plan.rst | 155 +++++++++++++++------------- 1 file changed, 81 insertions(+), 74 deletions(-) diff --git a/test_plans/vf_offload_test_plan.rst b/test_plans/vf_offload_test_plan.rst index 4a4e49f6..3e9b658b 100644 --- a/test_plans/vf_offload_test_plan.rst +++ b/test_plans/vf_offload_test_plan.rst @@ -328,75 +328,83 @@ on csum and enable tunnel tso as below:: testpmd> tunnel_tso set 800 1 Configure the traffic generator to send the multiple packets for the following -combination: - - +----------------+----------------------------------------+ - | packet type | packet organization | - +================+========================================+ - | | Ether / IPv4 / TCP / payload len 128 | - | +----------------------------------------+ - | | Ether / IPv4 / TCP / payload len 800 | - | +----------------------------------------+ - | | Ether / IPv4 / TCP / payload len 801 | - | +----------------------------------------+ - | | Ether / IPv4 / TCP / payload len 1700 | - | non-tunneling +----------------------------------------+ - | packets for | Ether / IPv4 / TCP / payload len 2500 | - | TSO test +----------------------------------------+ - | | Ether / IPv6 / TCP / payload len 128 | - | +----------------------------------------+ - | | Ether / IPv6 / TCP / payload len 800 | - | +----------------------------------------+ - | | Ether / IPv6 / TCP / payload len 801 | - | +----------------------------------------+ - | | Ether / IPv6 / TCP / payload len 1700 | - | +----------------------------------------+ - | | Ether / IPv6 / TCP / payload len 2500 | - +----------------+----------------------------------------+ - | | Ether / IPv4 / UDP / VXLAN / Ether | - | +----------------------------------------+ - | | Ether / IPv6 / UDP / VXLAN / Ether | - | +----------------------------------------+ - | | Ether / IPv4 / GRE | - | outer and +----------------------------------------+ - | tunneling | Ether / IPv4 / GRE / Ether | - | packets +----------------------------------------+ - | for tso test | Ether / IPv6 / GRE | - | +----------------------------------------+ - | | Ether / IPv6 / GRE / Ether | - | +----------------------------------------+ - | | Ether / IPv4 / NVGRE | - | +----------------------------------------+ - | | Ether / IPv4 / NVGRE / Ether | - | +----------------------------------------+ - | | Ether / IPv6 / NVGRE | - | +----------------------------------------+ - | | Ether / IPv6 / NVGRE / Ether | - | +----------------------------------------+ - | | Ether / IPv4 / UDP / GTPU | - | +----------------------------------------+ - | | Ether / IPv6 / UDP / GTPU | - +----------------+----------------------------------------+ - | | IPv4 / TCP / payload len 128 | - | +----------------------------------------+ - | | IPv4 / TCP / payload len 800 | - | +----------------------------------------+ - | | IPv4 / TCP / payload len 801 | - | +----------------------------------------+ - | | IPv4 / TCP / payload len 1700 | - | +----------------------------------------+ - | inner packets | IPv4 / TCP / payload len 2500 | - | for TSO test +----------------------------------------+ - | | IPv6 / TCP / payload len 128 | - | +----------------------------------------+ - | | IPv6 / TCP / payload len 800 | - | +----------------------------------------+ - | | IPv6 / TCP / payload len 801 | - | +----------------------------------------+ - | | IPv6 / TCP / payload len 1700 | - | +----------------------------------------+ - | | IPv6 / TCP / payload len 2500 | - +----------------+----------------------------------------+ +combination, each combination for several times: + + +----------------+----------------------------------------+---------------+ + | packet type | packet organization | packet count | + +================+========================================+===============+ + | | Ether / IPv4 / TCP / payload len 128 | 10 | + | +----------------------------------------+---------------+ + | | Ether / IPv4 / TCP / payload len 800 | 10 | + | +----------------------------------------+---------------+ + | | Ether / IPv4 / TCP / payload len 801 | 10 | + | +----------------------------------------+---------------+ + | | Ether / IPv4 / TCP / payload len 1700 | 10 | + | +----------------------------------------+---------------+ + | | Ether / IPv4 / TCP / payload len 2500 | 10 | + | non-tunneling +----------------------------------------+---------------+ + | packets for | Ether / IPv4 / TCP / payload len 8500 | 1000 | + | TSO test +----------------------------------------+---------------+ + | | Ether / IPv6 / TCP / payload len 128 | 10 | + | +----------------------------------------+---------------+ + | | Ether / IPv6 / TCP / payload len 800 | 10 | + | +----------------------------------------+---------------+ + | | Ether / IPv6 / TCP / payload len 801 | 10 | + | +----------------------------------------+---------------+ + | | Ether / IPv6 / TCP / payload len 1700 | 10 | + | +----------------------------------------+---------------+ + | | Ether / IPv6 / TCP / payload len 2500 | 10 | + | +----------------------------------------+---------------+ + | | Ether / IPv6 / TCP / payload len 8500 | 1000 | + +----------------+----------------------------------------+---------------+ + | | Ether / IPv4 / UDP / VXLAN / Ether | N/A | + | +----------------------------------------+---------------+ + | | Ether / IPv6 / UDP / VXLAN / Ether | N/A | + | +----------------------------------------+---------------+ + | | Ether / IPv4 / GRE | N/A | + | outer and +----------------------------------------+---------------+ + | tunneling | Ether / IPv4 / GRE / Ether | N/A | + | packets +----------------------------------------+---------------+ + | for tso test | Ether / IPv6 / GRE | N/A | + | +----------------------------------------+---------------+ + | | Ether / IPv6 / GRE / Ether | N/A | + | +----------------------------------------+---------------+ + | | Ether / IPv4 / NVGRE | N/A | + | +----------------------------------------+---------------+ + | | Ether / IPv4 / NVGRE / Ether | N/A | + | +----------------------------------------+---------------+ + | | Ether / IPv6 / NVGRE | N/A | + | +----------------------------------------+---------------+ + | | Ether / IPv6 / NVGRE / Ether | N/A | + | +----------------------------------------+---------------+ + | | Ether / IPv4 / UDP / GTPU | N/A | + | +----------------------------------------+---------------+ + | | Ether / IPv6 / UDP / GTPU | N/A | + +----------------+----------------------------------------+---------------+ + | | IPv4 / TCP / payload len 128 | 10 | + | +----------------------------------------+---------------+ + | | IPv4 / TCP / payload len 800 | 10 | + | +----------------------------------------+---------------+ + | | IPv4 / TCP / payload len 801 | 10 | + | +----------------------------------------+---------------+ + | | IPv4 / TCP / payload len 1700 | 10 | + | +----------------------------------------+---------------+ + | | IPv4 / TCP / payload len 2500 | 10 | + | +----------------------------------------+---------------+ + | inner packets | IPv4 / TCP / payload len 8500 | 1000 | + | for TSO test +----------------------------------------+---------------+ + | | IPv6 / TCP / payload len 128 | 10 | + | +----------------------------------------+---------------+ + | | IPv6 / TCP / payload len 800 | 10 | + | +----------------------------------------+---------------+ + | | IPv6 / TCP / payload len 801 | 10 | + | +----------------------------------------+---------------+ + | | IPv6 / TCP / payload len 1700 | 10 | + | +----------------------------------------+---------------+ + | | IPv6 / TCP / payload len 2500 | 10 | + | +----------------------------------------+---------------+ + | | IPv6 / TCP / payload len 8500 | 1000 | + +----------------+----------------------------------------+---------------+ Notice that VxLAN needs DCF to configure, so testing of VxLAN may need to perform on DCF. @@ -445,12 +453,11 @@ Launch the userland ``testpmd`` application on DUT as follows:: Test IPv4() in scapy:: - sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s") + sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(load=RandString(size=%s))], iface="%s", count = %s) Test IPv6() in scapy:: - sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s") - + sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/Raw(load=RandString(size=%s))], iface="%s", count = %s) Test case: csum fwd engine, use tunnel TSO ========================================== @@ -497,9 +504,9 @@ Launch the userland ``testpmd`` application on DUT as follows:: Test IPv4() in scapy:: for one_outer_packet in outer_packet_list: - sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s") + sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(load=RandString(size=%s))], iface="%s", count = %s) Test IPv6() in scapy:: for one_outer_packet in outer_packet_list: - sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/Raw(load="\x50"*%s)], iface="%s") + sendp([Ether(dst="%s", src="52:00:00:00:00:00")/one_outer_packet/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/Raw(load=RandString(size=%s))], iface="%s", count = %s) From patchwork Wed Jan 4 07:20:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ke Xu X-Patchwork-Id: 121561 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 DBB42A00C4; Wed, 4 Jan 2023 08:22:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D83F642D21; Wed, 4 Jan 2023 08:22:36 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id DB7D240697 for ; Wed, 4 Jan 2023 08:22:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672816956; x=1704352956; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=19pzDMXXoontqVziMyU4/1Ke4byLxmWHoeKimB1RmFU=; b=Mj3kwz8S+uBZVRbKgN52XXy3CuzCV3HnZUXE9NqHjyjvB6oocHlO5ENw eJFU0HXGTKpHzD1VCwiUjhdKv19MMByEcXdgkZ855+V3L6k8tZtJrG2Ut SpU+Dp2CWEOIU8Dqy/UDEqAGhgCPNtaSfv/ZJ9rat1t4sC+FAKyCG5trR yXSeJrioLrI5+u8I9sycTFln2yzKGq6d5O4d/5uMOizVnVNKRErz/vlIb p8HM3qgE2IqRVSwx3Y/o1dLZYXJFhEjaMSZv3+KC0MuNKRTOFZr8JZatm iGE/dDCTpzjwcmGf/onMoGDUKdc1fBDwrZ3UodAyQcipEf7wgFGqow8D8 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10579"; a="321928109" X-IronPort-AV: E=Sophos;i="5.96,299,1665471600"; d="scan'208";a="321928109" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jan 2023 23:22:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10579"; a="657022773" X-IronPort-AV: E=Sophos;i="5.96,299,1665471600"; d="scan'208";a="657022773" Received: from dpdk-xuke-lab.sh.intel.com ([10.67.119.8]) by fmsmga007.fm.intel.com with ESMTP; 03 Jan 2023 23:22:34 -0800 From: Ke Xu To: dts@dpdk.org Cc: lijuan.tu@intel.com, yuan.peng@intel.com, ke1.xu@intel.com Subject: [DTS][PATCH V3 3/3] tests/vf_offload: implement packets count, super-long packet and random payload. Date: Wed, 4 Jan 2023 15:20:53 +0800 Message-Id: <20230104072053.86366-4-ke1.xu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230104072053.86366-1-ke1.xu@intel.com> References: <20230104072053.86366-1-ke1.xu@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 Implemented packets count that sends multiple packets of one packet combination. Implemented random payload. Added super-long packet of payload length of 8500. Signed-off-by: Ke Xu Acked-by: Yuan Peng --- tests/TestSuite_vf_offload.py | 150 ++++++++++++++++++++++++++++------ 1 file changed, 125 insertions(+), 25 deletions(-) diff --git a/tests/TestSuite_vf_offload.py b/tests/TestSuite_vf_offload.py index 7a55c791..a212133c 100644 --- a/tests/TestSuite_vf_offload.py +++ b/tests/TestSuite_vf_offload.py @@ -646,7 +646,17 @@ class TestVfOffload(TestCase): self.tester.get_local_port(self.dut_ports[1]) ) - self.loading_sizes = [128, 800, 801, 1700, 2500] + # Here size_and_count is a list of tuples for the test scopes that + # in a tuple (size, count) means, sending packets for count times + # for TSO with a payload size of size. + self.size_and_count = [ + (128, 10), + (800, 10), + (801, 10), + (1700, 10), + (2500, 10), + (8500, 1000), + ] self.tester.send_expect( "ethtool -K %s rx off tx off tso off gso off gro off lro off" @@ -720,13 +730,13 @@ class TestVfOffload(TestCase): self.tester.scapy_foreground() time.sleep(5) - for loading_size in self.loading_sizes: + for loading_size, packet_count in self.size_and_count: # IPv4 tcp test out = self.vm0_testpmd.execute_cmd("clear port info all", "testpmd> ", 120) self.tcpdump_start_sniffing([tx_interface, rx_interface]) self.tester.scapy_append( - 'sendp([Ether(dst="%s",src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s")' - % (mac, loading_size, tx_interface) + 'sendp([Ether(dst="%s",src="52:00:00:00:00:00")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(RandString(size=%s))], iface="%s", count=%s)' + % (mac, loading_size, tx_interface, packet_count) ) out = self.tester.scapy_execute() out = self.vm0_testpmd.execute_cmd("show port stats all") @@ -738,29 +748,49 @@ class TestVfOffload(TestCase): self.logger.info(payload_size_list) if loading_size <= 800: self.verify( - rx_stats == tx_stats and int(payload_size_list[0]) == loading_size, + # for all packet_count packets, verifying the packet size equals the size we sent. + rx_stats == tx_stats + and all( + [ + int(payload_size_list[0]) == loading_size + for j in range(packet_count) + ] + ), "IPV4 RX or TX packet number not correct", ) else: num = loading_size // 800 for i in range(num): self.verify( - int(payload_size_list[i]) == 800, + # i * packet_count + j is the i-th segmentation for j-th packet. + all( + [ + int(payload_size_list[i * packet_count + j]) == 800 + for j in range(packet_count) + ] + ), "the packet segmentation incorrect, %s" % payload_size_list, ) if loading_size % 800 != 0: self.verify( - int(payload_size_list[num]) == loading_size % 800, + # num * packet_count + j is the last segmentation for j-th packet. + all( + [ + int(payload_size_list[num * packet_count + j]) + == loading_size % 800 + for j in range(packet_count) + ] + ), "the packet segmentation incorrect, %s" % payload_size_list, ) - for loading_size in self.loading_sizes: + for loading_size, packet_count in self.size_and_count: # IPv6 tcp test out = self.vm0_testpmd.execute_cmd("clear port info all", "testpmd> ", 120) self.tcpdump_start_sniffing([tx_interface, rx_interface]) self.tester.scapy_append( - 'sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s")' - % (mac, loading_size, tx_interface) + 'sendp([Ether(dst="%s", src="52:00:00:00:00:00")/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/Raw(RandString(size=%s))], iface="%s", count=%s)' + % (mac, loading_size, tx_interface, packet_count) ) out = self.tester.scapy_execute() out = self.vm0_testpmd.execute_cmd("show port stats all") @@ -772,19 +802,39 @@ class TestVfOffload(TestCase): self.logger.info(payload_size_list) if loading_size <= 800: self.verify( - rx_stats == tx_stats and int(payload_size_list[0]) == loading_size, + # for all packet_count packets, verifying the packet size equals the size we sent. + rx_stats == tx_stats + and all( + [ + int(payload_size_list[j]) == loading_size + for j in range(packet_count) + ] + ), "IPV6 RX or TX packet number not correct", ) else: num = loading_size // 800 for i in range(num): self.verify( - int(payload_size_list[i]) == 800, + # i * packet_count + j is the i-th segmentation for j-th packet. + all( + [ + int(payload_size_list[i * packet_count + j]) == 800 + for j in range(packet_count) + ] + ), "the packet segmentation incorrect, %s" % payload_size_list, ) if loading_size % 800 != 0: self.verify( - int(payload_size_list[num]) == loading_size % 800, + # num * packet_count + j is the last segmentation for j-th packet. + all( + [ + int(payload_size_list[num * packet_count + j]) + == loading_size % 800 + for j in range(packet_count) + ] + ), "the packet segmentation incorrect, %s" % payload_size_list, ) @@ -803,7 +853,17 @@ class TestVfOffload(TestCase): self.tester.get_local_port(self.vm0_dut_ports[1]) ) - self.loading_sizes = [128, 800, 801, 1700, 2500] + # Here size_and_count is a list of tuples for the test scopes that + # in a tuple (size, count) means, sending packets for count times + # for TSO with a payload size of size. + self.size_and_count = [ + (128, 10), + (800, 10), + (801, 10), + (1700, 10), + (2500, 10), + (8500, 1000), + ] self.tester.send_expect( "ethtool -K %s rx off tx off tso off gso off gro off lro off" @@ -860,7 +920,7 @@ class TestVfOffload(TestCase): time.sleep(5) for key_outer in pkts_outer: - for loading_size in self.loading_sizes: + for loading_size, packet_count in self.size_and_count: # IPv4 tcp test out = self.vm0_testpmd.execute_cmd( "clear port info all", "testpmd> ", 120 @@ -874,9 +934,9 @@ class TestVfOffload(TestCase): ( 'sendp([Ether(dst="%s",src="52:00:00:00:00:00")/' + pkts_outer[key_outer] - + '/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s")' + + '/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/Raw(RandString(size=%s))], iface="%s", count = %s)' ) - % (mac, loading_size, tx_interface) + % (mac, loading_size, tx_interface, packet_count) ) out = self.tester.scapy_execute() out = self.vm0_testpmd.execute_cmd("show port stats all") @@ -888,23 +948,43 @@ class TestVfOffload(TestCase): self.logger.info(payload_size_list) if loading_size <= 800: self.verify( - rx_stats == tx_stats and payload_size_list[0] == loading_size, + # for all packet_count packets, verifying the packet size equals the size we sent. + rx_stats == tx_stats + and all( + [ + payload_size_list == loading_size + for j in range(packet_count) + ] + ), f"{key_outer} tunnel IPV4 RX or TX packet number not correct", ) else: num = loading_size // 800 for i in range(num): self.verify( - payload_size_list[i] == 800, + # i * packet_count + j is the i-th segmentation for j-th packet. + all( + [ + payload_size_list[i * packet_count + j] == 800 + for j in range(packet_count) + ] + ), "the packet segmentation incorrect, %s" % payload_size_list, ) if loading_size % 800 != 0: self.verify( - payload_size_list[num] == loading_size % 800, + # num * packet_count + j is the last segmentation for j-th packet. + all( + [ + payload_size_list[num * packet_count + j] + == loading_size % 800 + for j in range(packet_count) + ] + ), "the packet segmentation incorrect, %s" % payload_size_list, ) - for loading_size in self.loading_sizes: + for loading_size, packet_count in self.size_and_count: # IPv6 tcp test out = self.vm0_testpmd.execute_cmd( "clear port info all", "testpmd> ", 120 @@ -920,7 +1000,7 @@ class TestVfOffload(TestCase): + pkts_outer[key_outer] + '/IPv6(src="FE80:0:0:0:200:1FF:FE00:200", dst="3555:5555:6666:6666:7777:7777:8888:8888")/TCP(sport=1021,dport=1021)/("X"*%s)], iface="%s")' ) - % (mac, loading_size, tx_interface) + % (mac, loading_size, tx_interface, packet_count) ) out = self.tester.scapy_execute() out = self.vm0_testpmd.execute_cmd("show port stats all") @@ -932,19 +1012,39 @@ class TestVfOffload(TestCase): self.logger.info(payload_size_list) if loading_size <= 800: self.verify( - rx_stats == tx_stats and payload_size_list[0] == loading_size, + # for all packet_count packets, verifying the packet size equals the size we sent. + rx_stats == tx_stats + and all( + [ + payload_size_list[j] == loading_size + for j in range(packet_count) + ] + ), f"{key_outer} tunnel IPV6 RX or TX packet number not correct", ) else: num = loading_size // 800 for i in range(num): self.verify( - payload_size_list[i] == 800, + # i * packet_count + j is the i-th segmentation for j-th packet. + all( + [ + payload_size_list[i * packet_count + j] == 800 + for j in range(packet_count) + ] + ), "the packet segmentation incorrect, %s" % payload_size_list, ) if loading_size % 800 != 0: self.verify( - payload_size_list[num] == loading_size % 800, + # num * packet_count + j is the last segmentation for j-th packet. + all( + [ + payload_size_list[num * packet_count + j] + == loading_size % 800 + for j in range(packet_count) + ] + ), "the packet segmentation incorrect, %s" % payload_size_list, )