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 5BBDB4247C; Tue, 24 Jan 2023 15:00:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F52640150; Tue, 24 Jan 2023 15:00:14 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2047.outbound.protection.outlook.com [40.107.94.47]) by mails.dpdk.org (Postfix) with ESMTP id 3C773400EF for ; Tue, 24 Jan 2023 15:00:13 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MuvcvDzovPnwDctQx52g8mOq+HNoN9wVvPfkb64Q6hoszTAhLHjW+L6anpH3zw3S+uCS8EVKlG3S+xRJvjdzgiscgzV/Cit69kxlg9Pz0mfhKqA6717tz4TE+JzcNkslmNzdNyuUAJWmXuat+k2z+VMzW+J7QsclCr5ubfwYPIPXVb2cgoXCr56xtIPLnMdX+nJu/ftV8NfVIEtuXHYP21UH6AEr4tUhr4hptlURl/D0l6+2GEXS9g9S3Jr4OKO2LOm7FkMoJ3rjFlFenttqkBrCQkagQcHDHC/mzZOq08mxO1KwODW6u0I9u1kiLGC+yLbJP/o55Gt+THKTcJryFA== 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=MJ5ZVLVhkAt9ZWwmzZCqGq1XqQ2nty5N6nX9FFXVtLQ=; b=mAzULIC2StikAdXvpJqcqIJPj5Dhg0lT4iPqPrCKpJbdrV0QamQyq9M3ITLbbSqucwW/zWFK82DvYpJT0LQr5UqO3yvpOU3TBj8KYL7/XF5EJidfaihtP02v19MZv+MbDVTjFlyKttSBHyycfChOL9H2C2GNKSmTx28mqmKeCvET10nyAHPJ9mV4yxp42EUN9o0HII0Apiplj97xuFubAYJwalQxSoEaGFQhEhcinbRB567GL5dzr2srgn61s8hYRcajSQhB9eKT/UFZHcLK5oFxjAUBjIgAD0H5ovo+vACk03gTVctop/f+hWpyi0LtYyVBs08DI+RtsifcCfy5JQ== 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=MJ5ZVLVhkAt9ZWwmzZCqGq1XqQ2nty5N6nX9FFXVtLQ=; b=HvCv/Vc8VtJFmtxK252njZHKRpZB+ZlhsulyGNWFrm34M8TbOEyOav9JZVNA/11A0NNFIfXs0V+yDOihdVO/INxGOr+oPGEz65hwSPT40FmkxLcNgmJh8Iu8UTUOCTBE+Ou4313gEA+y4tN3BJ5DXsOaCnLB6BcTkXkTuypzNzekrsusgHOPjFB45d40wJ3eWZ/d/oeOyg5jX4iCh4zrmvO4ccBLz28n82JPrNZHOMlJTZ7IGAB/AC8agm70IeYiXhLYcLAMUYKksPR1SiJIilEUWgZ77a37yh+ZqkRC0DNnHcRU20OV3NJGzwiryvaJPoVX/7t25HZDw/eVbJST/g== Received: from PH0PR12MB5451.namprd12.prod.outlook.com (2603:10b6:510:ee::20) by MN2PR12MB4223.namprd12.prod.outlook.com (2603:10b6:208:1d3::18) 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 14:00:10 +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 14:00:10 +0000 From: "Jiawei(Jonny) Wang" To: "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Ori Kam CC: Slava Ovsiienko , 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: AQHZFSdFQcjJ8OzkWEe9VDsYtkXf1q6kL8cAgAA48uCAACBRgIAJPXZQ Date: Tue, 24 Jan 2023 14:00:10 +0000 Message-ID: References: <20221221102934.13822-1-jiaweiw@nvidia.com> <16543991.hlxOUv9cDv@thomas> <6248682.NeCsiYhmir@thomas> In-Reply-To: <6248682.NeCsiYhmir@thomas> Accept-Language: en-US Content-Language: en-US X-Mentions: orika@nvidia.com 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_|MN2PR12MB4223:EE_ x-ms-office365-filtering-correlation-id: eef5aaf4-dd26-4004-124f-08dafe134e90 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: MbxIBO1dLu/6CD5GrAAKvkVc51YFK3zRzhKojquXNAiv7QQzMp/9LwqTlKLUXrdTm1Xgz1Zz6eF+l47lY0JieF68dIyTEENntma4QFV5rcVbtDBZs3gWEzf/9N2wXj8VZceK2jk9ch3NX23Onz3F6rUW/P/TUdnLqn0UHYLz0dyszhosIh5L/tPlSVw+Z+nXklrReoM/3YYgrMz42gWXGcFCOwqSh8tJAOcPvL7wfsA4W9x5jt4Z4+L9HSL1HnCSevsEIK+0LI7GqyYKTDrn9LiVOv6/NnPPS/1JiYrZYX2gOKJXqHrDRWSRi92lp5HHZkAkJkLlMcIgofqQ9m90EcH3L0SNwFUZljp6df1LnD5Ly61Jio3Zjy8EZ2VbA/kdSR9DloqbOgbMzxpCRcS2rdM3mKrh7E6AmvGmDAHdOvrX2l38ws4hkmlql96SE3CMKDr7KjhbYYFFYq7vj+PfXI+DYN6omQA/lXwtkb6cNb9LbdXa/cvXnNYLV6DIM1vgZ2yCeArlvgH6puL58cg8b/NUnGf1z/VkppV16KNAX8/WXIkWGLL4DNsuwi1tTQK2+jDdFH4F3suwsFVPbwVyX4zdNfp5MFz6epwH0+FO7efnIzC7QkzuzKE3a2fYg+2UkvePLmhV/Ml+vVL1RmQW4M5qTkVCkC8b6xggQo/X0UzGBtfh+jPrugmGqo9Ml6U+GRgzZjkI2Vt2tqkV6u8rvA== 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)(396003)(136003)(376002)(346002)(366004)(39860400002)(451199015)(122000001)(83380400001)(33656002)(86362001)(38100700002)(38070700005)(2906002)(5660300002)(41300700001)(52536014)(8936002)(4326008)(54906003)(66446008)(9686003)(6506007)(186003)(55016003)(64756008)(8676002)(76116006)(66946007)(6636002)(316002)(66556008)(478600001)(71200400001)(7696005)(66476007)(110136005)(26005); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?9A7OEMNnKAwwT7b8z0T9nk5qRKPxPCmYFUd032gLOP4mBkHqe2RO+0XdfUEB?= =?us-ascii?Q?MI85q9JyHKQcw5so0UO0G9/P+F2+Fa4lhNA/iM0dtp8KuiwZGMy9VKGQXKUC?= =?us-ascii?Q?LtAk2uv15XUUPwPNCWOFVlubOWS0kcFbV25pt09r6JdAbeTPBcTPNzWEYoR4?= =?us-ascii?Q?yt3veHOZsF22sz5iTdfB8QYUVq97/67QMXLIEGVW21MtvJA8+J24jWPGNdWH?= =?us-ascii?Q?XLvi/mf7XYbiZbKq6+KnIVrn5iQeneQWicPVZWGhJe86MNIv0kSSRVxInBX3?= =?us-ascii?Q?lZfnB5Qm4GgAHx8P5QLoM8128VdVaqSCpp0r6eUQIxhw+p8jNVypGF7WFBBc?= =?us-ascii?Q?V7U7x3VtmKnaBkGIcWQCHVACjljwvohg55z5NNeyTRI4uTbjim6Z6owj+H8C?= =?us-ascii?Q?5ARrvP8vrMRXJFkbdjQQV5xkL25BEwCqIKStPJDgIekcY4Xu45veSe/sQJjn?= =?us-ascii?Q?NPwQI3S7C+gAzY4Q/tehT11mWLjGKMXyrrtltIFRPoDBrLg4Os3lmr60k/Tz?= =?us-ascii?Q?ULP+QLdCbXjefLEsglenNaeudrtVhWdpRXCW17417K11+jwSR/08jENR7cRC?= =?us-ascii?Q?jy3G3/gBHvftQan20Y/SVJ+4tmMd+djTxMIOgZHxIn9/plCU2CZrWWNZM00L?= =?us-ascii?Q?9u2j5J0KDFffA6mIwIT34MgVy8jH9E4jnfyvobveeeI4BfkiOgcUz9SOG8aO?= =?us-ascii?Q?uvyT1E+i/YQyt3hssdHXKyy2ZV70rrZJTgmnTV6zsMppaazDxIHJxfO2hHu3?= =?us-ascii?Q?PNMGelZ+nQVbPuAngo3NAbie5mwTzYxSSjYLJxRAFJkgxSCVekSIfsqqlqUG?= =?us-ascii?Q?/ncMNpYEnKqZ6aJcckseTAVx9KQnkz5eJgaHQVa6KGYCg00UMcozliJ3M8os?= =?us-ascii?Q?OfZp6VLizvFRSA+80IsYaiBIihV7GdNH2P4W7+Cjlc2YHBqeakgTk61/v0jD?= =?us-ascii?Q?0GaQq0hacBy3yoNXpYypjBK0sG9lXimvEYwO3XAfyRHH1FF0IiMXOc4XfKSL?= =?us-ascii?Q?QZHGRh7PgcMof/ghXItAQBZCdw0xWld6i6W2G/gF850Jh5A5FPGrWbLbY3yC?= =?us-ascii?Q?CyALylsZ/lokT5ZYifLR9yLL+TRhRKRqejqs37zYHTLbsHONvGnqylrS1IRL?= =?us-ascii?Q?7fVXeIMnbqtt8d68Iu4yTXDwEktKn4r5tn5dj0IMyy/Xnf0OmcwswpRR0Ein?= =?us-ascii?Q?Qh8Ot7KQpSzLzlGnBzNUMwYjxtDhtdRN3FV7OSHTZa8TYorBgDzqblVdmd4x?= =?us-ascii?Q?newMEEg7u+wIk2ALUajFwwFmJJbd5C+p7fa2HEHultAWW5edomxZs2S/rsVw?= =?us-ascii?Q?YqrxYfz2KgFfJk07qaZr+c14x76pbCm1jbqtGXsZcHjSsmgoMYaFq6hm8gWU?= =?us-ascii?Q?2kWUT/xBGjFXpAYynE/ALrblouPLcod6dbvsc6qAK8i5v6MC3/qY9K4ghBKV?= =?us-ascii?Q?+V20RJZqegvwn0kCkzCU3jJPbCBDo6H8h6RKk3WsrrcYkcKnMIBxmki+8X+F?= =?us-ascii?Q?7p0EBJdvtudYJ4zj5T5SP57B+Yq6wb6O4j+hM1XxGP3Pq1nkllhXihBg+OZW?= =?us-ascii?Q?v3on35A2WaHpIvnRQSFtFCVK+Qsu6sJ+rsRfea+F?= 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: eef5aaf4-dd26-4004-124f-08dafe134e90 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2023 14:00:10.1776 (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: JNKV3Yf2LFz71ekvbBaH3IcotudykmTdQxg5aac5bSKqSSUTjD+Fs0IICDmP0rNE1d8BMHEs062oanEi3y2IHw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4223 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, > > > > > > 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, > > > > }; > > > > > > 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 > > > physical 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= meet > this case. > > Here, 'affinity' stands for the packet association with actual physical= port. >=20 > I think it is more than affinity because the packet is effectively receiv= ed from > this port. > And the other concern is that this name does not give any clue that we ar= e > talking about multiple ports merged in a single one. >=20 RTE_FLOW_ITEM_TYPE_MHPSDP_HW_PORT is better? @Ori Kam WDYT? > > > 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 single software represented port. > > > > > > > > > [...] > > > > +/** > > > > + * @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 packet= s. > > > > + */ > > > > +struct rte_flow_item_port_affinity { > > > > + uint8_t affinity; /**< port affinity value. */ }; > > > > > > We need to define how the port numbering is done. > > > Is it driver-dependent? > > > Does it start at 0? etc... > > > > User can define any value they want; one use case is the packet could > > be received and sent to same port, then they can set the same 'affinity= ' value > in flow and queue configuration. >=20 > No it does not work. > If ports are numbered 1 and 2, and user thinks it is 0 and 1, the port 2 = won't be > matched at all. >=20 OK, I can update the document the affinity 0 is no affinity in tx side and = then match on affinity 0 will result an error. For above case, user should use 1 and 2 to match. > > The flow behavior is driver dependent. > > > > Thanks. >=20 >=20 >=20 >=20