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 791354247C; Tue, 24 Jan 2023 14:33:00 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 609D140150; Tue, 24 Jan 2023 14:33:00 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id 14356400EF for ; Tue, 24 Jan 2023 14:32:59 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZxOhRqodFxFzmn8KcBt8jVGpSfdPw3JbA75H/9EJOa9vz+kZ5wPpn7ykn2R9xXElRD2FkRmW2fVfYPq/Y03umExFkBlYgXSeAAtvWmtpjcvP4Ef52XfQNAIZr4pRQDspn3qShi5OjxEEISdnqC1rMGOY+CLyg5/mWwiDCJSiTtsq787Nw7QLRX2RKuey74siEGow73hGFsklr22YWkGF8Deq3PS/KKRTIsWyJGSIYNcVkmA1LBaznp9CbjpMkhP4oiwAgGuk9sgARoXH01WERNeA6mL52tTOKKqkmtE6LtsC/DIuAxgqRuV0sfv1DG8Os1IHnRO161mVIkXeqhodCA== 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=yhM6A8+x0CFaK4RVsRMHUvd4CX2ExtKFGiHYAJzl89U=; b=dK+rZgeY14nDPn/zCjbyyiOkAgeVNufdgxaXvjFMPTlf3VmJ0M+MGp0bLRt1OgBcAk/JtboKrxtDel+DCNFX8rakvo92jGwvR2ak44w1Zk2HFjsa2TnQ5W4nKZvNDmCmuF+k4OPluzoaceM5MMTKZG298Zl5x0fXPnBb6x70QbvRKt3Pr7lENLcprN726E5d4dpAa6V5VAlDCrLY9tFN4tMPhodB5mU13Wv6LAhtB/n92r5gOOlYWG/2FIsbvTT5mWPnhhAX2BJot13Z6LeWud8k/n+pW4pcFD/vhThFJIRyIL6wzJTnvEi8KdConYUDJqR2J0bYCq4iwbr1CMquwA== 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=yhM6A8+x0CFaK4RVsRMHUvd4CX2ExtKFGiHYAJzl89U=; b=AiltDtUXARuZf131LY3MT1Ot5J+7MUwE08zAO8EDQ/CPgXsFb72IThE2yh1wYWmGUMGaQFlAZ8JF6aJXK5ogrilKSkJhvMmQaJdRF0F3acOMF/Zsh3W7rLuWLK2vn7voBNAKMU/JSUTiiQufR+a8QZkWCMGP3vOqFuMkWC0Z4HYwaFMdrgszc0aEgnAyRnVc1ZHaY5BsNR+WcmDQOk+gXoZ7j630YqJFcylGN7Ajgj4k4eosOte5v0iceTX7pJMZcqA0gol7PNGsOtp4IRyewJBzmdcz//yrAk/rYbyTBheEL/IYgF92GLhspzluF0CwLHpmCvgslZdljGurnWup5Q== Received: from PH0PR12MB5451.namprd12.prod.outlook.com (2603:10b6:510:ee::20) by BY5PR12MB4321.namprd12.prod.outlook.com (2603:10b6:a03:204::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Tue, 24 Jan 2023 13:32:53 +0000 Received: from PH0PR12MB5451.namprd12.prod.outlook.com ([fe80::8900:6af5:cefb:469d]) by PH0PR12MB5451.namprd12.prod.outlook.com ([fe80::8900:6af5:cefb:469d%8]) with mapi id 15.20.6002.033; Tue, 24 Jan 2023 13:32:53 +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: AQHZFSdI9IwhgXjkakCvgonD0cOMeK6kOBoAgAAzprCAAB61AIAJNytQ Date: Tue, 24 Jan 2023 13:32:53 +0000 Message-ID: References: <20221221102934.13822-1-jiaweiw@nvidia.com> <2006382.jNaZZp9DzI@thomas> <6334712.YiXZdWvhHV@thomas> In-Reply-To: <6334712.YiXZdWvhHV@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_|BY5PR12MB4321:EE_ x-ms-office365-filtering-correlation-id: 9ca1bd88-b296-4da1-8433-08dafe0f7ecd 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: WHcdsd+BsBv84FlGGCVfY5rquxCMsEP5yEP58NXvexAtCcb0SCd/KhQ9vpXOJEWdpgqSoaAeZpTA6WO9aPpJbalpcx2MnxYaBd2ULUM6xw9GQ+Gg0Isx+Drg7B/on9Ud8uq8xUkKcdzwllzix/g3LdPL/wTz3fh/SMYLh9pTVDSO83y5CePUTzoxEdaWNNss4XbBONpcZUCdPIY0wb0yjBnJvuDVlH9+IWcqSkXWdOk8Q8YIubp2L4C3OFeYfZaAv1BtGRaotDA3WQbul9eKxEWHoKmMEYskAdFSFMOG9DppwGgB9vbQCdBoLt6Thov/CObP22vwM1oYe9cziQDCay/mfZwmeH1Xd3uOUZF5xvpYdS4eiDDBpsCdyAH64FlrZRohXF+/+yUNlOSBhJM54P/eW4+U90LPyhZ80qR+4uGiliFbqAnwwDkYXwfSwt60zYeN4VLH8bMspPMGqj6ulQhtFXlAqTeXIHm7eK2aP/TNihoCJDp0qxYlYgUZzS1u+6DcDhmwm6nuVDbABqwAP4Sy9pMp/MCzJBrt73/h/ZoPtmi7DqSJwSAvJdWNK4YtbozNdJ1otIyUFip6NHXWIK2dEL97upzGzctIUqtuSBJ16qvrkw82aCcInlHyBSC5/UHKCjStUtWNHB2TPt4tOTON5skisEhK+U5maWopUDtbFBr7BnKXE1ld1g3N/G7AnPmuErwmfrKfGMO2ajJ99g== 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)(376002)(346002)(396003)(366004)(39860400002)(451199015)(41300700001)(86362001)(38070700005)(8936002)(5660300002)(4326008)(52536014)(2906002)(38100700002)(83380400001)(122000001)(33656002)(478600001)(71200400001)(7696005)(66946007)(9686003)(6916009)(26005)(6506007)(186003)(8676002)(55016003)(316002)(76116006)(54906003)(66446008)(64756008)(66476007)(66556008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?TtGthvNTVne8Ig8B3ycXIWPyjcv9mMJQWmpnUc6SaejkLT+yxXl501sWWsmo?= =?us-ascii?Q?vy4s++rlv/SXl7sLuegD+ARNwuQjsNxtzIb6Dlp/ZNEAb8GO8k23/cT3NrOe?= =?us-ascii?Q?1umXzguuVIvoJ3Mi4qRA+FRtb+fYlxxJ30XGOmNXjm6YuqP0DI7Dil32uoFK?= =?us-ascii?Q?Jm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88ageyF9SlBnhL?= =?us-ascii?Q?veVF7z/OR/anlbOKAh+sAwPWaEQDLHmbJq33FoabdoFRJDaMqV9OwZ10Uw/o?= =?us-ascii?Q?SWFmFKH9/682Q9/iDyPucWWDlcvFfcG7Wz7AM5kHcTdqQeafmIeNLywvBOuk?= =?us-ascii?Q?Pjba/X53lo8UvKPJyCVqoq/TykE/tRHpYozda/+8YK8/WvV3G2TBoTvcZIJ4?= =?us-ascii?Q?FpEzkXM/3AEHqhz68OtBe8zDhMHA18keTnt7b5FrCIs5nZXwJVwbJm1b+Ak0?= =?us-ascii?Q?rQdqEb3opRGvNPIhVYpVHiaS4EYwEwOaBGaWdAIzCim8mmMLdACQvR9BmwAQ?= =?us-ascii?Q?YXPim8YK8OssE+jOn9nBZqz03bPeStYXMXEB421/54Jzhkqwxfxcwua6fsur?= =?us-ascii?Q?pTOhi4y6OLQzJG2x3zlQqghOYMO0yKR13XzvluPqhik43KF3O14hD8jHWdEL?= =?us-ascii?Q?VCDNfkQBn8Wef5f4bjh3lZfOsrxTfWYjRFCPNuNcj/BGdNv2bOd3s4Rz0huj?= =?us-ascii?Q?Wl5HmyT5uQCN3MrrmvRlQCY/K90wKpp7gomfYaIi?= 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: 9ca1bd88-b296-4da1-8433-08dafe0f7ecd X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2023 13:32:53.1397 (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: p8EexqSFGX9urWNRrTvwYp1/FKN4vbW1lSVHtoK6DKLUq2WoOnFNETuMCv6l5CYTX/h70SNQ5nWNECkxhE/32w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4321 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, > 18/01/2023 15:44, Jiawei(Jonny) Wang: > > > 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. > > > > > > I think "affinity" means we would like packet to be sent on a > > > specific hardware port, but it is not mandatory. > > > Is it the meaning you want? Or should it be a mandatory port? > > > > Right, it's optional setting not mandatory. >=20 > I think there is a misunderstanding. > I mean that "affinity" with port 0 may suggest that we try to send to por= t 0 but > sometimes the packet will be sent to port 1. > > And I think you want the packet to be always sent to port 0 if affinity i= s 0, right? > These packets should be always sent to port 0 if 'affinity' be set with har= dware port 0. 'affinity is 0' -> 0 means that no affinity be set and traffic should be ke= pt the same behavior as before, for example, routing between different hardware ports. =20 > If yes, I think the word "affinity" does not convey the right idea. > And again, the naming should give the idea that we are talking about mult= iple > ports merged in one DPDK port. >=20 OK, how about 'tx_mhpsdp_hwport?=20 'mhpsdp' as mentioned before, 'hwport' means for one 'hardware port'. > > > > 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 fi= le. > > > > > > > > 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 > > > > > > connects -> connected > > > > 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. > > > > > > [...] > > > > @@ -212,6 +212,10 @@ API Changes > > > > +* ethdev: added a new field: > > > > + > > > > + - Tx affinity per-queue ``rte_eth_txconf.tx_affinity`` > > > > > > 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. > > > > 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-queu= e. > > > > +*/ > > > > > > 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 index for mhpsdp. > > > Another good comment would be to specify how ports are numbered. > > > > OK, will update the comment for this new setting. > > > > Thanks. >=20 >=20