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 D432643220; Sat, 28 Oct 2023 08:54:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8404C42670; Sat, 28 Oct 2023 08:54:04 +0200 (CEST) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2101.outbound.protection.outlook.com [40.107.101.101]) by mails.dpdk.org (Postfix) with ESMTP id 7761842D72 for ; Sat, 28 Oct 2023 08:54:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VkWL4DGQvqD75PpmLnQhz6RewM3d6yIeZfvcorPpuGC9z3T1TqF61VRZaIP4SlbF69uQbqmv0TDvNDYWeIqPjFjBEt8KVuXpl1o/ugqpeJD2INKyATJkJoq9Eu/cugEf9s1vOazZFg7+cXjXSj4P0vSQzl1CEYQLVK0U4MhY+T+ASLZRJFyPBYDrBQhhrbn+I2991uYtS/dOmpGB90jXhx94wDWc5uCAc81bR5kwOy8tiIPFrbHf/9fmyi2t7rVob84Oy0Mp9hrw8pJVPiMGoCb+LBYJNoPV96dXr6qv3mRC1SPWk7kqX6nRS5OXePczaIFRv6M6FHtYvILLWDsOSA== 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=PofJ0EvCuvUiUZ29v9ygiabDgSc1yjv4ARqSZBYsLs8=; b=GOJR5TB9cxw9jWpkLZvBhEi2U7oho1X0uo2vtBTTbiuMRJfLHsJSqXUs5lNSNQZCJpldD09kQ2qwaRa4qvK7Yhzmfc5K7dWrAj9RCrciFq+APu7FXD47E4j1tIIi6U+C/wlFS3AvLbioVQ4qjFCU/3RCwEHg4QNMAetRS/3pIJsu1OCPXry0vEVqPmyOmvPqqkJn3IK5H/9pEox1im9IgI93NGhYEUKKIj4Vfee4vEJhgXgXbTbCgK3vS6fV+ahR/tOL/vTzu2dq91kpFlBDbm2FZgTRqu+fLAjYjqtnoivlwji+DvSdv6wVDh0gjViwTpjike1B+zwwP3Z230052A== 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=PofJ0EvCuvUiUZ29v9ygiabDgSc1yjv4ARqSZBYsLs8=; b=PfcdGBQTF6NmvJLlYA2szEmLG7tglgDM1pmT/B0rasgPijNq0HZCjKH9GB0rOWoJNmK4Nqg+B1Hl8OYkLAyQLyZtJBOkfWme9DD3R4sOELShCXe/AOPH02NnKpPZVFt0mRzQG4sLN5ejeKoG0d9Wh9Dunl4j4o5tPKo9pujxMjo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by SA1PR13MB6055.namprd13.prod.outlook.com (2603:10b6:806:338::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.19; Sat, 28 Oct 2023 06:54:01 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::45b3:d83c:cff2:4a1b%6]) with mapi id 15.20.6933.022; Sat, 28 Oct 2023 06:54:01 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Peng Zhang Subject: [PATCH v2 09/11] net/nfp: unify the PMD name with macro Date: Sat, 28 Oct 2023 14:53:13 +0800 Message-Id: <20231028065315.1937188-10-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231028065315.1937188-1-chaoyong.he@corigine.com> References: <20231028061558.1842855-1-chaoyong.he@corigine.com> <20231028065315.1937188-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SA0PR11CA0020.namprd11.prod.outlook.com (2603:10b6:806:d3::25) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SA1PR13MB6055:EE_ X-MS-Office365-Filtering-Correlation-Id: 69117fc3-f8cc-4b94-9212-08dbd782aad7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v5ID2GEnUolAupRxnp5OgXkGCaP5aqXoQgA60s8rpk2Wkw2o8YUJS/ClGBLrir3s5Iiu6BqIomU82XNYgHBAi+01T7rCbDo6iYt6pPfC5fzcLglNBvY0Y9lDmL5SBztpANmzTLtizi0IgBlWMx0munZV18FQ896M9kM+GIE7NX2bEWoL4cZa3czWqqub7lvKAS1Fee55tMMoh6iPyRDVYDMkxdwuHllgYw1bxuF2j9B/581zTvibYiQ5pypLwzqwwbyucEn5Vbntwwsq2EmFijETM3kzlKM5Tcgaf691E2mu2Pjlc6v3NCMVZ+O5/aO1GFoRyOGxetIzVGhTeAj3eeznw/TTLlVNGhj8SF/ZXm795WdZHsxAAOgfBdWYxKclOopmnPRIPAe3T+AA8uGXHqxFQRDq2VoM8Amx17Z9WrUtfXiMsDaTP54fzxYnHC6p2WgLaPVLAsGsNDuYeVuJVT4LrI7DbpGaNNEB1Ohax1mXYaxpGkoHw4XaDfyg791EwP6n8iXzQzoHrrXZzYrKN8u1KFXYemOTLbMbl9mYOexHwSZ6kYz+KFOPi9xRQTRotI61vja39aG++r3P2a5QMKqaiDo8tvqjZPTstzRUrBL0EZIaWRG/x6GRDWIJjiUTXc37HnDbq6dkOb/W7uKopK6hsdfz9UKj9/vpuvYeMOU= 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:(13230031)(346002)(136003)(396003)(366004)(39830400003)(376002)(230922051799003)(451199024)(1800799009)(64100799003)(186009)(6486002)(8676002)(8936002)(478600001)(6666004)(54906003)(66476007)(66946007)(66556008)(86362001)(4326008)(41300700001)(5660300002)(6916009)(2906002)(44832011)(316002)(6506007)(52116002)(38100700002)(36756003)(2616005)(1076003)(107886003)(6512007)(26005)(38350700005)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Qxtw+vyY/EhjCglxcbUo0O0xc4gj1EXUMTIn3NiKCtWYKTzgkSWhEA9bkRSp?= =?us-ascii?Q?FaBo12eIIVwKet3qPmMh7BCFR0bcLyW6lXLvP//TGSXMIPW3F/okBuJWehZK?= =?us-ascii?Q?ISKOlePoUkHL1gdXrSoTd3CCAt3rHkpFDJ/otwKIKdCSi772VLrvtFBYUm+w?= =?us-ascii?Q?6mYC6hh7IwBlyJPqEJFoEbjVaDqNK2r1VYVpGtTC9bM7ZOxvJZ25FJlwCDjE?= =?us-ascii?Q?wBJQw0yjKeaC6EFnM75ASrMSDk29KHtZ4UFWqRXIz2ZabenBEFJ8BrzIs/6s?= =?us-ascii?Q?zvbVR0hhEUMIXlYN57dUGxMYn3WElHD/G0TPHPG020Wp8m7qABkAxPQAaX8W?= =?us-ascii?Q?cbUES8VKAsfSpd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mvxh7YRYUAa9SS?= =?us-ascii?Q?e0Tu8PgCzlM1Qbc+3bFOr8dPWLgGFnSSIoO4Dz6Iy7lSMGn9ShZgy4X0RhSl?= =?us-ascii?Q?O/rcnsmjedAaBNt96YCqnQg30YIsbusLny2wYyblQuW1dKyRmICWD2FvDI+V?= =?us-ascii?Q?HRnFE49EstP4/tdTQDJVlolYAw5Fi47cnmD8+ZrqRsrlgmcmutrrL+9ES0P2?= =?us-ascii?Q?C61YBUoVc+wOnSQw9tRuKTNAbM2GopoNfh8g+O/TuftJ3CQZxNUhV5vkG9CB?= =?us-ascii?Q?OaIXNIYS7S2tQj9XwahVtqf/1SGeYL3ECcfRezZx/yovE2DjBhSeoE5fDDNj?= =?us-ascii?Q?p83tlflZznQLDi+nAXRx/uXJXO8JBFChA54Fxpc6uLtqTo4vDFvDbtHDrq5j?= =?us-ascii?Q?cA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 69117fc3-f8cc-4b94-9212-08dbd782aad7 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2023 06:54:01.8283 (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: lRwYoLgumbtEbjZ1TmykyLvidDO6NRDfLhbi4wnesV+M1zxiDllr313LTzjuaiJdenbehj1e7lTiVAkKfaYlBYspOKq7MzsMb4xHAqyAymc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR13MB6055 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 Unify the PMD name with a string macro, make it more extendable. Signed-off-by: Chaoyong He Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_ethdev.c | 8 +++++--- drivers/net/nfp/nfp_ethdev_vf.c | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index 8057452799..c4a36027b9 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -21,6 +21,8 @@ #include "nfp_ipsec.h" #include "nfp_logs.h" +#define NFP_PF_DRIVER_NAME net_nfp_pf + static void nfp_net_pf_read_mac(struct nfp_app_fw_nic *app_fw_nic, uint16_t port) @@ -1233,6 +1235,6 @@ static struct rte_pci_driver rte_nfp_net_pf_pmd = { .remove = eth_nfp_pci_remove, }; -RTE_PMD_REGISTER_PCI(net_nfp_pf, rte_nfp_net_pf_pmd); -RTE_PMD_REGISTER_PCI_TABLE(net_nfp_pf, pci_id_nfp_pf_net_map); -RTE_PMD_REGISTER_KMOD_DEP(net_nfp_pf, "* igb_uio | uio_pci_generic | vfio"); +RTE_PMD_REGISTER_PCI(NFP_PF_DRIVER_NAME, rte_nfp_net_pf_pmd); +RTE_PMD_REGISTER_PCI_TABLE(NFP_PF_DRIVER_NAME, pci_id_nfp_pf_net_map); +RTE_PMD_REGISTER_KMOD_DEP(NFP_PF_DRIVER_NAME, "* igb_uio | uio_pci_generic | vfio"); diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c index cb8a37bce7..d0834ccb3e 100644 --- a/drivers/net/nfp/nfp_ethdev_vf.c +++ b/drivers/net/nfp/nfp_ethdev_vf.c @@ -15,6 +15,8 @@ #include "nfp_logs.h" #include "nfp_net_common.h" +#define NFP_VF_DRIVER_NAME net_nfp_vf + static int nfp_netvf_start(struct rte_eth_dev *dev) { @@ -416,5 +418,5 @@ RTE_INIT(rte_nfp_vf_pmd_init) nfp_class_driver_register(&rte_nfp_net_vf_pmd); } -RTE_PMD_REGISTER_PCI_TABLE(net_nfp_vf, pci_id_nfp_vf_net_map); -RTE_PMD_REGISTER_KMOD_DEP(net_nfp_vf, "* igb_uio | uio_pci_generic | vfio"); +RTE_PMD_REGISTER_PCI_TABLE(NFP_VF_DRIVER_NAME, pci_id_nfp_vf_net_map); +RTE_PMD_REGISTER_KMOD_DEP(NFP_VF_DRIVER_NAME, "* igb_uio | uio_pci_generic | vfio"); -- 2.39.1