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 2F0FE4558A; Fri, 5 Jul 2024 00:44:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A4AF4027E; Fri, 5 Jul 2024 00:44:35 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2084.outbound.protection.outlook.com [40.107.220.84]) by mails.dpdk.org (Postfix) with ESMTP id 4B11C40275 for ; Fri, 5 Jul 2024 00:44:33 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wn6wd0Lo08bHwdpyEFoozP2Z5setZRLL/2r5QYg051c+4CFbqxuALSgSshmVwcoxVdbTIurw4iJaiD1AbD0FTslZuf+1AonYVWGwdOul6PdE7XDPgcBnDBXsYoBiSazzvCG/ko15XUeMfd1bvyOSFg3xtxZWirUrdxlA4FgwfxLdg/C1F6UEtMPKCzxzEhcdALflYHmzfyl9r3nBAJmH/f9I8SNx5WUdNg3jGssuryCaz39JTfvpZJK/2N6S8Erx37hT7cJ/HL1m1yARO30CRLMqlS2vTmwd+bxta+oDo+IPFMAQEvM9hDk00xrzngoZjJKB6Z8mSrfvJXYLhKe6/Q== 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=jwU8l/lVsmr7bim9iOjfdjSPBRO5m7Fo2wqv/Ah/OM8=; b=aYaOrkHfsApglY9qFZNXWA50IFvSaqkAAqP5rLdC1YUdh8bCyzygtghCY2q3RWcJrikhQALZSLhGlt2+lBx1fSIilzV5LJc4U0qwmecTNEauBXR17cYwT6NvAlBnllXhFBmb3kIJguKDt7m03EafBltalzevQ7DD5Ji6Qopi0CSy5qPE+yfKSf92JHWKtVKf4sT3gc7tcex/BdCxd+iHckplpvc5xyRfrn3bqFLq6C4TR3SvPtfqXJpQEuK3NvNPPnolND6uuF+80HYwDLVJLhhHn9fA5lWyyXfeoLLYuaYjlS2la3Fm9YfdpcNLNvo1i9Zlss5q9iD4papy/1UMFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jwU8l/lVsmr7bim9iOjfdjSPBRO5m7Fo2wqv/Ah/OM8=; b=dq35QkIvVLFydyPCANLtZ0nq4TxuJsg/2RiweuU5H3R6FR6/tyuO2qaidbHbDNBtO3+Ejj3+NkvZI1E1gGVLUAZ9Fidqf0RLTrX07i72MxXMj6kaqwI75dseOjqyLxnlURjvu/syjBesdw4gTf83AE+IV1hfIIKm40gdjFZX+eM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by PH7PR12MB9101.namprd12.prod.outlook.com (2603:10b6:510:2f9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.33; Thu, 4 Jul 2024 22:44:29 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::ebfb:2f9f:f9ca:82cd]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::ebfb:2f9f:f9ca:82cd%4]) with mapi id 15.20.7741.017; Thu, 4 Jul 2024 22:44:29 +0000 Message-ID: Date: Thu, 4 Jul 2024 23:44:24 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 03/23] net/ntnic: add minimal initialization for PCI device To: Serhii Iliushyk , dev@dpdk.org Cc: mko-plv@napatech.com, ckm@napatech.com, andrew.rybchenko@oktetlabs.ru References: <20240530144929.4127931-1-sil-plv@napatech.com> <20240627073918.2039719-1-sil-plv@napatech.com> <20240627073918.2039719-3-sil-plv@napatech.com> Content-Language: en-US From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5X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XJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20240627073918.2039719-3-sil-plv@napatech.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0307.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:391::15) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH7PR12MB9101:EE_ X-MS-Office365-Filtering-Correlation-Id: f5a4dc2d-d9ff-41b7-0daa-08dc9c7add5d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?UWhUR04xQWRtblR0d0Q1QTdSOUdUcDRKczl4R2diWGVrMWRwNlYyV0g1WEt5?= =?utf-8?B?WUdUOGhHMmsvQWxqM25LSUNlYnpOOGxtQy9EajJMU3V4cGhrWTFrSWlHcGdQ?= =?utf-8?B?TnNNLzd0dDBFbzZ5VytneWFtOU8wemhRZ2d2NCtxV0dJalJ6TmxFd0F1QWJ0?= =?utf-8?B?U3dBcElEQW1USjdpeDA1REd1RW93Y2FnMlVXbGI2STNzZHk1bGlUTUd1MFRp?= =?utf-8?B?Vml0dkhzaVRrdFlZaXlSMWxUelVLdFQwV3VCei9sTCtITGFqWFh6bmlvK2k0?= =?utf-8?B?ZmJxbHFDNXMzUkUzd2YrYWpybVRpL2hDaTRlZ2UzMDZ4K3RnMVk5MW4vZUxS?= =?utf-8?B?Wklmek5ueTR5ZE1DdERZMnVRRGUrVnR4YVF3R3B3NnB0eGlSbDlvMWt0SGJF?= =?utf-8?B?byt0ZE5oampybGpIZDc2amt5RWxXajl0OU1TcmFLMXJmcjlmY2lRN2M1L2Nt?= =?utf-8?B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8vd3R4SEp2?= =?utf-8?B?TUh4SGc3eHk2anN5WmNoUkMzYThGaldCLzFqWnF0ckF4S3Z3QzRKMWFQWGx1?= =?utf-8?B?VzZMQnJ5TXlUTGRmdFN6dUg3Rnl2MzRoVUF0SFBtZmltMVdQZlQvZHRGcEFj?= =?utf-8?B?RnE3L3BSUEtiSDNQejZBb0NEa3lPT1pTQUVwYVpLQVBLRTAzSDJIcDhHRTNW?= =?utf-8?B?dlNuTmZjVzM3eWk1THpqQXFRREtpT0VqTDBrUkpPd2poalZtNU0rVVpKM1c5?= =?utf-8?B?L3FhVE8vb1grWUN2V2tRUkFnc3ViMDBTTUxvY1NxNGRmNHBnWi9reUZwdXJI?= =?utf-8?B?dE5iNUhaV0h2L1JYT0tYa2xQbHkzdFFkcVpiODhweVpHN1ZPNWJtbmJuaFZl?= =?utf-8?B?bEI4aWxQYUt1TEpmKytOL3UvV3VCTnpPZ0t1WDFYKzc4WGwvYmNWSGU0L0Nr?= =?utf-8?B?ci9uQ0xaNHlPV0NUbU5GQT09?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?b0poSFNNTHJldGt0ejJxOVlxTVVUSnJOMzVzbzBYY0ZsVHMvUEpsWElhSldn?= =?utf-8?B?anVpcFRvMStvbmNjd053T2w3aU43em9CUTdCQVI2djRhMWw4QndVQkZPRnFo?= =?utf-8?B?VGM1aWREcDg0blcwV3V3QXRGeERJTTd0UFZsaDZQVGhSU0xlRFlab1czTHo4?= =?utf-8?B?ZGE2OEpiMGVWY2RSTzZaYS9IMkJDczYzVlFtQVdKYWFKUWxHNXJURGR2UWhq?= =?utf-8?B?SHFPK1NrNy8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NFFSWitLU2RV?= =?utf-8?B?S2RCRWwvejNsNHU5b3F4SStocERqanZ6OEw2TXlGL0RpQVNYK3VGSGxFSHUw?= =?utf-8?Q?TU0MXmrfRJLcPMjOZM+R1Pq6m?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: f5a4dc2d-d9ff-41b7-0daa-08dc9c7add5d X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2024 22:44:29.4267 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8cXbPL+j0zVStticdnVP0djTpg7UxPIKiQ/oGQcbEnJ1jO0kAwvxWOybNf/No/Uu X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9101 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 6/27/2024 8:38 AM, Serhii Iliushyk wrote: > add implementation for probe/init and remove/deinit of the PCI device > > Signed-off-by: Serhii Iliushyk > --- > drivers/net/ntnic/ntnic_ethdev.c | 104 ++++++++++++++++++++++++++++++- > 1 file changed, 103 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c > index 3079bd98e4..e9a584877f 100644 > --- a/drivers/net/ntnic/ntnic_ethdev.c > +++ b/drivers/net/ntnic/ntnic_ethdev.c > @@ -17,14 +17,63 @@ > /* Global static variables: */ > > static int > -nthw_pci_dev_init(struct rte_pci_device *pci_dev __rte_unused) > +nthw_pci_dev_init(struct rte_pci_device *pci_dev) > { > + uint32_t n_port_mask = -1; /* All ports enabled by default */ > + int n_phy_ports; > + NT_LOG_DBGX(DEBUG, NTNIC, "Dev %s PF #%i Init : %02x:%02x:%i\n", pci_dev->name, > + pci_dev->addr.function, pci_dev->addr.bus, pci_dev->addr.devid, > + pci_dev->addr.function); > + > + n_phy_ports = 0; > + > + for (int n_intf_no = 0; n_intf_no < n_phy_ports; n_intf_no++) { > + struct rte_eth_dev *eth_dev = NULL; > + char name[32]; > + > + if ((1 << n_intf_no) & ~n_port_mask) > + continue; > + > + snprintf(name, sizeof(name), "ntnic%d", n_intf_no); > + > + eth_dev = rte_eth_dev_allocate(name); /* TODO: name */ > Is this TODO still valid? > + > + if (!eth_dev) { > + NT_LOG_DBGX(ERR, NTNIC, "%s: %s: error=%d\n", > + (pci_dev->name[0] ? pci_dev->name : "NA"), name, -1); > + return -1; > + } > + > + NT_LOG_DBGX(DEBUG, NTNIC, "eth_dev %p, port_id %u, if_index %u\n", > + eth_dev, eth_dev->data->port_id, n_intf_no); > + > + > + struct rte_eth_link pmd_link; > + pmd_link.link_speed = RTE_ETH_SPEED_NUM_NONE; > + pmd_link.link_duplex = RTE_ETH_LINK_FULL_DUPLEX; > + pmd_link.link_status = RTE_ETH_LINK_DOWN; > + pmd_link.link_autoneg = RTE_ETH_LINK_AUTONEG; > + > + eth_dev->device = &pci_dev->device; > + eth_dev->data->dev_link = pmd_link; > + eth_dev->data->numa_node = pci_dev->device.numa_node; > rte_eth_copy_pci_info() should be setting numa_node, no need to duplicate here. Please consider using 'rte_eth_dev_create()' to help these kind of boilerplate initialization. I did same comment below. > + eth_dev->dev_ops = NULL; > + eth_dev->state = RTE_ETH_DEV_ATTACHED; > Shouldn't need to set state directly, please call 'rte_eth_dev_probing_finish()' as a last thing in probe(). This call will set the state, also will do some other required work. > + > + rte_eth_copy_pci_info(eth_dev, pci_dev); > + /* performs rte_eth_copy_pci_info() */ > + eth_dev_pci_specific_init(eth_dev, pci_dev); > As comment says, 'eth_dev_pci_specific_init()' calls the 'rte_eth_copy_pci_info()', so why calling it twice, can clean the init and remove the comment. > + > + /* increase initialized ethernet devices - PF */ > Is this comment valid here? > + } > + > return 0; > } > > static int > nthw_pci_dev_deinit(struct rte_eth_dev *eth_dev __rte_unused) > { > + NT_LOG_DBGX(DEBUG, NTNIC, "PCI device deinitialization\n"); > return 0; > } > > @@ -33,13 +82,65 @@ nthw_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, > struct rte_pci_device *pci_dev) > { > int res; > + > + NT_LOG_DBGX(DEBUG, NTNIC, "pcidev: name: '%s'\n", pci_dev->name); > + NT_LOG_DBGX(DEBUG, NTNIC, "devargs: name: '%s'\n", pci_dev->device.name); > + > + if (pci_dev->device.devargs) { > + NT_LOG_DBGX(DEBUG, NTNIC, "devargs: args: '%s'\n", > + (pci_dev->device.devargs->args ? pci_dev->device.devargs->args : "NULL")); > + NT_LOG_DBGX(DEBUG, NTNIC, "devargs: data: '%s'\n", > + (pci_dev->device.devargs->data ? pci_dev->device.devargs->data : "NULL")); > + } > + > + const int n_rte_has_pci = rte_eal_has_pci(); > + NT_LOG(DBG, NTNIC, "has_pci=%d\n", n_rte_has_pci); > + > + if (n_rte_has_pci == 0) { > + NT_LOG(ERR, NTNIC, "has_pci=%d: this PMD needs hugepages\n", n_rte_has_pci); > It is checking PCI bus, but log is about hugepages. > + return -1; > + } > What is the intention here for the 'n_rte_has_pci' check? If pci bus is disabled, this probe call should not be called at all, in that manner this check is useless. > + > + const int n_rte_vfio_no_io_mmu_enabled = rte_vfio_noiommu_is_enabled(); > + NT_LOG(DBG, NTNIC, "vfio_no_iommu_enabled=%d\n", n_rte_vfio_no_io_mmu_enabled); > + > + if (n_rte_vfio_no_io_mmu_enabled) { > + NT_LOG(ERR, NTNIC, "vfio_no_iommu_enabled=%d: this PMD needs VFIO IOMMU\n", > + n_rte_vfio_no_io_mmu_enabled); > + return -1; > + } > + > + const enum rte_iova_mode n_rte_io_va_mode = rte_eal_iova_mode(); > + NT_LOG(DBG, NTNIC, "iova mode=%d\n", n_rte_io_va_mode); > + > + if (n_rte_io_va_mode != RTE_IOVA_PA) { > + NT_LOG(WRN, NTNIC, "iova mode (%d) should be PA for performance reasons\n", > + n_rte_io_va_mode); > + } > Is this comment valid? Won't iommu be used for address translation both IOVA_VA and IOVA_PA mode? How much performance improvement we are talking about? > + > + NT_LOG(DBG, NTNIC, > + "busid=" PCI_PRI_FMT > + " pciid=%04x:%04x_%04x:%04x locstr=%s @ numanode=%d: drv=%s drvalias=%s\n", > + pci_dev->addr.domain, pci_dev->addr.bus, pci_dev->addr.devid, > + pci_dev->addr.function, pci_dev->id.vendor_id, pci_dev->id.device_id, > + pci_dev->id.subsystem_vendor_id, pci_dev->id.subsystem_device_id, > + pci_dev->name[0] ? pci_dev->name : "NA", /* locstr */ > + pci_dev->device.numa_node, > + pci_dev->driver->driver.name ? pci_dev->driver->driver.name : "NA", > + pci_dev->driver->driver.alias ? pci_dev->driver->driver.alias : "NA"); > + > + > res = nthw_pci_dev_init(pci_dev); > Instead of calling 'nthw_pci_dev_init()' directly, you can use 'rte_eth_dev_create()' and pass 'nthw_pci_dev_init()' as paramter, this helps on some set of boilerplate code. > + > + NT_LOG_DBGX(DEBUG, NTNIC, "leave: res=%d\n", res); > return res; > Doesn't really matter but mostly 'ret' is used as short version of "return value", what 'res' is? > } > > static int > nthw_pci_remove(struct rte_pci_device *pci_dev) > { > + NT_LOG_DBGX(DEBUG, NTNIC); > + > return rte_eth_dev_pci_generic_remove(pci_dev, nthw_pci_dev_deinit); > } > > @@ -48,6 +149,7 @@ static struct rte_pci_driver rte_nthw_pmd = { > .name = "net_ntnic", > }, > > + .drv_flags = RTE_PCI_DRV_NEED_MAPPING, > .probe = nthw_pci_probe, > .remove = nthw_pci_remove, > };