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 DBA1BA0540; Wed, 10 Aug 2022 03:52:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 39E4240A87; Wed, 10 Aug 2022 03:52:01 +0200 (CEST) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2124.outbound.protection.outlook.com [40.107.96.124]) by mails.dpdk.org (Postfix) with ESMTP id BEABE4068E for ; Wed, 10 Aug 2022 03:51:59 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yyy1TmLxoMUp+TX6gYoCKR+CDMH7EEDaUs561d3GQFev1qFgN8yywI8M25qGSi+Pn7NKNvAo42+tgE0cw+Bni/8GfszIPfYsnodGJSknlaaKtbN60Q8+Y2oHsgcQUgvUW6AswXXV15HbIp7w8s8Lx6EWJ2yEj2dljjRowCp07oMbx7GBUpYCzzAfX4Z4Uewfjtl007w2z/6Qm9BLKh2EwPZUj/GsczyrKoGwKqmTEYpKdkC3p5sD+LHdOB7P1YfUOSfskPzV7GeUCftmilC8soWiUP4JHBLs+RBOkie598o+AuhfZgK2tXkW28uErEZv+ZNuSTCd3MK1UA1LAYgZmA== 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=cMthnnysXCcMqnfHgN7mPN6eOSPFXhEe/cfzsexXY04=; b=lC3/eG7dj9emV81p0+9kahrliFxijuI8id47128OGi0wsB05WPxIX3RKGg4hF9r4735VRExAP88XctJh9zJDMqHub8VDnlv152tAMZHMdZmUEVjxlRU1TlfGGhmcwJc5XpUwiwXU8PC9Sw6VEJd4Wv+ShhyyXXaY2px5GRUOERO4xHJrowmYt72tBLjUe5+SF6lo4Emx9egfbFqANVETwg2ZN5JsBseW7Xdw957xuV6riOf6PsSUkJQ2qUahiOBWe9+aewqpFa+S2T05jgzTql3T8Kx/rDhfJs+BojVtfjZMmLz+Z0DKNasrOo0CRQKGfC+yoTfGg21hxKmQ5Ca3FQ== 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=cMthnnysXCcMqnfHgN7mPN6eOSPFXhEe/cfzsexXY04=; b=YnQFaOsfFTwqkS8SkshdqtIoz7AdPkS6sMSQYCeerE9dGk4AXl2T58znltXvk1oFhP36HdXyo2C29ZKKxN2PGpjBh1Y60T5BP6NH3nzT8p8/9aN6S3+jk2aJoEli3Bn/ycFlodvCx0qWV+hAYnLBIkswuTAVmbNFZ/HNXusSZQw= Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by BY5PR13MB3588.namprd13.prod.outlook.com (2603:10b6:a03:1af::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.10; Wed, 10 Aug 2022 01:51:56 +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; Wed, 10 Aug 2022 01:51:55 +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: AQHYqJU9nf0jVmv1NUy1br3lf7tlGq2gRvkAgASajMCAADhhAIACSc9g Date: Wed, 10 Aug 2022 01:51:55 +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> In-Reply-To: <20220808074542.31b7185c@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: a5989689-fb67-430d-a8b0-08da7a72e7af x-ms-traffictypediagnostic: BY5PR13MB3588:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MTv/PwDPCzMBwJnZPgaTv2DFde4ZWYD3sbW9bKH7S0T2hD+S/50Ang0VSx4NJB/Q6/SQn4/OQNl1ROkwF9mU8rXHRNUCj7aKuRLuV1lotErQzOP8+q2/EETltZz69XBXawHV3cz5EL3npuE/iVSfxfDlPpfMQ/EXe9jjq36gpIwapK9buvOI9uUQBtv4UkzroecHGn1amfo3Ef3H1oG1xLF6moqW779AkShW3Kb4LgdQRozymXY1LH9THYSsBRIbhpRLIw7W8lkonCszqqYgLZIDsGRiklsXQHdaCmIStmGsGgQ0o1LV3amiKe7XRxa448qbMhe3pxFkwd8h+uTkD9WW1sbg5Uk4sneRSKHBkPZrxMXBqbVnHtc2GFty9FQLeefkSe3k7h4UhNz+GAl3DDqa5o9pRavsXhDc3Y8XpJuqxj6TxFJF9t7uUBC+zuzXSdSafjcQulxc1g9Ty0RX6gyQ5i1PtOMVi7CXiQoqLJanBsO6qpc6/O7IVOpPT3M9heADvxm1IrKdVksiWxLLWNJ52bK0QMrFCOMIQBhZqIMGOZvzocT7RNpReIR9rGVi4p+3dcFr69CMP/sJNwJ1zKDRuu66wMXfjmqytz/+9aisJQnm1oBBY2vUqcLYvCYlkOyLH4QHUp25AVjrlRBAvPMXKNB6sGcX9ZwW4f6zhHqL4gzrY+fVCNVmaiPQjWXQNNmbh1s9ulR6j7Z5WAMbIRKsaUPPLI9zeGxWoA5kDiwNoBlvBoV6RRkkavukCZtRf9Q49CuaI6BrkTheFKNY1xg3CbX4TrJwPVLzSpkxkqCS1Dbkhy6OukqJQl85uIDPk2BhnlMUJuEWSg3BUZHPzXix99emg7dN1WeMxVNzMMM= 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)(396003)(39840400004)(376002)(366004)(346002)(136003)(2906002)(26005)(6506007)(7696005)(4326008)(64756008)(66446008)(66946007)(66556008)(66476007)(8676002)(55016003)(478600001)(86362001)(9686003)(33656002)(54906003)(71200400001)(316002)(41300700001)(6916009)(38070700005)(38100700002)(186003)(76116006)(44832011)(52536014)(5660300002)(8936002)(122000001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?uELfnuFs2R3Nt3AA4InXU7s5AQ1JLLiCtm0KZ6n6YwkBuGTuxu3Oif4DDMSa?= =?us-ascii?Q?sGiSuy/ndiV25nHD0GD7mimSKL2cfJfERWCR2e7D9RxPtYK0MxWVGVqFLGNn?= =?us-ascii?Q?G7KYyTa5yIjdEIzHK9hAdQ0Fx7asm0UdoSzej0DfrohWmrojeCYHIQxVEiou?= =?us-ascii?Q?6rBH4gQiPQnpeZB0Z1iCd9g0XuZ1pchEUv8RF+ALH0L8oq4Q1S+YnZjYL2gL?= =?us-ascii?Q?t2sS8kZFeUlrpYshTRatY9zXiIZOZ2ugG7EowrdxtZwf966eiuN6tA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u+VneNBWMo8ysLK4dmvrCB9StWY99MBC?= =?us-ascii?Q?5fo+A7I5kxe2ekk71Z0zwIn0I+F+8bge5tWbY5wYs62cVlHQwYTvVm4QW7jQ?= =?us-ascii?Q?gSKtnSyDh9un2uaEEO465Aoeccb8dbei01x8ksepVO3YWV+rKgaMFm0wO3Vv?= =?us-ascii?Q?MnXRIgbRA+nxlUJR7mClIs0RS2Bfy8zsiz2nOKuwz4mXYRFbQzVo53FqPrpx?= =?us-ascii?Q?qhJDMpo946RvXzahfasJjeD2Kq4z0iL+yMpKZIiatSixtXxyEXY98c90dgup?= =?us-ascii?Q?0G4xIqbjldHJiUk/Tf/o2lVHLYTO1Jv24GVDCMm/IrJpLZMeJ5hzgD+GXXsx?= =?us-ascii?Q?AsZN6pznO+HysRNFtO6Tw/uT21KuVpocEsrd7i2BvQ0R/A8iw/KRpB5I0hw8?= =?us-ascii?Q?EL1x+rzwKZX6B3abROQ8JAQJhQCm7s/cA2VqyyGG?= 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: a5989689-fb67-430d-a8b0-08da7a72e7af X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Aug 2022 01:51:55.7631 (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: jsiwdJzav56exIhuEM2dNkLTWPZi0JvqpvmR6QdaMSG3OyMZKarF42FM5p5n4znFLhOblh8H5n2EGZszJ7rp0d1hoVtIuZ/puxLOrL0Jp2k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR13MB3588 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 > On Mon, 8 Aug 2022 11:32:30 +0000 > Chaoyong He wrote: >=20 > > > > + goto done; > > > > + > > > > + /* Allocate memory for the eth_dev of the vNIC */ > > > > + hw->eth_dev =3D rte_zmalloc("ctrl_vnic_eth_dev", > > > > > > Why not rte_eth_dev_allocate()? Isn't an ethdev? > > > Why do you bypsss ethdev layer in this case completely and do > > > everything yourself? > > > > Here we created an ethdev locally to nfp PMD, we want the user totally > won't be aware of it. > > If we use rte_eth_dev_allocate() to create it, it will be in array > 'rte_ethdev_devices[]', that's not we want. >=20 > Having a floating ethdev does open the code and users up to a number of > potential bugs. > What is the value of port_id on that ethdev? What is the mechanism to > ensure it doesn't conflict with other ones in the system. The 'port_id' is the 'Device [external] port identifier', which related wit= h the 'rte_ethdev_devices[]' I think. Here the ethdev we created is not exposed to the user and is not in the 'rt= e_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.