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 73294A0C4B; Thu, 21 Oct 2021 08:33:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 39F25410E2; Thu, 21 Oct 2021 08:33:53 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id DDA7040142 for ; Thu, 21 Oct 2021 08:33:51 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10143"; a="292421600" X-IronPort-AV: E=Sophos;i="5.87,169,1631602800"; d="scan'208";a="292421600" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2021 23:33:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,169,1631602800"; d="scan'208";a="491640548" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga007.fm.intel.com with ESMTP; 20 Oct 2021 23:33:50 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 20 Oct 2021 23:33:50 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 20 Oct 2021 23:33:49 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 20 Oct 2021 23:33:49 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 20 Oct 2021 23:33:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gk0IFMK49gBVsjJTTPWZ0VkKwRb/duuOFclR8Mu4pPjupMD1FVWKK12ynq3P9v5H4a7Do/j7PDbBI4akJhJng8w8WbgLYfTKhhp4qPHR+WFPIZlEPEaFKRLPPg5h/rtHV8JzjM7OBSw7hvEgW0Ye4NZqrsjn77TZBMQAdMZYvkOV1cN0tOrzFrtg3rli+qUr3rmTOPIZ/8qwpJ6Q6OVNbcfyFYCoiz4uBeXpZBcPu2NbLOXwJp5qqu0QFaO5GZQeSd54k/4NTeShM3nOtIBIJBAcDoiMsCdEGjCFSD41VbYU/Butce/npk/E4yR2/tmtB8At0CGC5DME0kPbBuxnkA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=U0K/QcFhsLuYxvPjMjMXm5uewDmHCYC3L9RFyeRuJxk=; b=Yh6Bq9voWV3BxFvkx1WVRGlxeCLx83wmgX6cvM61AOndmts7oOae2cTu9QaouX2cIj6TLfKqyhqiXwbj08wrdkTQOMYp5SgXAePkLdt0YItJaoz/RXfL3vmZPTNhfhgyKRQSEOeO6ShY4ycQ3NKZG+OL5LBhpLEYTUL2u2g18YtuU2NBOIdVxw9q0HXEABkOc+/+mWoczuonkKWXv/s/K/g0JXMR5y8RzK2/d1e4HXds2uCY4pV4nXvdoeKtP/YwNfVefIUJyv7sFZrid1uAhYRJWNv010FltDpbKjselpQmGVtj4ZT6sKr9tXrau0DdljUtLrYHNHhY6b8N8wynQQ== 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=U0K/QcFhsLuYxvPjMjMXm5uewDmHCYC3L9RFyeRuJxk=; b=MfOxPH4Kb11YuodJ2qpSsWgU0UFJCLMLb82YmWyb5gBp6R5SE+rMw15ot6l84SLFCIsYeM2/SWyJg1NUV22ZSdTvLM3l347Uz0WrdI70Gfr+AN+BtGuFHkEQocGzQFgLuKDV857MKDlErPBEVGcAvFb5zbaYQp9ftfYYJ/tJ8Jc= Received: from DM4PR11MB5534.namprd11.prod.outlook.com (2603:10b6:5:391::22) by DM6PR11MB2731.namprd11.prod.outlook.com (2603:10b6:5:c3::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.18; Thu, 21 Oct 2021 06:33:48 +0000 Received: from DM4PR11MB5534.namprd11.prod.outlook.com ([fe80::3d9b:76d7:e274:bad3]) by DM4PR11MB5534.namprd11.prod.outlook.com ([fe80::3d9b:76d7:e274:bad3%4]) with mapi id 15.20.4628.018; Thu, 21 Oct 2021 06:33:48 +0000 From: "Li, Xiaoyun" To: Xueming Li , "dev@dpdk.org" , "Zhang, Yuying" CC: Jerin Jacob , "Yigit, Ferruh" , Andrew Rybchenko , Viacheslav Ovsiienko , Thomas Monjalon , Lior Margalit , "Ananyev, Konstantin" , Ajit Khaparde Thread-Topic: [PATCH v12 7/7] app/testpmd: add forwarding engine for shared Rx queue Thread-Index: AQHXxjnvmlmEzpURj0OFeFwiqTEfDavc93sg Date: Thu, 21 Oct 2021 06:33:48 +0000 Message-ID: References: <20210727034204.20649-1-xuemingl@nvidia.com> <20211021050832.2599691-1-xuemingl@nvidia.com> <20211021050832.2599691-8-xuemingl@nvidia.com> In-Reply-To: <20211021050832.2599691-8-xuemingl@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1dec7b06-2b67-4517-90c1-08d9945cbd52 x-ms-traffictypediagnostic: DM6PR11MB2731: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4941; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: V3vCrA51OOc7giwX+StT9HYr2LDc+tZCgDk6QeoSjsL2TldCPGMKODm7d3kVJ0vGPAIafe/RgdOOhP5DUZtkSF2OFNjhUj3SYf7+dqOdo58meYkiQI+R7/lz73MeaPfgU+HRwhN+We5yARdEcFXAQM7XvXDJQexoCqLB+4Dyap6CfbBC+sHRBL66pdADXa4BVR5YlaDIfWJh1shRbOE5V3Dh/kVmZB7wYcRGtnvfPrca3fTU8LlQQqmbqzj/3Uxsm1Z5C/fX72Eg3pex3bSU7KEGDtyljKoBhbLKhXo15vnJO3f1Nw4IqYmjSPWeFG6C882F3Wqt6T9DHIpG/HoMiVpjURfTG7WgsNBMlSkjY7XfUgPhpqc8SXcWi/jjOzxaQ8j1mVuA+OjsnM/qW1ep0RdiaxJ/m5vTGIAhMHTXaweC0hGh2jxsPZBTzNG9gqKFFXmEK+YcSCLuoFGlTFok7qtorfS1c5rKViQe/YR1R75dAS4KzM0vSMJxSgulzJqL+PkavP3D1eg19AOHJtcLexxcOrhLD1VIWUqzk9sHCdhh5PbLXsdfMjl3Rd7MC9WR8gDu4o/Iw20g/VVLoaZ26Otk38gc3pb9Czluc+LwigkyMHHTVncBqjtOXaK61k5UdQNRzVBEnulT+heC2OhAcF2agk1BBdSVEhN35rK+IqAVfIXyz8R+cTmqx0dkw9VsqKlT+mPdg8vJJ7r/tOqx0A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5534.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(64756008)(66556008)(66476007)(66446008)(66946007)(76116006)(33656002)(316002)(4326008)(8936002)(52536014)(8676002)(2906002)(83380400001)(508600001)(26005)(6506007)(186003)(38100700002)(54906003)(110136005)(122000001)(38070700005)(6636002)(86362001)(5660300002)(7696005)(71200400001)(53546011)(82960400001)(9686003)(55016002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?xt+aGRSW1+efJCcJaHayXJskBTvS+lVfnXJAIKZ42Judm1Q+hMTnok2Ugasc?= =?us-ascii?Q?ik4bjBDncANZvFpU28IzmbmWjn6leNDEcl9LbofKAspvpVSkcGe75cFXyebH?= =?us-ascii?Q?aKNF9riarF7ROu9VO7UgNiWXf1+mdrlOlNBVFvwYIKlbhppm22/m/WHFBo7S?= =?us-ascii?Q?druaZcAcP6meWbGd6/mo6NF9xhaA3vM8Jbj5H1+tx7x1Nf04QFMSo2hn/bFq?= =?us-ascii?Q?zSdsL3V6CijJXNu1JUzMPQHsv8x6oxsg81J16/wqfkis7Lbnhcipcazd8iSG?= =?us-ascii?Q?gOpmF7ydgRJilhKXCD0IpLfw+gIeMra1JTIv587MU4Q4Ewf0t8vtwSZBmMc1?= =?us-ascii?Q?AentscpfATlc02ejXtYf3XQW86GEUvqveeyeGRlInb04OXeRE8c2PQtKsmhc?= =?us-ascii?Q?/3OM8Etbpzuyfbm0bMP3lS5Eaftf0inZVQCTUILCQnHQzYbI11fCTq19gpQ1?= =?us-ascii?Q?C7Nql35gRKPbMeCWsmNNuLeE+b4BwokJCAr4E4PBewtnViYMlBx7jUpe8Yol?= =?us-ascii?Q?apzZz+HWMaojVlmJG2oZ3yA2PxLU9NWo6V68kkqVJm9swUPrEXtWzc8Cw6M+?= =?us-ascii?Q?CD+gEi2rT2Nv9+79HCBEeTepNY3JNclLYNth3iddYGcu6l0r5/bzQ2slRaf1?= =?us-ascii?Q?t8rL1dfhxoq9m5Upzd3w9Bevq4k90OmtRTTm7kbO7QXNka3yEU8rwOTKTA8d?= =?us-ascii?Q?o0+lAtv4eganYxE0oAhs75OsCVKZERWb/gFw27s6r9hH0ri1fAxwBOwowBRX?= =?us-ascii?Q?F+owbwk2iV9/qm+BgFMtd1WCbhHS3eMutxk7kcp4jvbm1teVCTDDgu5o8oB6?= =?us-ascii?Q?d3+pgocLLxpmn0SmcQGrfEWF5f7t6W6hwEvR5MHLTM60LnwUqvduBk8+5I4h?= =?us-ascii?Q?h9GtYR9/jqupFNUtg3/C3MeThujXYs5NU8CRjTGHcCxGY0DYww5x89vYJ0ZP?= =?us-ascii?Q?krpVE2u/L3GDzQEmyYYV4O19WnJfuEp8Mnpm/YjKnpUIKpm5NLFUGcF2HBMQ?= =?us-ascii?Q?gvaTntTOGraIw6gV43cPYRsCQUutkyYKFdlu4Ow8jKopQQASZWeVqcB82xEx?= =?us-ascii?Q?fG0DN+Fpc308U0N2+LLOAFwBFnfQJSFuh36FwBAQ6jZ/IT75eywUGIDkAjn4?= =?us-ascii?Q?R5LnBTpH96NP6zul+bxTzLZGcZfyrc48CwhMwM8mSy/AS6o+kjbyOg5JaA8b?= =?us-ascii?Q?bQFBHPGUpWNwfGg2WvfylDb3n+6OFyJj1LdX5yGlLCwQCUGhnjE4RFxXsd3s?= =?us-ascii?Q?SZxM7nFv5YEC4dFqWBzKG373kUMStZq0if5ZK9855G5G2GcUco3G9djg5Gav?= =?us-ascii?Q?nvM=3D?= 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: DM4PR11MB5534.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1dec7b06-2b67-4517-90c1-08d9945cbd52 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Oct 2021 06:33:48.2996 (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: xiaoyun.li@intel.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2731 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v12 7/7] app/testpmd: add forwarding engine for shared Rx queue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Xueming Li > Sent: Thursday, October 21, 2021 13:09 > To: dev@dpdk.org; Zhang, Yuying ; Li, Xiaoyun > > Cc: xuemingl@nvidia.com; Jerin Jacob ; Yigit, Ferr= uh > ; Andrew Rybchenko > ; Viacheslav Ovsiienko > ; Thomas Monjalon ; Lior > Margalit ; Ananyev, Konstantin > ; Ajit Khaparde > > Subject: [PATCH v12 7/7] app/testpmd: add forwarding engine for shared Rx > queue >=20 > To support shared Rx queue, this patch introduces dedicate forwarding eng= ine. > The engine groups received packets by mbuf->port into sub-group, updates > stream statistics and simply frees packets. >=20 > Signed-off-by: Xueming Li > Acked-by: Xiaoyun Li I didn't ack you on this patch. I remember I added "+1" to the comment abou= t your includes issue. It will confuse reviewers not to review new versions. > Acked-by: Ajit Khaparde I didn't see he ack this patch as well. Please remove these acks. > --- > app/test-pmd/meson.build | 1 + > app/test-pmd/shared_rxq_fwd.c | 113 ++++++++++++++++++++ > app/test-pmd/testpmd.c | 1 + > app/test-pmd/testpmd.h | 5 + > doc/guides/testpmd_app_ug/run_app.rst | 5 +- > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 5 +- > 6 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 a= pp/test- > pmd/shared_rxq_fwd.c >=20 > diff --git a/app/test-pmd/meson.build b/app/test-pmd/meson.build index > 1ad54caef2c..b5a0f7b6209 100644 > --- a/app/test-pmd/meson.build > +++ b/app/test-pmd/meson.build > @@ -22,6 +22,7 @@ sources =3D files( > 'noisy_vnf.c', > 'parameters.c', > 'rxonly.c', > + 'shared_rxq_fwd.c', > 'testpmd.c', > 'txonly.c', > 'util.c', > diff --git a/app/test-pmd/shared_rxq_fwd.c b/app/test-pmd/shared_rxq_fwd.= c > new file mode 100644 index 00000000000..c4684893674 > --- /dev/null > +++ b/app/test-pmd/shared_rxq_fwd.c > @@ -0,0 +1,113 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright (c) 2021 NVIDIA Corporation & Affiliates */ > + Please add "#include " here. Your shared_rxq_fwd.c only needs this include. > +#include "testpmd.h" > + > +/* > + * Rx only sub-burst forwarding. > + */ > +static void > +forward_rx_only(uint16_t nb_rx, struct rte_mbuf **pkts_burst) { > + rte_pktmbuf_free_bulk(pkts_burst, nb_rx); } > + > +/** > + * Get packet source stream by source port and queue. > + * All streams of same shared Rx queue locates on same core. > + */ > +static struct fwd_stream * > +forward_stream_get(struct fwd_stream *fs, uint16_t port) { > diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index > 9482dab3071..ef7a6199313 100644 > --- a/app/test-pmd/testpmd.h > +++ b/app/test-pmd/testpmd.h > @@ -12,6 +12,10 @@ > #include > #include > #include > +#include > +#include > +#include > + Please remove these includes and this blank line. You only need to add the lib you need in your file like I said above. > #include > #include > #ifdef RTE_HAS_JANSSON > @@ -339,6 +343,7 @@ extern struct fwd_engine five_tuple_swap_fwd_engine; > #ifdef RTE_LIBRTE_IEEE1588 extern struct fwd_engine ieee1588_fwd_engine; > #endif > +extern struct fwd_engine shared_rxq_engine; >=20 > extern struct fwd_engine * fwd_engines[]; /**< NULL terminated array. */ > extern cmdline_parse_inst_t cmd_set_raw; diff --git > a/doc/guides/testpmd_app_ug/run_app.rst > b/doc/guides/testpmd_app_ug/run_app.rst > index faa3efb902c..74412bb82ca 100644 > --- a/doc/guides/testpmd_app_ug/run_app.rst > +++ b/doc/guides/testpmd_app_ug/run_app.rst > @@ -258,6 +258,7 @@ The command line options are: > tm > noisy > 5tswap > + shared-rxq >=20 > * ``--rss-ip`` >=20 > @@ -399,7 +400,9 @@ The command line options are: >=20 > Create queues in shared Rx queue mode if device supports. > Shared Rx queues are grouped per X ports. X defaults to UINT32_MAX, > - implies all ports join share group 1. > + implies all ports join share group 1. A new forwarding engine > + "shared-rxq" should be used for shared Rx queues. This engine does > + Rx only and update stream statistics accordingly. >=20 > * ``--eth-link-speed`` >=20 > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index 6d127d9a7bc..78d23429c42 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -314,7 +314,7 @@ set fwd > Set the packet forwarding mode:: >=20 > testpmd> set fwd (io|mac|macswap|flowgen| \ > - rxonly|txonly|csum|icmpecho|noisy|5tswap) (""|retry= ) > + > + rxonly|txonly|csum|icmpecho|noisy|5tswap|shared-rxq) (""|retry) >=20 > ``retry`` can be specified for forwarding engines except ``rx_only``. >=20 > @@ -357,6 +357,9 @@ The available information categories are: >=20 > L4 swaps the source port and destination port of transport layer (TCP = and UDP). >=20 > +* ``shared-rxq``: Receive only for shared Rx queue. > + Resolve packet source port from mbuf and update stream statistics > accordingly. > + > Example:: >=20 > testpmd> set fwd rxonly > -- > 2.33.0