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 40430A0548; Thu, 11 Aug 2022 08:31:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D1DB840DDE; Thu, 11 Aug 2022 08:31:36 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2111.outbound.protection.outlook.com [40.107.93.111]) by mails.dpdk.org (Postfix) with ESMTP id 4BDC340DDA for ; Thu, 11 Aug 2022 08:31:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Di8OJKnEfN7SspwJ0Xtr1q83w+A8Vb+BnugPbssFzyMNkJu95zUEqvPdCLSCyhvI3/mGfngmxYAyUmx6wihj5M0zzAD+2MAePMm9Vuqkgc2w3O4fDRxH8DxPmyUnY3QldrPz6WnsRkGeEvWaLalefi6I4h1LNfHRqI77J07Jr2tPfK7MQj43ybtDZoeL2lkMTG/Chww+v9yL2rksj/OY48bdtpU7v2WQ2h6kmIsiKYF9/yiQrEvi43bU1h5182GloWo177RgxxfSKILRd6nksAdnc4NSfXfT5rSZvEbNmgyLLYNHPWcwCkc5VzRAnVDGUiG0iuWy+N/ronHDyMGl2g== 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=g77dNGxAq8XL0as4d9B0FUZ0WBM3CiEBOiRkobICU7s=; b=iz8zBNjiao4H0RnTStvhdexOyHHeCHT2bk84JKYfUBB7IlpaWMj1q3xv6ljp6jLo8k5hrY+MMPtKzmmcaKVNbUMD18YN+Yi5ffMKo9lGMp4a5oNJuuI0+/ZGdiVOC9O7U9iZW8bC6eFIsgDoRV+lW4yBXOIwZJU3RHISTAuCW8PaUaIWGCdOKRRW+WkvTqa03/VhH7LfIk5Oz1Axy83WtVZveNt2qYDW9Pj9iasAXppnzun6EmVnuJBkZKop1TAVJogwFYpaWVqEhI9UOg7ZDZt1k08a/7UYeKB4voZjquT2EetwwNzta/NN6/2wi8oxwmg414eKrSjVqeNoY3zeZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g77dNGxAq8XL0as4d9B0FUZ0WBM3CiEBOiRkobICU7s=; b=po3Y/+PDr9w/lvZyguzYclTRhz+LhC3Ac3RdmUE7j2h7/Hz9nBSHm2gBf5NF3EKTslSnw/o6E0HyViCMHDCNy//roEL6PX4WbRFc0xfDPpI3Yu4Ty0/ja8YxIqpblSJOR+6MN7Hrr0B9qsCOsdK2Mt31M1UQl7Mm5x7xINbVe3A= Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by BY3PR13MB4948.namprd13.prod.outlook.com (2603:10b6:a03:354::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.6; Thu, 11 Aug 2022 06:31:32 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::402d:6abc:83a8:2431]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::402d:6abc:83a8:2431%5]) with mapi id 15.20.5525.009; Thu, 11 Aug 2022 06:31:32 +0000 From: Chaoyong He To: Stephen Hemminger CC: Andrew Rybchenko , Niklas Soderlund , "dev@dpdk.org" Subject: RE: [PATCH v5 07/12] net/nfp: add flower ctrl VNIC related logics Thread-Topic: [PATCH v5 07/12] net/nfp: add flower ctrl VNIC related logics Thread-Index: AQHYqJU9nf0jVmv1NUy1br3lf7tlGq2gRvkAgASajMCAADhhAIACSc9ggAEs/oCAAF968IAAM0GAgAAf8BA= Date: Thu, 11 Aug 2022 06:31:31 +0000 Message-ID: References: <1659681155-16525-1-git-send-email-chaoyong.he@corigine.com> <1659681155-16525-8-git-send-email-chaoyong.he@corigine.com> <20220808074542.31b7185c@hermes.local> <20220810123941.0c35df8a@hermes.local> <20220810212451.35f8b0ad@hermes.local> In-Reply-To: <20220810212451.35f8b0ad@hermes.local> 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=corigine.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0c3d4693-1b1b-496e-5c60-08da7b63217d x-ms-traffictypediagnostic: BY3PR13MB4948:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: N2BaGEfimU4wxlih5XJXnr2zOZ2hBr6hWwePeqTIdY8CTxSVELNb/5e6HnAQxzEJxE5fvGFjiMYR1S2AeEOjPGi5k3dt0+ZwW+makdZ+9jzuuA9XmvctS/7cy22BsYv1qnFb/nn5UdcojkPLP5fFG+4Faw5BtKiV7wbKRP5XHCgOOOesQsPUH0AnHn8y2C4pJUSkUsyI5+4yGFz4POZQgFeS2/xuKKKOwRReSEDrHiDhuhhrauNlwsb3KigGA5jTsAJj1am7PU4gvDRhQEdVwCJFJpphkKQrBkjUQ9+z6VMLpL16WL0zI2Ex2oQ0RtJtfrRgc1TO2R+iTBLfzyyvrTFAE0/iWmjzttGNerXEzhQl/fiAgDAq9D7EjBb0JQnjdLU55RVvu3rKqZmrMPTgZv6d1uSO9faCS+zD2cH3FJoH1rV0OCh/q0nS/HbADYIO7ECC804piosQLy5voXTASFXtH1/mlKg35LwsXWlDIHUkNxVRs91xBLjMXJaCHU5aYBbW8j9iU7ZGaQuC1pQB/6xM4Vg685X7Q7/7wYf9HNwLK2qwcbmc9vBAAJ+bkaZqgjcGNBNaYhM4gBxn4KTTmScNyV58+wYR1JHPY7zrM4ZE5XCkLSuzyJ2o1FaCmz0kdmdIyz7a6fl/3cpWxA2+JpcDHd5iS4OWbF18jBdMRU7pYtrbFmEsrEoZRss+UsYPRd/4b4Am7C0LQCqUqrJHwmolzkQqA2RDPpKdWO6dhqsPwFf2uVD3qc85w2AJTLCmesbt+d6WeVhtpwW6MyQppsdTM2xALqgSq4IByBf8l9op7GfNhApyEucrSBFHl5+8RsuN2GBi62oq9QbriBS+Dg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(376002)(39850400004)(136003)(366004)(396003)(346002)(38070700005)(33656002)(71200400001)(41300700001)(478600001)(6506007)(26005)(9686003)(7696005)(86362001)(53546011)(186003)(966005)(83380400001)(55016003)(5660300002)(66476007)(4326008)(66946007)(8676002)(66556008)(64756008)(66446008)(76116006)(6916009)(54906003)(316002)(38100700002)(122000001)(44832011)(52536014)(8936002)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?06zw/PFpx8hL6RojN+humDxNHOAidRjWZcOsdDL0MfGEgzdtniUD+asicgxR?= =?us-ascii?Q?lr3aHOlZTI9G91aQQsZB/CBV55uZmTuziz6xW/icQX9zUcvYwUv5mDhauYDz?= =?us-ascii?Q?XLEyt0GkvzDNrIahYbZXeD2AUbEyCovEF2nz7DsVM4dt3QTfBLd+J5Ep/8Su?= =?us-ascii?Q?5nmJfgI7HqEykxx8OMdr4tawKFhLfZLkZ1+4y03JeJ4ftIkA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ljVK84JNAzr5jZUhH+WkyZf6YuYHz4jgUs02qNbVQGgyJWEO?= =?us-ascii?Q?FFL8RX9/HE0+Qw7T7DXVaCQq9CvNyRt9pNjFq2A1nSHtw1o+Bj6HWiyBuj88?= =?us-ascii?Q?JmLmOCiMt/d/0Ofzv6WxF2SrMAczOhjPdF4dnbkgagI5/LIR+XnbyHq9tcym?= =?us-ascii?Q?8nil04WQmWi0JgengSACQ/IZNC4Ew5+1w3PDeKW/xd4MGi08xHzdI9oLcfED?= =?us-ascii?Q?7OnJmK9CBpLtZN3F6oPcv02x7MKiz4FLOagwgvQquAG5RvAAGjYRyi8L+OaP?= =?us-ascii?Q?hAnmD1WZFbHAMFF1EZ67XrDb3SBA5qSD1PuLxM9tMXxmElIBlD1BbR6OK0MB?= =?us-ascii?Q?YQclux/CK32tGA/1gZLhWK/roVj+qPdyvNwhudI2TexI4ExpX2xzTEGl9+xP?= =?us-ascii?Q?Hg/jid8wTTl98vb4oaWSXLBN57JWbu5OtdD6tWFyCIiL/zl4TxN3hy2xaZd2?= =?us-ascii?Q?RvO53Y8F1m7d0K+sUDdDlv+rPbcs+kqlvbrCoVzG?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c3d4693-1b1b-496e-5c60-08da7b63217d X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Aug 2022 06:31:31.9564 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ehu7t1VSIDfmb+c7Vea1XmGn5uCis8nQZ6DZWtqsLxDeKycVCE3cLIbW73NWevYw9a6RT1EliFksDwTcO8WMp5pPt8OWjSsQDBhwXH87UUk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY3PR13MB4948 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 > -----Original Message----- > From: Stephen Hemminger > Sent: Thursday, August 11, 2022 12:25 PM > To: Chaoyong He > Cc: Andrew Rybchenko ; Niklas > Soderlund ; dev@dpdk.org > Subject: Re: [PATCH v5 07/12] net/nfp: add flower ctrl VNIC related logic= s >=20 > On Thu, 11 Aug 2022 01:26:49 +0000 > Chaoyong He wrote: >=20 > > > > The 'port_id' is the 'Device [external] port identifier', which > > > > related with the 'rte_ethdev_devices[]' I think. > > > > Here the ethdev we created is not exposed to the user and is not > > > > in the > > > 'rte_ethdev_devices[]' > > > > array, so it can't be invoked by the user at all. > > > > And we invoke this ethdev through a pointer in the `struct > > > > nfp_net_hw`, so I think there should no conflict with other ones > > > > in the > > > system. > > > > > > DPDK already has a port ownership framework to deal with internal > > > ethernet device ports. Why was this not used? > > > > Sorry I have no knowledge about this framework before. Any document > > link or logic about this framework will be greatly appreciated. Thanks! >=20 > It is part of ethdev https://doc.dpdk.org/api/rte__ethdev_8h.html >=20 > See rte_eth_dev_owner_new, rte_eth_dev_owner_set, etc > https://doc.dpdk.org/api/rte__ethdev_8h.html#ad6817cc801bf0faa566f52d3 > 82214457 Thank you very much! If the app uses the rte_eth_dev_owner_* APIs to check the ownership first, = it does can protect the internal ethdev ports. But right now, the ovs-dpdk seems don't use these APIs at all, and it can u= se 'port_id' to get any ethdev port in rte_ethdev_devices[] array. So maybe it's a good idea to keep our original logic and keep an eye on thi= s area, once the ovs-dpdk use the rte_eth_dev_owner_* APIs, we'll update the logic here = accordingly. Thanks again!