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 7E6DDA0545; Thu, 11 Aug 2022 03:26:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20B1840694; Thu, 11 Aug 2022 03:26:54 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2102.outbound.protection.outlook.com [40.107.243.102]) by mails.dpdk.org (Postfix) with ESMTP id 8467B4068E for ; Thu, 11 Aug 2022 03:26:52 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C0TQ0SaNOicPCAVlSgQF2h4OoKkPmMNrfIEpe9w4DFnLFNlTCekNUWLuJEIxgv/uKzHHD2BttETyWg+i+4FWV8f2FZUycD46rfu0NiSa2q2uJa4RfzlTqzkLJRHCdiTkHHpMJFY65KkqSACJ9rQk6MkJYQLVyTDVagEKPo9rnF9DidrEpb/+QkZUtFsL941Gn3OTmEFJ1sXsz8lfocNdhdJ9Y7cnJ0NrBunhy7kMz++7YKEkQV/yr72le7lVIf3WaWng564ybyarwSYHB7n4x1lXYAq6YKSs0MJue/x2gsgpPQbMYz9FZpU28kK+Y8/70NTjchd0Rk1NaZ7w/c4AdA== 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=Io3WBCOq70ZO+2tPEZxudIBEWn1DwSi+oF9rvbESVXA=; b=f7YDdvUhjaZQPTvwfFn72wzJFtziVcwx3Rye/GNpE+qHDcJF1X90Jp9cIDAH2N2jlFRrfB084claOEm483hjyrVXPTNHPW7Nm2USh8zW7n5K2qOL1x43MrsZQndLV/Rea207P13l+Uz6FSWm9YOSt3+Tt399etNWGOX+c80FgTAU3yRounAgRG9oWmV/VuVrs5dyB4uARNBG5CWqN9jOrOZIGqWLUHFV6j2R2eGkl31oqmKl97s2GTfwtSDWWdjoM2YbVmuidx7Ozd+NirH9ZoXgrFYaJWLhbFhww4ekkOFRbftZSZUXdDwtxeXYIVqNLxlNtg/E538nqJapU9/j2w== 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=Io3WBCOq70ZO+2tPEZxudIBEWn1DwSi+oF9rvbESVXA=; b=mXtY18CBqSyh7MnXbNXGvk9Qr8vA1Z1UyPKqob4EoG4L3cqbe8wpCgTOgLCL/JrGeMHuZd+IKaz0HKe7oBlBSKAm/EW7K6hWwJJOCa4o0GXQfkooEZSYYdHFbUmcTpZDm57R4UV/zDBcUTZ+7Lqs9EbKWYu/SwO0VBUyw0rARf8= Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by CO1PR13MB4950.namprd13.prod.outlook.com (2603:10b6:303:f5::19) 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 01:26:49 +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 01:26:49 +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/oCAAF968A== Date: Thu, 11 Aug 2022 01:26:49 +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> In-Reply-To: <20220810123941.0c35df8a@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: 448f4d61-75ed-407a-2f4a-08da7b389019 x-ms-traffictypediagnostic: CO1PR13MB4950:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vfd2JIFRwe5wlI/l68FZnS32lgCn22VFJskhm5UPARwKJUkFpVtQWVfH7KMb3G0UXuXbeUIA+FrR8//AfTgVxHWtWLCJTbCK42QCBo4l30o5YnaicbiAQvbfu0eV7vUeWeNOpGtQriD9WA9BvkT4TKqWb96wTUkrLk8ZkXny6vgfttq0Q1tGv+DXzPzBmXzfVHfecZ4PMP8pB29LSGPxoEfyRzx9Y2IwJwnOxhPOL5cBvUFxQYmQsybm8egSq1KP8oYcJ2yRhixWtOjfM3DhaVN1igajCysqSMlypi+3vTk5Ub/8SqdAGldGJrzx2DgRo3BC41h4iICTa5/X1JHZnUrauYg/P70TohZ4El5cA53PyxkiD5+kO1eqI/elSGSTsOSU7czD9fhiDSZwPIs2eVVolmts9+pXKRwPuiV8N7cWrub8CT5NEys2Ey4dsLmH/rnR9qiN7VkKFG/SvKj5LV/ZiqzW55LgbPcAxrDoHxeeqGJXRTbJmjXzSxyQRWGIg09FYmDibRmrkbsMD9197v9B9gkNuRauf3b0fS0o4n0zsKaQ/06t0HrtPTc1M7nX18qcxxR86qxd028G9jMsOON/SqExdTJm2vVP1bGPde/UZ/+Ol2sL9EP6MKLIlKZ8N+oBaoM+PAsSahMwoy9aK+1Q504BL05bsAapMTJ8DBahA4eoAlzggHQCvoZ7uvSOobXpf6HdoqZcmgkHyRps/fbTg41W3/snTi1p1455U7KMtRxq4DwhvAFkcuJF44lAbYsTNbJ+c3oYjmNhO2umhcY5JHK3b/g1zq1Skqzu6mU= 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)(346002)(39850400004)(396003)(376002)(366004)(136003)(478600001)(41300700001)(71200400001)(33656002)(38100700002)(86362001)(7696005)(6506007)(26005)(9686003)(186003)(54906003)(55016003)(66946007)(76116006)(316002)(6916009)(5660300002)(122000001)(4326008)(66446008)(8676002)(64756008)(66556008)(66476007)(38070700005)(8936002)(44832011)(52536014)(2906002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?q6stQnOcY+4l8udr7OfEHvejCWEUfX7CSY+h6mstuR46kLYdRYtHZR7IakJi?= =?us-ascii?Q?e/49N1pligHoC2C7ebQ32SBaNIgiwFsUtnhT4Ds699/Fxb/s5AjURikZHM0x?= =?us-ascii?Q?uwaj29jIq67DS+JmARgyTqJ4IokmJr41Z8xNW6R2Hq1sdtX4iCD7sheuwkPm?= =?us-ascii?Q?riC/1ykNc8OMTfHr9j6bBiq5fiNTGDteqY0dtkHOziipy5IuOMMNoZXs9R2C?= =?us-ascii?Q?ZJtpmQWKzGc/K1xIQmU1ZjuSD4DsMgk7ELu32tDJq3UmVjNTYBkIkJv4WM0z?= =?us-ascii?Q?oR9ZmuFPcADAHm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?= =?us-ascii?Q?p+BkNN1yga7Y/7JbDzXbhrdFVyCn5vdTLgrapPLCZhBmrubt3GYYjJoqpflz?= =?us-ascii?Q?1QhRfISqzVHfpe7OQMe7vooHeNVd1GWXimCKppgPCOVaR4H+Zt26AtalKUpp?= =?us-ascii?Q?KWgGzvsn1LPZVCC56ENadB064uoE/RyiHVo12mokTLWtSpmivAFRqyXUGjaF?= =?us-ascii?Q?bd1GEG3N4g5Q8l5PwnEJkCoRsRySIeeGIqiqBvcmYDVC9yU+zZpPtBklMuz4?= =?us-ascii?Q?Fn0AsDB0Mewm0Sce314aDIGvsWGspSUSWEVpvL1Lutqw1Qt9tTAX4gcjEiqI?= =?us-ascii?Q?ki2QqSF0Jwe8adkf+zxucq9HFoGe/AWqNfBjt2Y8qZIWMhOonUCWxHplkyLl?= =?us-ascii?Q?3Ewc32Ovixk53KNLKIBvi0DlkQkGvVCKEiueUr4+?= 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: 448f4d61-75ed-407a-2f4a-08da7b389019 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Aug 2022 01:26:49.1832 (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: /68Z6pRxOojHQgPtFrU4YtN8ospAl8mVp94667AiGkovgWsU/nQBUaybpDd2oJ1teSa89tY1j/wb2uRL6CavjBtYuSEJ6U7oYym+ajhNztg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR13MB4950 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 Wed, 10 Aug 2022 01:51:55 +0000 > Chaoyong He wrote: >=20 > > > On Mon, 8 Aug 2022 11:32:30 +0000 > > > Chaoyong He wrote: > > > > > > > > > + 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. > > > > > > 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 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. >=20 > DPDK already has a port ownership framework to deal with internal etherne= t > 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!