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 EA21441CA5; Wed, 15 Feb 2023 12:41:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CDA53410DD; Wed, 15 Feb 2023 12:41:53 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2087.outbound.protection.outlook.com [40.107.92.87]) by mails.dpdk.org (Postfix) with ESMTP id 10E1940EE3 for ; Wed, 15 Feb 2023 12:41:52 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pxws4gtBEZmAUYDMbrUS8kwsQeyXsDdCP+SjB5RJQ194ZEqnW9szGep01AKuXErPn4p9DXo+eBHlsj03A7kcfCYF1i8RyIis5f8E/X6YmyrdHS156oRkMJ6z8WBLHqt5BXwANo++KetVt97M65fBJnT2s+7BXm9F1f1gnhw7DQpULfpoII6UEiV0p82of/iRdaxKx8spzTusAZ0odFs+0CMFBAb6WOEQw/F6UXKwcpVF897DIpQCsA32J2ZMA/9aDWZWzdxVj7fmI40LHGHxKmzW5qiA9MaAhZ6rS3EaeVuYsZtyiKpOBXt+lEQ9/uakBb3ragXArKQwO8799GQY/g== 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=fm2xIcWt3xnFLlyD8XhxGiTyKdell+4q5YDuJ1BnVvs=; b=j04uskzSCXbc4B0hLbzRONCa1DUs9r9bCcykJ5ZA/CCj6QsXvjTGoW23l4Lv5mlRVLsYZ74SmOOhbcKHBkL9j/EqXm+OzjtUiz1L8Vo8za/X3JKoSu4QgjlWYSUAvCPEPkXKnUevg9PdIRqbTzBF+Xvq7XB+pE+1Jdd4OVtWH6wBmRtIrUCUfu3x5a5KJMW/huPqHJiQGuH4aaKD6/QHNOYxpcGFnarJyrVaMvV9WW4o8AU8pGFcDv9exMxGZJUXm7qnZHzQPMBVI8OJNP7S7OOc7+QO3oIERg1OkOoKvGE/oGYgid1dZhdQhJYWyOVtW0xvn7UZjQSiFM3FNW9zgQ== 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=fm2xIcWt3xnFLlyD8XhxGiTyKdell+4q5YDuJ1BnVvs=; b=VbJhK4lBNTVkSNq/V3iVHnOd9ffcrtxr8tsFz11N0dJbfiMjEAYB585zeD5lnnl806n+66Aj76St08XuivV7E4j1DEq77Rt93EX8ZfoM+QZaCdq1sb8okGbx2Emb+vNb+zAu5YWxMzIh0wbe0fxPZ5Dv+GVkHfEekvPIJKcihrMw1ZoOWG2uHjDRftHlkvVKjHZ5zQf3vrSBG8n4YdPQikuMyFAPhiXJMvzIeVSdha4rtQMlMyrE+kkayDAlOSB4cjN+vZ1lypPQtseya8hu/NA+kfZ91PP/Owj+ONB2Ywr7nvwY3cIhb55MIrzkPUUQMAowkAnwVbv6vkS/QcUiPA== Received: from PH0PR12MB5451.namprd12.prod.outlook.com (2603:10b6:510:ee::20) by CH2PR12MB4857.namprd12.prod.outlook.com (2603:10b6:610:64::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.26; Wed, 15 Feb 2023 11:41:50 +0000 Received: from PH0PR12MB5451.namprd12.prod.outlook.com ([fe80::fd7d:5f69:a136:a51d]) by PH0PR12MB5451.namprd12.prod.outlook.com ([fe80::fd7d:5f69:a136:a51d%4]) with mapi id 15.20.6086.026; Wed, 15 Feb 2023 11:41:50 +0000 From: "Jiawei(Jonny) Wang" To: "Jiawei(Jonny) Wang" , Slava Ovsiienko , Ori Kam , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , "andrew.rybchenko@oktetlabs.ru" , Aman Singh , Yuying Zhang , Ferruh Yigit CC: "dev@dpdk.org" , Raslan Darawsheh Subject: RE: [PATCH v5 1/2] ethdev: introduce the Tx map API for aggregated ports Thread-Topic: [PATCH v5 1/2] ethdev: introduce the Tx map API for aggregated ports Thread-Index: AQHZQIvoaV4NNsu3U06E/+QndlyGba7P40qA Date: Wed, 15 Feb 2023 11:41:50 +0000 Message-ID: References: <20230203050717.46914-1-jiaweiw@nvidia.com> <20230214154836.9681-1-jiaweiw@nvidia.com> <20230214154836.9681-2-jiaweiw@nvidia.com> In-Reply-To: <20230214154836.9681-2-jiaweiw@nvidia.com> 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_|CH2PR12MB4857:EE_ x-ms-office365-filtering-correlation-id: ede1d872-2f0c-4a7f-f586-08db0f49a063 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: 7sX0GZr5Kaz5sWp/FksiSFTuG6StVSleIhav51p4QMB9kM+gO2WegnI+BSNns270OWOMdY7xANWCoEk3t+wpU+Pcz7NbuISQvZuhMKJBq8GNdYsqpNaEWB6Uw9KAZeSYQYCnbZb/aAkysl6gfl9jX9bL1Kqu4mHOEeTkuFokOGSy7rSREbRY9lVowgfGS6mAdZdy/PL5wQHZpjtKxgv2h8aEHCmk7uo9S0kOokRoG/tBY4NY8AwKUhWz9p3UhZHvJAkltXoJTHIaZPBik5OfQabI+a9STLoq1El+mkAv3w9MFcqSxLDg8RwOScdFlSOKWa5m99zzTdz0QTfAhALE5w5B6o8W2gqi16NAyHI7eLp/uvrlWDLIaCmbnu4E5O8ASBahnDmXWkm3fsAtzZ1e7Vhx8i3GbwZomzkv2gZA+WlMzgP/zX+kzAEPDdQq9vcGPafGLKcI6nAIy9bk2H3yzacjGMp9c7r6JanH9GbKiQ8bmJD/RgjJLgL889WmoXNOai56tFgXGLnR4PU0gCf2bZ9Vfpn4fYU92yy1LmRsh3v8f+G+LuF5IoUzk1dqlUqQ2me4St8gsTN+YUMhaOTKwBSTmZDIuLl6luk7v9wOvoTZjOTb531rAWrSIaimxL20Iywx/Ty7ElCzDrrBINQIwE42ZBz3faOOErrtUXwIyMJ5XmKN/iDSwPCP1+vEn8bE2THV7iodtsuo0BhzHc6org== 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:(13230025)(4636009)(39860400002)(376002)(366004)(346002)(136003)(396003)(451199018)(76116006)(66476007)(8676002)(66446008)(4326008)(478600001)(66946007)(66556008)(64756008)(110136005)(54906003)(316002)(38070700005)(86362001)(33656002)(53546011)(107886003)(83380400001)(122000001)(55016003)(6506007)(26005)(186003)(9686003)(41300700001)(52536014)(8936002)(7696005)(71200400001)(2906002)(38100700002)(5660300002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?yA+30fduQM2Yc8w7fwB5G/lrGWqWg4jMufHSZP9uzZsCVrNyz69xoMe4vKu4?= =?us-ascii?Q?H2vB7mlpHqTHBQSbGV21zegGtYUJHpt+JzgzXJmnlkOny6NVxnP796Y1V9BR?= =?us-ascii?Q?xeFsigEeRTDQT2PpFrK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gY5Gm7fw5YD78yZeToC0TlhqtZNhyaQ7RLsqOvUfh4tbu6K4r8EoRlre6tu?= =?us-ascii?Q?1tCr5sfFGEq26Dkl3jyKpAGq7Mfhp5L2D4OkeoEIMh5XmoEvkwPawtbNW9vq?= =?us-ascii?Q?Nw/+QItj5+tSAYmPSpZ+F2OwAI9OVX5dCS2TZpkqRVT/pmEJsmLnsuLrMCq4?= =?us-ascii?Q?Li6a6RkFMze9H14Anauxvt9q2aE+6Fohj+ViJVMog8gGC5Af4FVm49YXR6VO?= =?us-ascii?Q?6W4ee+hGXV7jJYZiwjcs4pMU8FgV/KlSp0zucnEMH9UZsz7im2e5ZXxSRGRk?= =?us-ascii?Q?iAPjI0/qMfswT271L9wSx3DUIPffl9vxFvAV85UjRcr13auPox/PMAXkCCP4?= =?us-ascii?Q?/Ho9tC87z31yDnk3ycvFdJsblzhiDnQHgAw66pDm6pKxU2RRTBcBzPvTTvSh?= =?us-ascii?Q?4zDvovl0RjnTHeCNXdWkEM7nuczhJgmyvblXb3fGb0xROfN+SHbpVT9Wl7Yx?= =?us-ascii?Q?V9CvDLlBZY4XwzSHvzGhwI/lwMYMcbGDjgt2CUB7pM+1+9EMJDIQmiIQpXM6?= =?us-ascii?Q?jgfyJcBRgjcfF8P08kzUozXOemrEEQgJUwtXBbdT?= 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: ede1d872-2f0c-4a7f-f586-08db0f49a063 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Feb 2023 11:41:50.0367 (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: biAlaL3A4k/QgHMaulBWniSUzcJyD7wCdEoaW8wy9bfba+ZOyxHVbcjAJvt9/UpI1rWt6NIERhI7FB8WNQh5fQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4857 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 Ori, Thomas and Ferruh, Could you please help to review it? Thanks. > -----Original Message----- > From: Jiawei Wang > Sent: Tuesday, February 14, 2023 11:49 PM > To: Slava Ovsiienko ; Ori Kam ; > NBU-Contact-Thomas Monjalon (EXTERNAL) ; > andrew.rybchenko@oktetlabs.ru; Aman Singh ; > Yuying Zhang ; Ferruh Yigit > Cc: dev@dpdk.org; Raslan Darawsheh > Subject: [PATCH v5 1/2] ethdev: introduce the Tx map API for aggregated p= orts >=20 > When multiple ports are aggregated into a single DPDK port, > (example: Linux bonding, DPDK bonding, failsafe, etc.), we want to know w= hich > port use for Tx via a queue. >=20 > This patch introduces the new ethdev API rte_eth_dev_map_aggr_tx_affinity= (), > it's used to map a Tx queue with an aggregated port of the DPDK port > (specified with port_id), The affinity is the number of the aggregated po= rt. > Value 0 means no affinity and traffic could be routed to any aggregated p= ort, > this is the default current behavior. >=20 > The maximum number of affinity is given by rte_eth_dev_count_aggr_ports()= . >=20 > Add the trace point for ethdev rte_eth_dev_count_aggr_ports() and > rte_eth_dev_map_aggr_tx_affinity() functions. >=20 > Add the testpmd command line: > testpmd> port config (port_id) txq (queue_id) affinity (value) >=20 > For example, there're two physical ports connected to a single DPDK port = (port > id 0), and affinity 1 stood for the first physical port and affinity 2 st= ood for the > second physical port. > Use the below commands to config tx phy affinity for per Tx Queue: > 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 >=20 > These commands config the Tx Queue index 0 and Tx Queue index 1 with phy > affinity 1, uses Tx Queue 0 or Tx Queue 1 send packets, these packets wil= l be > sent from the first physical port, and similar with the second physical p= ort if > sending packets with Tx Queue 2 or Tx Queue 3. >=20 > Signed-off-by: Jiawei Wang > --- > app/test-pmd/cmdline.c | 96 +++++++++++++++++++++ > doc/guides/rel_notes/release_23_03.rst | 7 ++ > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 14 +++ > lib/ethdev/ethdev_driver.h | 39 +++++++++ > lib/ethdev/ethdev_trace.h | 17 ++++ > lib/ethdev/ethdev_trace_points.c | 6 ++ > lib/ethdev/rte_ethdev.c | 49 +++++++++++ > lib/ethdev/rte_ethdev.h | 46 ++++++++++ > lib/ethdev/version.map | 2 + > 9 files changed, 276 insertions(+) >=20 snip > 2.18.1