From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 07959A0C41; Mon, 2 Aug 2021 11:30:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE93041123; Mon, 2 Aug 2021 11:30:01 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 561EE40140 for ; Mon, 2 Aug 2021 11:30:00 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10063"; a="211549273" X-IronPort-AV: E=Sophos;i="5.84,288,1620716400"; d="scan'208";a="211549273" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Aug 2021 02:29:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,288,1620716400"; d="scan'208";a="510038683" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by FMSMGA003.fm.intel.com with ESMTP; 02 Aug 2021 02:29:59 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Mon, 2 Aug 2021 02:29:58 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Mon, 2 Aug 2021 02:29:58 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Mon, 2 Aug 2021 02:29:58 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.42) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Mon, 2 Aug 2021 02:29:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mQjoJHWZ1OJZdMiNMwZpb7pWlcG1Il3akdppI+EI6Wacyayv0NWHt/7GkGN+cQwfDv8ZzynAlISWeOd4oH0e62GWlnweZow5j0BNk64eroE0qNkKeb5wIFX93QMBQKFmjkB9p7Nl2ws26FQYnEEMRH/AJyJLb4RWLF9dI1i6f6W3VFJ8T1ZJG4QAhputWHnxNT/O6pcjeJDavhrTEVkwf5nXwCzPnE2aKaRPFPdlVWW4KHJKeiv+Re1ge+C4otjbirL/VKpZ3AF0kPJztwy2J6gHHfXQb0KPTiPAituYACrgsk/zyMWJIiiIolCukKbkJvjtPiGyGh+hvr4OCrxdQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PQFIAo5FCLtk0CM0vIA2fl3x2coSlMAFn6DvJGlL3mM=; b=cMrziNw3cFPiv15xGCusPPXVKI88cp3FPJOCyKNqegVa1GxOLuhK2XRmGnn+Co9RE8Va0dRbHayflB/Z0Xt6/7lMp810k53dp1JoT8JkLyBNNJ4ooHCxuhYI+aHYr1mFA+nCnCFDWiSWPhpDs/W/sNNqs0Zrn1Ip0JMWAKExGrsY8+RG1sHolJvDazzpEsC8VRqLLTYBiCUXvPXOz0p6oAVrlfjf1ZqlqfAjcohmfsIevRtv4ZJrl/g/glpBpAdAagiqY/p0UAVzW5a+X84idyI8MYxJBdSfvqsnLeo9zVHg/B20neC2nDiqHCYIzzsaCvYQKlp6n1YVZmCMakoLZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PQFIAo5FCLtk0CM0vIA2fl3x2coSlMAFn6DvJGlL3mM=; b=yCanRDDZXLhU48E0WkkYQkFk3A6XIjY7wLFTg+jR8Adl2WNraht0P545RdDVZEDeeBsOOtuRsUlZ3DbV/jQTmkjvON5rblxXF78sqMgjr4zcox1MBxOwOeY0UA7xrIrhR4Nii+Af141L5tgh/tzv1UTx0Qa1LwULH+BaG3KU9vU= Received: from BN7PR11MB2658.namprd11.prod.outlook.com (2603:10b6:406:ae::16) by BN7PR11MB2659.namprd11.prod.outlook.com (2603:10b6:406:ab::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4373.26; Mon, 2 Aug 2021 09:29:57 +0000 Received: from BN7PR11MB2658.namprd11.prod.outlook.com ([fe80::152:a489:e4ab:faf3]) by BN7PR11MB2658.namprd11.prod.outlook.com ([fe80::152:a489:e4ab:faf3%5]) with mapi id 15.20.4373.026; Mon, 2 Aug 2021 09:29:57 +0000 From: "Lin, Xueqin" To: "Jiang, YuX" , "dts@dpdk.org" CC: "Jiang, YuX" Thread-Topic: [dts] [PATCH V1 2/2] tests/rxtx_offload: add test case test_txoffload_port_multi_segs Thread-Index: AQHXhEFxy9jj4KfFUUeouoiRCpXz86tf+UyQ Date: Mon, 2 Aug 2021 09:29:56 +0000 Message-ID: References: <1627539383-26588-1-git-send-email-yux.jiang@intel.com> <1627539383-26588-3-git-send-email-yux.jiang@intel.com> In-Reply-To: <1627539383-26588-3-git-send-email-yux.jiang@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ff4644b4-f872-4e05-232a-08d9559817aa x-ms-traffictypediagnostic: BN7PR11MB2659: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:11; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lk1nRykygyfapvunTHdSIlcQj8w/lE7mhKq3B9bRpl+KVj1tDwV3zbSRrBGYat0Hg7/eBNV5ApLytlfaSNupaql6QYnvyXJG5hfh3uuv5glfvZxDOVjbE1TPZQHB5ZzY8odcBeCcVpAm1lNu2YM2KVz49coYKRX3Ymjmj0QgmmJGuo5EsNs57zNjo+Vp+ZOVQzHZ1/aDC60D1/egZjDvKLsEDFkdbSTP90lkGOPD2H0VK80L0SD5f3plhghxZZ+/3bD/PAFXhkEPIeG2IANAXMj4pDXf7IGGoYF0gMuWcfjBGWR1G6Wf0JFvdr0IQXbG4pbttTkrXiABCiJGN4qPNTlSlBMnozsQqrjTRscLKL1pCuiXDYV0YtzE1N1VDWoT0BgwWmdvG18zbpgVePa+xcHAg/UbpwDzgoXxcCmLwc6/MHPlyhLhZbcrhRXbf6ylHyojd61BLR7u8zi3MrTC8qfQKmACpEH0eUf5AM9eCTWqoe/ayj07KMIOGKji49C6tYQZiZvocX9RTeRoIVQFoV7d4jkkr8hNSbCvN9179inXR3W8+KxlUgiqdVrjToAGefW0xfEEx/sEgRuW5OJy8CfmClzFDMC66K/74CjaJCGgi4uirE1z9PwP7z9fNCIhNXMZFQwzfASQcdUKolJ3DXDSqbSmlwBUN5NQps7vPY4YRyHNuL12zZGbUj60Yk18UuXWxMq7xv2ar3UjGnV8iA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN7PR11MB2658.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(39860400002)(376002)(136003)(346002)(66556008)(66446008)(64756008)(38100700002)(66476007)(4326008)(7696005)(316002)(66946007)(110136005)(26005)(8676002)(8936002)(478600001)(5660300002)(33656002)(2906002)(107886003)(55016002)(9686003)(71200400001)(38070700005)(86362001)(83380400001)(186003)(53546011)(52536014)(6506007)(122000001)(76116006); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?HX/rQAmwtWt58QSGdCCWz6EyEHvP2zBp1Uw1R61dIR9C9VI9A0d0ZDvCEvOG?= =?us-ascii?Q?ILsoIE2GzPInT3koOZlNl8dGLud0T+/uOpRxL5D1dIlcycMhCsNtks4rbjOZ?= =?us-ascii?Q?F0xUEd6xGLKhAOn2IKzL/Nr0Sxr6mh3A0F4zxwSDmTnyCI0zXtEkw9scNGMN?= =?us-ascii?Q?/3ChgkAy9k/wSxF5359kAlADiHua/41zEz74SLMcldY3bZ13wpWKcf/wmsMT?= =?us-ascii?Q?7JB2h5LAyhA9WehLSrJTRaz3szupGcytoqq9gS8xwbKmneH+yBVcV3MH181n?= =?us-ascii?Q?QSErVD2ElPQhyx6vFqrQ1gvCZbdYaLN7LcMEE1a6sSx4UU9mevM8HB4pilE8?= =?us-ascii?Q?JH+T3lQKQ9flqggF/w5eQDV4mX+5PEws2sPT0J1jzvPL4hcCzxXbUFCl9W5Z?= =?us-ascii?Q?bbyeqspebK1AvRrGFg528Y94lMiK1ie+2JJXmbhlcUlYzB2NaXG7w6mclCZd?= =?us-ascii?Q?WqkXojU2+Sv0l19+SyyHZ39zdzyNX2xf0wU54z1OEztXyw3BjIgI/Lx+TqOQ?= =?us-ascii?Q?8g0m8G5XWe1XqZtsAU/nZ7dt4BMuPBo4E3Awi/mnhiI/zEbJc92hBDIyzz2f?= =?us-ascii?Q?LbSQqoghQPqgyKpnCb/n0J6H0W3CYcpKbn7MZRu1q1SEj+O/Msqn5Z8JUENp?= =?us-ascii?Q?l/XDagxxMdDkgMmHeTYLjgslbDa2enkTlTl2aH+97aEXagU4o5r3MH23m08V?= =?us-ascii?Q?F3uF+H/HfPIw0+hS3JWCb0jiOnQLFumlB11+WUHHK6GK9REv64+xCSq+uha0?= =?us-ascii?Q?eUB1gt+O3/e/Q7j3dy7c28YTlFnZAE8mKDpPnPx1xmPz0Frd1gmXNRhZDMtg?= =?us-ascii?Q?wYQ+OKLBsFeNBVIuUQmRXrz3Gt7xbm2c7OjC93PZ6qSqDYwd631OqY0SMakT?= =?us-ascii?Q?80v/q3xyIaf625xj6YG4N3Hit9enmbjSrqez1aHATOEd+KtFJq1mnFaDTnLC?= =?us-ascii?Q?Xx4zd69IIVio0l9uFnaBLUotLcDp2EY93zDsbCbcul6E8GOELh+L5q8OJnsP?= =?us-ascii?Q?pUj7kv3NIvphI+hQTdwC07h8xRw/FsDZV8JaSfxjp1YRgGi/UMN+m8mcwXNq?= =?us-ascii?Q?8elhgsHxVvKdl9Lec0yWxD3N19TWRRkvQvPrek1EPvYACWfYdTIL7EI3GmWM?= =?us-ascii?Q?aSL1E4mTBh/TBOVjhPDGVHDsfcc+nXfIJdd2ZUQKNtl7c1YK0jlCQ0nq7f1W?= =?us-ascii?Q?RN0HYug2zJHZeGfmTbS/g0/NjsNflSdzFyXCT8TurP97VSDCALV+Y4Ry57if?= =?us-ascii?Q?inM68rToeATcNESFBLwuPFANZ1Uzy92AKjaE/d1cx3H6Jcp6Qzklm170KVc+?= =?us-ascii?Q?amnpTdtO/WK3AE7w+ev2m80I?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN7PR11MB2658.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ff4644b4-f872-4e05-232a-08d9559817aa X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Aug 2021 09:29:56.9722 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: W1wSOgC4LKXt1wMxtKJodSXC8cgmJ4UvCLEJbS5gl1+c2rSiuLevzN6pnsUZ3XPNVgdOWDNDXjl58tqYQiOnUw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2659 X-OriginatorOrg: intel.com Subject: Re: [dts] [PATCH V1 2/2] tests/rxtx_offload: add test case test_txoffload_port_multi_segs 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 Sender: "dts" > -----Original Message----- > From: dts On Behalf Of Yu Jiang > Sent: Thursday, July 29, 2021 2:16 PM > To: dts@dpdk.org > Cc: Jiang, YuX > Subject: [dts] [PATCH V1 2/2] tests/rxtx_offload: add test case > test_txoffload_port_multi_segs >=20 > add test case test_txoffload_port_multi_segs >=20 > Signed-off-by: Yu Jiang Acked-by: Xueqin Lin > --- > tests/TestSuite_rxtx_offload.py | 66 > +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 66 insertions(+) >=20 > diff --git a/tests/TestSuite_rxtx_offload.py b/tests/TestSuite_rxtx_offlo= ad.py > index 0e70526..48fb739 100644 > --- a/tests/TestSuite_rxtx_offload.py > +++ b/tests/TestSuite_rxtx_offload.py > @@ -209,6 +209,26 @@ class TestRxTx_Offload(TestCase): > acl_offload =3D offloads[offload[i]] > self.verify(acl_offload in queue_line[i], "Fail to confi= gure offload by > queue.") > i =3D i + 1 > + > + def verify_packets_increasing(self, rxtx=3D"tx", count=3D2): > + # Verify RXTX-packets increasing on each ports, check count < 20 > + out1 =3D self.dut.send_expect("show port stats all", "testpmd> "= ) > + i =3D 0 > + while i < count: > + if rxtx =3D=3D "tx": > + pks_l1 =3D re.findall(r'TX-packets: (\w+)', out1) > + time.sleep(15) > + out1 =3D self.dut.send_expect("show port stats all", "te= stpmd> ") > + pks_l2 =3D re.findall(r'TX-packets: (\w+)', out1) > + self.logger.info("Times=3D"+ str(i) + ", count=3D" + str= (count) + ", > pks2_cur=3D" + str(pks_l2) + ", pks1_before=3D" + str(pks_l1)) > + for index in range(len(pks_l2)): > + self.verify(int(pks_l2[index]) > int(pks_l1[index]),= "TX-packets > hang") > + if int(pks_l1[index]) < 300000000 or int(pks_l2[index]) = < 300000000: > + count +=3D 1 > + i +=3D 1 > + if count > 20: > + self.verify(False, "Check count timeout") > + break >=20 > def get_queue_number(self, packet): > """ > @@ -716,6 +736,52 @@ class TestRxTx_Offload(TestCase): > offload =3D ["mbuf_fast_free"] > self.check_port_config("tx", offload) >=20 > + def test_txoffload_port_multi_segs(self): > + """ > + Tx offload multi_segs setting. > + """ > + offload =3D ["multi_segs"] > + # Start testpmd with "--tx-offloads=3D0x00008000" to enable mult= i_segs > tx_offload > + self.pmdout.start_testpmd("%s" % self.cores, "--tx-offloads=3D0x= 00008000") > + for portid in range(len(self.dut_ports)): > + self.check_port_config(rxtx=3D"tx", offload=3Doffload, > + port_id=3Dportid) > + > + # Set fwd to txonly, Set the length of each segment of the TX-ON= LY > packets, Set the split policy for TX packets, then start to send pkgs > + self.dut.send_expect("set fwd txonly", "testpmd> ") > + self.dut.send_expect("set txpkts 64,64", "testpmd> ") > + self.dut.send_expect("set txsplit rand", "testpmd> ") > + self.dut.send_expect("start", "testpmd> ") > + > + # Check TX-packets will not hang and continue to increase > + self.verify_packets_increasing(rxtx=3D"tx") > + self.dut.send_expect("stop", "testpmd> ") > + self.dut.send_expect("quit", "# ") > + > + # Start testpmd again without "--tx-offloads", check multi-segs = is disabled > by default > + self.pmdout.start_testpmd("%s" % self.cores, " ") > + for portid in range(len(self.dut_ports)): > + outstring =3D self.dut.send_expect("show port %d tx_offload > configuration" % portid, "testpmd> ") > + self.verify("MULTI_SEGS" not in outstring, "multi-segs is > + not disabled by default") > + > + self.dut.send_expect("port stop all", "testpmd> ") > + for portid in range(len(self.dut_ports)): > + cmd =3D "port config {} tx_offload multi_segs on".format(por= tid) > + self.dut.send_expect(cmd, "testpmd> ") > + self.dut.send_expect("port start all", "testpmd> ") > + for portid in range(len(self.dut_ports)): > + self.check_port_config(rxtx=3D"tx", offload=3Doffload, > + port_id=3Dportid) > + > + # Set fwd to txonly, Set the length of each segment of the TX-ON= LY > packets, Set the split policy for TX packets, then start to send pkgs > + self.dut.send_expect("set fwd txonly", "testpmd> ") > + self.dut.send_expect("set txpkts 64,64", "testpmd> ") > + self.dut.send_expect("set txsplit rand", "testpmd> ") > + self.dut.send_expect("start", "testpmd> ") > + > + # Check TX-packets will not hang and continue to increase > + self.verify_packets_increasing(rxtx=3D"tx") > + self.dut.send_expect("stop", "testpmd> ") > + self.dut.send_expect("quit", "# ") > + > def tear_down(self): > """ > Run after each test case. > -- > 2.7.4