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 EE2974240D; Wed, 18 Jan 2023 15:41:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 92507400D6; Wed, 18 Jan 2023 15:41:03 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2040.outbound.protection.outlook.com [40.107.92.40]) by mails.dpdk.org (Postfix) with ESMTP id 8F5C74003F for ; Wed, 18 Jan 2023 15:41:02 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jbOzbrHVMJNleMduOqUWGxt7OHXDY1qm0XWn7b8uUh/lO+ZQ3NXA7mdbqBuTfY30EX+LCqcw904Rn7s4YCNMuCmnHRpjAOY/XORmwj6GmKRyom4AtxgGEYbWWG5g7P2vAEMvM2KAyt72TSYcf6tlzxWFpzmyWel89u2VQjYe4BhxPMr00nU3VTKd7TsI3mh+G/k6N/k+k2yWdFnfLFsnrYXtwV9gOBn3amf5ElZJ2ky5BmnPedial8egQ+360yz1loMm6D1BKCgBDOf1rVobBOachcTSO5VnQ9opYiroQssVVM75WS78K5/06BW5GjPyDg9eZnc7uh0+XXb7EwlNSg== 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=Ky8HQKkwT+ZMRcY4Lnwq13seCAPB8+KHCK5upNlLraI=; b=HlVrSLWBVRQ07YqTuL978k4UG0JmRVU1gn/BTQXH915tekQ3VlBQzIj0DUA9qGAOQvfrdLb4yR1IExsnbIFLIwKNoJ4viMnmE7cTmjr5y5wy8qw/35Ig+s7exm8404rUfk/WAejSck0sQn5LyrtIhNUGErAAdKTG9S9uiiLhs7ilTLfBpi7EiOzk9uuRGBiTaXFdIoyR7xrlvilloqnq4VrGPYwg7cEHPBypJyYtxeyBTEkgAxLqAXqN1L2V4KNOAxJsrn/PuCnHUsk5PY0byOmQeDDDYtVTTMCR5V8tfFTXfCm9ZS+HDVlTWivRy/toNPouoL1Eo1IMnDLwOMG81g== 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=Ky8HQKkwT+ZMRcY4Lnwq13seCAPB8+KHCK5upNlLraI=; b=GyAqwypF/LooOD26NHBMlghzbXKrwGLzQkWprE8VZJoYN+ZizSxmuto72MmOw4ad9gRjFSPWJFvHzoHn4vJUqmkSx2K4ZWvWc57pP33FmfCKRTYCGgiWtuF4J4VlYIpYgFLbopUnPio36XqF/nuBfdR3VqWHOWI61NEWlCItOkkaJVV8+tXa2bh4PCGNzICPujZc7p/Vqu+fdzxW88fo871dBCAyDDhdTbugEW8w1jdLAFuJy4si16yoA1bXIjq6PB9c53eqUnRvwdAMlV5FwphEC66Xb300lFFQBAo5drvZrhAIpGFDmQqEGz51ll20FzBVm4EMkK9G3CVBuAo3yg== Received: from PH0PR12MB5451.namprd12.prod.outlook.com (2603:10b6:510:ee::20) by CH0PR12MB5089.namprd12.prod.outlook.com (2603:10b6:610:bc::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.24; Wed, 18 Jan 2023 14:41:00 +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:41:00 +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 , Ivan Malov , "jerinj@marvell.com" Subject: RE: [RFC 1/5] ethdev: add port affinity match item Thread-Topic: [RFC 1/5] ethdev: add port affinity match item Thread-Index: AQHZFSdFQcjJ8OzkWEe9VDsYtkXf1q6kL8cAgAA48uA= Date: Wed, 18 Jan 2023 14:41:00 +0000 Message-ID: References: <20221221102934.13822-1-jiaweiw@nvidia.com> <20221221102934.13822-2-jiaweiw@nvidia.com> <16543991.hlxOUv9cDv@thomas> In-Reply-To: <16543991.hlxOUv9cDv@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_|CH0PR12MB5089:EE_ x-ms-office365-filtering-correlation-id: 5399d65c-5a9d-414a-1980-08daf9620491 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: YWyoG+PWtgWCLC7UdR5LZ+VQn9dT3GuL6i5GMDfy+V4hxhhBlZdS5SHeVjHzhqmIIaVOEZd4qoCdWlvmFEc1IQY2t9Uvs+JWXyWagy3pTUWHsnO/sBrlSLrdHYFgZOqNkCa7gzVY679NtlEwmeY4EMIhLL9IuWPKHZOdKHlhXZ3RPkQCYZ7zaODfTm03OHZUVvm8gamcKBJnv5V6xC4EN347+awbQ813y7tyzqdreFIQqVc4lQdSdStyubsmfuGqWWIHLk1CwcTKsfFQCSEoJyInOFL5vFF5eta1ojddCkzYSdTZ1rhokvQDVs/lLjXI9FKvh0op1a1975zAd6LEuWlgFZoYdGZSb034THQRLX8bdZLq8LCyYsgUSM4stZ1RtgtCmDncSTS/8gfkkbN27AeUmYfsexPiLo1aCdvHOA9Xdv6xOUL2p94lRMVpYfECrNTn6jbV6FTru6DAzAt4F/u+2WqNizT0H3Ktm0TnKMaAJq4h+7mZp0f3qoOxZgOLiGVlJ4cpiLaNNG4H4mmR1cEmkvrIL4eV4QQyeWc4Tn7QGoj2NvKCGgCbnSNOo+vkhugi9sDOIdKOm6LW+V/ItjMvlxUySvvISZxWvaNOhGnwDqESLYrJyx+/GcPrcha6BztN1mqvrQmWPziFlQV0X8e5n/IVONZ2ygFv6H5PJjD26EotNRck1YPE6SXKh8stoXffjv9wbIQMwp0uxfs+Ug== 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)(366004)(396003)(376002)(346002)(39860400002)(451199015)(6506007)(478600001)(26005)(186003)(9686003)(66476007)(54906003)(66556008)(8676002)(6916009)(4326008)(66946007)(76116006)(64756008)(66446008)(83380400001)(316002)(41300700001)(5660300002)(52536014)(8936002)(2906002)(122000001)(38070700005)(38100700002)(55016003)(86362001)(7696005)(71200400001)(33656002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?rT0vCxEQHBEDH0uoYcBcPhSbxVYz1qXmTiCZ5LH3Owt+c4zKRyVbQjZpA6pX?= =?us-ascii?Q?/DQk1M5m59MgH7KZx7c0kq6W+5Q3SEZ0yDnron1zkrWkyYMgo3tZH+VpriPg?= =?us-ascii?Q?vvZvl3G7s3RlxrrsjCu50IdIWmsnbG8fzHKWocoOSgFzhRxSKSraV8sl/FzZ?= =?us-ascii?Q?ljJhzYYZ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bt7?= =?us-ascii?Q?gXjLtvYJR4eeIqcp9V61d5ahcCTwQLsvIWZY/Mi3vf+SY/TzUw4RyFmhxy+W?= =?us-ascii?Q?8vBQJ/ECBKg/TM/l29BNMNf85hDGNecrLKOCwEmoxBbOj/nB+d06zY5eHfOd?= =?us-ascii?Q?pyuv3Myg9gOHVacLYHfGyh0VCvGoZqgTeTuKTM8hgVj84+UYKYL4omBEiKjS?= =?us-ascii?Q?YKOCWyvAr2WODPAjMccTfp0xDyu6pD3zf3r+gPgvTsJ04eSgCrfkIey9bud0?= =?us-ascii?Q?FfU2DAJPdfkvCJZDaffgrE+7abhW3VHgzpLFlsnHNfAT2S/RpnnSDZv4KPy4?= =?us-ascii?Q?mq426MwAPjWeI4V2tumQK5Ri/ATesK+XBgVGcztukQOsRlCYHIC38vVa36hr?= =?us-ascii?Q?mcOOdXtB3VVR2W4YmVM5tf23xe3dG+zZSameYHhu0S1fAx64e2ioikGH1v0x?= =?us-ascii?Q?atqEm0wWHM5/E47Aqiugpd44iaArdBUHUBLgYX6TyoSAHu7ZlN+nCzC18T6V?= =?us-ascii?Q?QG552zqARlcKj+od02s=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: 5399d65c-5a9d-414a-1980-08daf9620491 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jan 2023 14:41:00.4607 (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: tCXJdnIoG83Qdv+yOyOMLLXgyYSN/DFePhA17mj6N2UqkEMsQzgyqTbxnKsKSyBt2vzMGB9At7jIuszAb8kuaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5089 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: > > + /** > > + * Matches on the physical port affinity of the received packet. > > + * > > + * See struct rte_flow_item_port_affinity. > > + */ > > + RTE_FLOW_ITEM_TYPE_PORT_AFFINITY, > > }; >=20 > I'm not sure about the word "affinity". > I think you want to match on a physical port. > It could be a global physical port id or an index in the group of physica= l ports > connected to a single DPDK port. > In first case, the name of the item could be RTE_FLOW_ITEM_TYPE_PHY_PORT, > in the second case, the name could be > RTE_FLOW_ITEM_TYPE_MHPSDP_PHY_PORT, > "MHPSDP" meaning "Multiple Hardware Ports - Single DPDK Port". > We could replace "PHY" with "HW" as well. > Since DPDK only probe/attach the single port, seems first case does not mee= t this case. Here, 'affinity' stands for the packet association with actual physical por= t. =20 > Note that we cannot use the new item > RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT > because we are in a case where multiple hardware ports are merged in a si= ngle > software represented port. >=20 >=20 > [...] > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this structure may change without prior notice > > + * > > + * RTE_FLOW_ITEM_TYPE_PORT_AFFINITY > > + * > > + * For the multiple hardware ports connect to a single DPDK port > > +(mhpsdp), > > + * use this item to match the hardware port affinity of the packets. > > + */ > > +struct rte_flow_item_port_affinity { > > + uint8_t affinity; /**< port affinity value. */ }; >=20 > We need to define how the port numbering is done. > Is it driver-dependent? > Does it start at 0? etc... >=20 >=20 User can define any value they want; one use case is the packet could be re= ceived and sent to same port, then they can set the same 'affinity' value in flow and = queue configuration. The flow behavior is driver dependent. Thanks.