From patchwork Wed Dec 21 06:14:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ke Xu X-Patchwork-Id: 121154 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 0C4BDA034C; Wed, 21 Dec 2022 07:15:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0702E410D3; Wed, 21 Dec 2022 07:15:58 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id E037540684 for ; Wed, 21 Dec 2022 07:15:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671603356; x=1703139356; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0vMPu3NypUvQK+qBAQnZPt+YpVL5L4vtfAXHYDaDJTI=; b=YKngI9HyTl8NKfkXEsWno2BIamCXZhK0ToqgOutZxLf8zBNmQVYUE4RU IIBI0C4ApdK/YxpXDHD7CNg1zoO/3qcBcD+6ZUGCX/lpcxNuXrnKLz0vp PqYL2DMa6NVbnsG4CubymNZZ0xP5aJqlZE0AOOBOpSa04KVNOvWHQQprT 1Oiq1ciYNMUr+LFDbSfDoSpDW254oGpO5E3HwvBgNVYT3hztC92fEuzGj fW3V+QlzAjF88bvWlQIbDHQQ7Ez1JMz3eKxcl8vTT5XPPGKKAxYd2JnCq YJHgHSLvj8ZS7/oB5vBZThdKtfp/joWOjWlqHzZLK54WQTWdRydRc8miP A==; X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="303223021" X-IronPort-AV: E=Sophos;i="5.96,261,1665471600"; d="scan'208";a="303223021" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2022 22:15:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="775570887" X-IronPort-AV: E=Sophos;i="5.96,261,1665471600"; d="scan'208";a="775570887" Received: from dpdk-xuke-lab.sh.intel.com ([10.67.119.8]) by orsmga004.jf.intel.com with ESMTP; 20 Dec 2022 22:15:54 -0800 From: Ke Xu To: dts@dpdk.org Cc: ke1.xu@intel.com, yuan.peng@intel.com, weiyuanx.li@intel.com Subject: [DTS][PATCH V1 1/3] test_plans/vf_offload: fix wrong example packets. Date: Wed, 21 Dec 2022 14:14:20 +0800 Message-Id: <20221221061422.9144-2-ke1.xu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221221061422.9144-1-ke1.xu@intel.com> References: <20221221061422.9144-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 00b221ca..e5804fbf 100644 --- a/test_plans/vf_offload_test_plan.rst +++ b/test_plans/vf_offload_test_plan.rst @@ -427,11 +427,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 @@ -479,9 +479,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 Dec 21 06:14:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ke Xu X-Patchwork-Id: 121155 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 36BEEA034C; Wed, 21 Dec 2022 07:16:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3215B427EB; Wed, 21 Dec 2022 07:16:00 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id A588D40684 for ; Wed, 21 Dec 2022 07:15:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671603357; x=1703139357; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FfxX/Ifk1r6Zwiqcvp2H+muI6byKuJjG2j2bcuInyg8=; b=I0gZ3Fu6/07O0Szxjid46U7QqAb/Z0LcxQF+9qFqcrcyVHp91s8zmpj6 OcIDKA1nqYnaEVWB7Q3opFuisschw6QbvrKyErqkonX+njwr/Q2EmhTeB dM8rEXL1/fawYm0NlUgfNd1Zg++aLYTqb7tMWjljAPyKNf18vlXX9g7nN hqWj6i9XZbtxSdwD6gQ7ZFEw1x1VjUVUfeROaSlZtMg3h4omVdJeAC1ef 5KbQixzIijH6vWH3iiFZLbLdezE88K3BH2QlPaXZRJJgP/YwhtGCzeyvv CdkLH40Q0oo69hEmfthYufKnPEIHdhC6SJhoOoYMiRcP6Jnnz306/375a A==; X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="303223028" X-IronPort-AV: E=Sophos;i="5.96,261,1665471600"; d="scan'208";a="303223028" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2022 22:15:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="775570890" X-IronPort-AV: E=Sophos;i="5.96,261,1665471600"; d="scan'208";a="775570890" Received: from dpdk-xuke-lab.sh.intel.com ([10.67.119.8]) by orsmga004.jf.intel.com with ESMTP; 20 Dec 2022 22:15:55 -0800 From: Ke Xu To: dts@dpdk.org Cc: ke1.xu@intel.com, yuan.peng@intel.com, weiyuanx.li@intel.com Subject: [DTS][PATCH V1 2/3] test_plans/vf_offload: add packets count, super-long packets and random payload to the case. Date: Wed, 21 Dec 2022 14:14:21 +0800 Message-Id: <20221221061422.9144-3-ke1.xu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221221061422.9144-1-ke1.xu@intel.com> References: <20221221061422.9144-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 e5804fbf..00548a5a 100644 --- a/test_plans/vf_offload_test_plan.rst +++ b/test_plans/vf_offload_test_plan.rst @@ -316,75 +316,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. @@ -427,12 +435,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 ========================================== @@ -479,9 +486,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 Dec 21 06:14:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ke Xu X-Patchwork-Id: 121156 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 75EEEA034C; Wed, 21 Dec 2022 07:16:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 729B540FDF; Wed, 21 Dec 2022 07:16:02 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 6AA4E40684 for ; Wed, 21 Dec 2022 07:15:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671603359; x=1703139359; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EqGeSQddhwFlRmvUMhXZzXUDji0lYFUwndPmvlRhuW4=; b=ZoAZHtI68UqGKMJIAvN/g1PjbCVXr3HkKcbAAncp5ZTPaC++lZG4wFKf HrRHr7BbbDREHJGU6U+JIPAKeuNHgmeQUfqQOYN/CNNjmP9YBXMu5eUgg mMayAYCmTL78IwzHJAhT79ktsKXUekrmR+nwj6jMET4W7UzXBUfkd+WLf X90G0IOI+f4WVLKlGA4ZebnCLi1AImimAeyVf6BpN7NtK+fJZQP7TMFSD hMXU9xZ34NBVZUd69PQ7/4+DrInNOiaBgv1/OMEe3U3CTyNVut5vcXNAS QuEjqQHa0EaaKUMjtu8Odd8G7XkyJvC2i6d+POcqbkLvMddpWpma4Wlrt A==; X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="303223032" X-IronPort-AV: E=Sophos;i="5.96,261,1665471600"; d="scan'208";a="303223032" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2022 22:15:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="775570893" X-IronPort-AV: E=Sophos;i="5.96,261,1665471600"; d="scan'208";a="775570893" Received: from dpdk-xuke-lab.sh.intel.com ([10.67.119.8]) by orsmga004.jf.intel.com with ESMTP; 20 Dec 2022 22:15:57 -0800 From: Ke Xu To: dts@dpdk.org Cc: ke1.xu@intel.com, yuan.peng@intel.com, weiyuanx.li@intel.com Subject: [DTS][PATCH V1 3/3] tests/vf_offload: implement packets count, super-long packet and random payload. Date: Wed, 21 Dec 2022 14:14:22 +0800 Message-Id: <20221221061422.9144-4-ke1.xu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221221061422.9144-1-ke1.xu@intel.com> References: <20221221061422.9144-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 --- tests/TestSuite_vf_offload.py | 66 ++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 25 deletions(-) diff --git a/tests/TestSuite_vf_offload.py b/tests/TestSuite_vf_offload.py index 07e150cf..bc0df943 100644 --- a/tests/TestSuite_vf_offload.py +++ b/tests/TestSuite_vf_offload.py @@ -738,7 +738,14 @@ class TestVfOffload(TestCase): self.tester.get_local_port(self.dut_ports[1]) ) - self.loading_sizes = [128, 800, 801, 1700, 2500] + 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" @@ -812,13 +819,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") @@ -831,29 +838,29 @@ class TestVfOffload(TestCase): self.logger.info(tx_outlist) if loading_size <= 800: self.verify( - rx_stats == tx_stats and int(tx_outlist[0]) == loading_size, + rx_stats == tx_stats and all([int(tx_outlist[j]) == 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(tx_outlist[i]) == 800, + all([int(tx_outlist[i * packet_count + j]) == 800 for j in range(packet_count)]), "the packet segmentation incorrect, %s" % tx_outlist, ) if loading_size % 800 != 0: self.verify( - int(tx_outlist[num]) == loading_size % 800, + all([int(tx_outlist[num * packet_count + j]) == loading_size % 800 for j in range(packet_count)]), "the packet segmentation incorrect, %s" % tx_outlist, ) - 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") @@ -866,19 +873,19 @@ class TestVfOffload(TestCase): self.logger.info(tx_outlist) if loading_size <= 800: self.verify( - rx_stats == tx_stats and int(tx_outlist[0]) == loading_size, + rx_stats == tx_stats and all([int(tx_outlist[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(tx_outlist[i]) == 800, + all([int(tx_outlist[i * packet_count + j]) == 800 for j in range(packet_count)]), "the packet segmentation incorrect, %s" % tx_outlist, ) if loading_size % 800 != 0: self.verify( - int(tx_outlist[num]) == loading_size % 800, + all([int(tx_outlist[num * packet_count + j]) == loading_size % 800 for j in range(packet_count)]), "the packet segmentation incorrect, %s" % tx_outlist, ) @@ -897,7 +904,14 @@ class TestVfOffload(TestCase): self.tester.get_local_port(self.vm0_dut_ports[1]) ) - self.loading_sizes = [128, 800, 801, 1700, 2500] + 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" @@ -954,7 +968,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 @@ -964,9 +978,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") @@ -975,26 +989,27 @@ class TestVfOffload(TestCase): rx_stats = self.number_of_packets(rx_interface) tx_stats = self.number_of_packets(tx_interface) tx_outlist = self.number_of_bytes(rx_interface) + tx_outlist.sort(reverse=True) self.logger.info(tx_outlist) if loading_size <= 800: self.verify( - rx_stats == tx_stats and int(tx_outlist[0]) == loading_size, + rx_stats == tx_stats and all([int(tx_outlist[j]) == 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( - int(tx_outlist[i]) == 800, + all([int(tx_outlist[i * packet_count + j]) == 800 for j in range(packet_count)]), "the packet segmentation incorrect, %s" % tx_outlist, ) if loading_size % 800 != 0: self.verify( - int(tx_outlist[num]) == loading_size % 800, + all([int(tx_outlist[num * packet_count + j]) == loading_size % 800 for j in range(packet_count)]), "the packet segmentation incorrect, %s" % tx_outlist, ) - 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 @@ -1006,7 +1021,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") @@ -1015,22 +1030,23 @@ class TestVfOffload(TestCase): rx_stats = self.number_of_packets(rx_interface) tx_stats = self.number_of_packets(tx_interface) tx_outlist = self.number_of_bytes(rx_interface) + tx_outlist.sort(reverse=True) self.logger.info(tx_outlist) if loading_size <= 800: self.verify( - rx_stats == tx_stats and int(tx_outlist[0]) == loading_size, + rx_stats == tx_stats and all([int(tx_outlist[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( - int(tx_outlist[i]) == 800, + all([int(tx_outlist[i * packet_count + j]) == 800 for j in range(packet_count)]), "the packet segmentation incorrect, %s" % tx_outlist, ) if loading_size % 800 != 0: self.verify( - int(tx_outlist[num]) == loading_size % 800, + all([int(tx_outlist[num * packet_count + j]) == loading_size % 800 for j in range(packet_count)]), "the packet segmentation incorrect, %s" % tx_outlist, )