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 598CD4240D; Wed, 18 Jan 2023 15:44:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E1645400D6; Wed, 18 Jan 2023 15:44:36 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2085.outbound.protection.outlook.com [40.107.243.85]) by mails.dpdk.org (Postfix) with ESMTP id 5FF654003F for ; Wed, 18 Jan 2023 15:44:35 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m+zQmnrZMN1bNh9KY6BAo/01LgrobjH6iPZQFWR1xdcib3lHlwFsg3/ARLkdF00oJhUyxzY4L1kwA/nW27Tt8z7kmezeliFrqL+O2rv1DAkQ8wCxb+VEklJfmoLNaO3MiV4tYBQ8MOqHgq2uqlXe5gMqH+lK+prRLuehl7V28u1lIe9riFh6TR4g8qzc15DEd+v2hBjhPdgeZ7O5RLp3tme2nLANFabTNFlpCIhw9IA30vakl4FQGXlc41dpqBadAdNVsn3QbPz9DvLfqIqD8SSkuXkjOShxYm4SlBHdkOIed9YUI3YwXdi67AFoJe9lq7lg/ZiDOqHvcuwqiFXxwA== 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=f23QRd4mRU915w7mR/1ahKoHBMZXtaQ8scUHV/AtROQ=; b=TqocANpPvS/t7t/l0hc/nG6YGtTM23+nbsU9ch2IufOZ2slY5t+dxEVCeV7h+NeAGeIYu6IaK4a67GIN7vmxFs6n9ig8N/YJ7k2PLkVUK2uRxcShRICKeKb5LQtxp8bIHSMt1FLZxxQ+iUgH+HpHKo4cxBpovUmP1z/wKoSE8WUsLAR854ReZoy9kmqmHXz5G8BVaIgcLNOo/DW4+bHnoC4zO6aCklVvhy2qnecGTmt23C6xmoQnboAVdYIRU+KFV/xBJm7S9/LFmXnWLBXqa/uhv/qQCOtJwhqNer8iZpWTvcW3/t6P/6Lj7VvkyLvfKRVc9txZLLG+xU4m1BG9fw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f23QRd4mRU915w7mR/1ahKoHBMZXtaQ8scUHV/AtROQ=; b=me8CV8BQZtSLXRuf/WJP1i/mHVwaiE93FWJHqemhwlfywQikiqZw4UiAX0LWkXv+APUsZFC5Tqut7pEN/rwIRibRrMkbeIyNAwdEhJGwTKwJjQ9eYy4zt66ji5y78PFLCFg6WU4ov39ahHMKziRWnItlHDBLFCNYHBHQWusGlz83zA93ihGg16KDcC5zeUrQXdxFYWLNY52f+ADrK+GMWfQScL+6W2TdwEq5+3SAQ2gGrCLwGNnhOgZvld08WoIKX+bmulEHiM24yG7dq62bHjQMa3hWfJrhOXKoVnjjqhTFrmDsBTqRxKb8wOeILVPSD7Ew+5ncK5YhXqJ+jxKHOA== Received: from PH0PR12MB5451.namprd12.prod.outlook.com (2603:10b6:510:ee::20) by DM4PR12MB6328.namprd12.prod.outlook.com (2603:10b6:8:a0::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.19; Wed, 18 Jan 2023 14:44:32 +0000 Received: from PH0PR12MB5451.namprd12.prod.outlook.com ([fe80::8900:6af5:cefb:469d]) by PH0PR12MB5451.namprd12.prod.outlook.com ([fe80::8900:6af5:cefb:469d%7]) with mapi id 15.20.5986.023; Wed, 18 Jan 2023 14:44:32 +0000 From: "Jiawei(Jonny) Wang" To: "NBU-Contact-Thomas Monjalon (EXTERNAL)" CC: Slava Ovsiienko , Ori Kam , Aman Singh , Yuying Zhang , Ferruh Yigit , Andrew Rybchenko , "dev@dpdk.org" , Raslan Darawsheh , "jerinj@marvell.com" Subject: RE: [RFC 2/5] ethdev: introduce the affinity field in Tx queue API Thread-Topic: [RFC 2/5] ethdev: introduce the affinity field in Tx queue API Thread-Index: AQHZFSdI9IwhgXjkakCvgonD0cOMeK6kOBoAgAAzprA= Date: Wed, 18 Jan 2023 14:44:32 +0000 Message-ID: References: <20221221102934.13822-1-jiaweiw@nvidia.com> <20221221102934.13822-3-jiaweiw@nvidia.com> <2006382.jNaZZp9DzI@thomas> In-Reply-To: <2006382.jNaZZp9DzI@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH0PR12MB5451:EE_|DM4PR12MB6328:EE_ x-ms-office365-filtering-correlation-id: a3c222fa-0d98-42da-bf15-08daf96282be x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WHmpKiz/nIo7mJl8twAI5FqiU7Q8wZMZS7VwkuupPpsXUTPnT9oDhq9OWoRot1u6Ox6c4tsjUvGXJZn4MuAQtjKirHdpK92vSWrjZk0uix7YvGbk15rajWfKXiSYHKuezBCzSk3f1DKIikSUrpz9XFNp2av+eOzMmWD0GYubne/6KcvEghRJIvecXSZoI+TyEGL9pk1TqLBcaO73hsNW7JxC4syYxTOxb5UNTV3Ow6wLyMvjVzwfrER6yLb3tSdI9A3VPm6lA+Mr+P9x+40iCETl77CB0WltBmw8HcEXkxZnwDMgvIndonEaQOBHIqzLuOoRauLt0TG2I+xU9yzOA8Ig8nW8j/8S+zqigg3cpx3hI+yWH4ofVOqP92hL3NxYRU42cMyhGFsbsQzfKMKSXD75pn/OD3Kd54qhLYaV5h0iol9MfAnOYhSgZ43ZW2e+ftxJAiUJStEFLz+2TiMYt1fwhp87b5VlJpQokAXl1ucw1vZfH0gaPFDydGmyzMMIf5GHmwzWq71Ft3isrIR1t8+bP3+HsCSNI14qVY83jM/E2FZvXkL7S6Ix6oGJB+W3ytpmSt+taFdsw6yOYscSfh1vXZtJ/f8V7DxMQyT1M1eEIJMK1ITWoKsiZ8049tuFcsQnxJCy8aeUo/7zCoGmpWE9IGVI/vpe/HvOTPbs4wDaQp+HAhz3vJFNity2OCs5q6hiOQG9DvXKwnkTBKaeiA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR12MB5451.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(346002)(39860400002)(396003)(376002)(366004)(451199015)(2906002)(5660300002)(52536014)(8936002)(86362001)(26005)(186003)(9686003)(33656002)(122000001)(38100700002)(66556008)(66476007)(66446008)(8676002)(66946007)(6916009)(4326008)(64756008)(38070700005)(55016003)(71200400001)(7696005)(316002)(76116006)(478600001)(6506007)(54906003)(41300700001)(83380400001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?A4lfa1q8KyvuxgNNWhn2rtkS0v9L4SQnu5tkwlMh7orYz0WQRd1XGUCJG6qy?= =?us-ascii?Q?9DKtczaSuAsShHPh2NEUcKrePaCq8pyWug5pGlx1XCBQJkIb0OQG4WX+9P7e?= =?us-ascii?Q?HzVCh4tf5ewKBBT2L7q+xFdGJdATeKPmDr3xAWRkhH5vmt5wQWcjeyPfexTx?= =?us-ascii?Q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ZE9mAhB/F7pAlbAQs8iwi1UM?= =?us-ascii?Q?MPF4+oVY9hGiMXm53tNMwchuZKyCpHZw7y+Bduiv4h0tAKBPD37q1vhwawb3?= =?us-ascii?Q?0BVNOQzdirHN6NdF9x4kK59uFAJqBCsh41crgKBrMwajBQdQhz9gt6XSMzyz?= =?us-ascii?Q?Lo3mQNfh73QsC/FnjblUyjGnikeZ0OYZY04STP7LMMGaQiAK43Iw/r8zBe1o?= =?us-ascii?Q?lz+skx6T33sO3dNAn9dsQo1nIb/bLMZ9SBwfWLvBo4MwE0gF+QaLuZqSBUQV?= =?us-ascii?Q?naavLtGF3N5CqIDMEAp3OPb940ekvyJG1DAEWwbqow+UK/G6/TugRv3U8Ztg?= =?us-ascii?Q?b28RCY67SKC0fDocqy0IO1/4RpRdFDWsHYMoceRwBHYPdG4RcdBRP5kjRQFy?= =?us-ascii?Q?FQMl+pjDNPBOGzO/NpsranL1Iqs0geREXNcJf/uTNZNd1WI47CZJPn25Qe3E?= =?us-ascii?Q?ErSAjm2SPqQNApXzwPleNc/zvLY9Juj8uya1Ejg68p8CdRkgBtfaywEqSdwU?= =?us-ascii?Q?j919q79N3m6JSgms5uA=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR12MB5451.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3c222fa-0d98-42da-bf15-08daf96282be X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jan 2023 14:44:32.1684 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: du4NzFogp3hwUwoAmtG34MguPgE+cnMpE82/ga2QR3tOcTjgyJNF/7o+oKEIYCs7SU4CjTV0qZIRzv/hkRGnmA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6328 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 Hi, >=20 > 21/12/2022 11:29, Jiawei Wang: > > For the multiple hardware ports connect to a single DPDK port > > (mhpsdp), the previous patch introduces the new rte flow item to match > > the port affinity of the received packets. > > > > This patch adds the tx_affinity setting in Tx queue API, the affinity > > value reflects packets be sent to which hardware port. >=20 > I think "affinity" means we would like packet to be sent on a specific ha= rdware > port, but it is not mandatory. > Is it the meaning you want? Or should it be a mandatory port? >=20 Right, it's optional setting not mandatory. > > Adds the new tx_affinity field into the padding hole of rte_eth_txconf > > structure, the size of rte_eth_txconf keeps the same. Adds a suppress > > type for structure change in the ABI check file. > > > > This patch adds the testpmd command line: > > testpmd> port config (port_id) txq (queue_id) affinity (value) > > > > For example, there're two hardware ports connects to a single DPDK >=20 > connects -> connected >=20 OK, will fix in next version. > > port (port id 0), and affinity 1 stood for hard port 1 and affinity > > 2 stood for hardware port 2, used the below command to config tx > > affinity for each TxQ: > > port config 0 txq 0 affinity 1 > > port config 0 txq 1 affinity 1 > > port config 0 txq 2 affinity 2 > > port config 0 txq 3 affinity 2 > > > > These commands config the TxQ index 0 and TxQ index 1 with affinity 1, > > uses TxQ 0 or TxQ 1 send packets, these packets will be sent from the > > hardware port 1, and similar with hardware port 2 if sending packets > > with TxQ 2 or TxQ 3. >=20 > [...] > > @@ -212,6 +212,10 @@ API Changes > > +* ethdev: added a new field: > > + > > + - Tx affinity per-queue ``rte_eth_txconf.tx_affinity`` >=20 > Adding a new field is not an API change because existing applications don= 't > need to update their code if they don't care this new field. > I think you can remove this note. >=20 OK, will remove in next version. > > --- a/lib/ethdev/rte_ethdev.h > > +++ b/lib/ethdev/rte_ethdev.h > > @@ -1138,6 +1138,7 @@ struct rte_eth_txconf { > > less free descriptors than this value. */ > > > > uint8_t tx_deferred_start; /**< Do not start queue with > > rte_eth_dev_start(). */ > > + uint8_t tx_affinity; /**< Drives the setting of affinity per-queue. > > +*/ >=20 > Why "Drives"? It is the setting, right? > rte_eth_txconf is per-queue so no need to repeat. > I think a good comment here would be to mention it is a physical port ind= ex for > mhpsdp. > Another good comment would be to specify how ports are numbered. >=20 OK, will update the comment for this new setting. Thanks.