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 EAD4D4236A; Thu, 12 Oct 2023 03:29:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8250E40A84; Thu, 12 Oct 2023 03:28:08 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2103.outbound.protection.outlook.com [40.107.95.103]) by mails.dpdk.org (Postfix) with ESMTP id 172D140DCB for ; Thu, 12 Oct 2023 03:28:05 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LOt8x7qHVCL448PXFFCIS1gfi6RdJQ3UoSe/sn5vXgyPFJ6eWpaoyZq2ws3lInvNFpXhjs0931rW8EIe2lbrSHxBh82iRR2CuQgU2WN+tHUEd1jSvhAmQyU7Oa3Y+0tYxvev1aBlB51me9XTWcmjEMMPE75vzEvKZ1cx/Agn7s0Sjg0UEZzjZmm3jxyvNbIVS5ysQnnHNJDuSXZkwBFVVu4hifClKsCRllLZG6hUkywCnMBmHyahHCOunnjHbJAd0aBANNju1RAVTtOZIEmApXEjX0DhhQuZuxhqABj9P2nughzvES7+zzOyr2XVYHTzmOFkYsgDFuoIPr4vJQ/ukQ== 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=3hdQwTnAZPGx58V4Z8B27byupAt6nP5Y6y8xfm9DKg0=; b=eHo8bvwZNJhAt6PsZiIfNHNHbspMgesgY8CMggn1gwRN3lfAwQv2YKZBf2qpo4KXC5jFc/v9ghr1NBmbqO5yrPlyqDGRo9yC51SfdBAbhZbJl9RjYjEJEBYEV453tp1RJEaqb8J3ezuN++DsYAzdMF0MUD35U3P0nBLTeiXUtz30he6VFxXSuHeJSW2s1k/DNy2WyEAPktJRBEWsI0WKa+Od+guHUwNhi9JeeJehYP5QCuF+BwoYYgeoFOAUo9IUE8ci5mDC1UPS9v66Ylil5Ju+fisRKUwjZRR8iswtmqf+v7TJTwlI+nW4fNj09k4E1fyIn3aH5lpVnciXBK7xFw== 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=3hdQwTnAZPGx58V4Z8B27byupAt6nP5Y6y8xfm9DKg0=; b=UXRqnuS/yTTon60w62T6EiYQ0k8XLvXfrvcA90euaDW4K7my7BjUsWbVW6P0kQ81nYpAAzPX+uAp0ohy8puAOJf/klxRxLNjmFsX9DVhfizmeIm/z4H/TPf6T8/vwH4bYfq9+xaFvXQqMiwuWXHZgIvjrvErRZHJ+GUU/RNOIIc= 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 SJ0PR13MB6111.namprd13.prod.outlook.com (2603:10b6:a03:4eb::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.42; Thu, 12 Oct 2023 01:28:03 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::2d5:f7d6:ecde:c93a]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::2d5:f7d6:ecde:c93a%4]) with mapi id 15.20.6863.032; Thu, 12 Oct 2023 01:28:03 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Long Wu , Peng Zhang Subject: [PATCH v2 09/11] net/nfp: rename some parameter and variable Date: Thu, 12 Oct 2023 09:27:02 +0800 Message-Id: <20231012012704.483828-10-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231012012704.483828-1-chaoyong.he@corigine.com> References: <20231007023339.1546659-1-chaoyong.he@corigine.com> <20231012012704.483828-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: PH8PR15CA0015.namprd15.prod.outlook.com (2603:10b6:510:2d2::23) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SJ0PR13MB6111:EE_ X-MS-Office365-Filtering-Correlation-Id: 7a9d1f67-9337-428b-f8ea-08dbcac27a81 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZtmTDPaMW3ZyScmx7eSxv/e7SHkNLxA1GJ8F2W2nl7SM/EkRgVvPUuwxh5GDHm5/CU5o5JVN+9FcaRT1yI/Ep567jGCdn9/zEX4ZE3yGbCb79ISPIYDzgmeYd9+BT0EboggVIelrsmljd6Ab2zG8lKmOwulBSDZTsXhjazDHaPa3YPBIwDB7WzkWLNNuJ54Qj5QTwhMTo5iEH71tvS+R0b6Y1kOYXGtEAnJCbEdkmuNhG/DhiN1yKqgECjdBzfVkBKLKG55Q/rwoQXNScu94l4rzKKLoNEoXgTxnK3zAI0ZlIpVAMrte7nEnOJF4iI2Wp3P3C4nvvjIkYWGVDGr10CRGT2josaKeo/EvmCja1eKOowJhvVh5Uq1kN6prpu1UkjqZsw1wGKRgtKEdmgR/P6zZk0dmlqh22SSJe80NXvN/Uy8WJYa8NGdxpEEFL6/+6SyJmSOYMHq/ia0SkzECWYBJxL4froJmXucwMTAWSg0DmDBOm85ow4Fu/5oowKpt9/s7eWrsUtBkA5MnCCE+oT5+l85b5oqdd3rjm+AVdMGJEqxuQDQOfcaMGQ19MEYadtuxMSfkRDHdYlxVmliURuDfh07L4awfWCFj/VqCos05HIh/k3Oz7quCMSGNSFDggCss1Pp7+w2zKeTc9F2Ih3cArDMD+7kFxThafONhEtU= 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)(366004)(136003)(376002)(396003)(39830400003)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(6512007)(107886003)(52116002)(1076003)(2616005)(6506007)(478600001)(26005)(6486002)(83380400001)(44832011)(8676002)(2906002)(316002)(54906003)(5660300002)(41300700001)(66946007)(66476007)(66556008)(4326008)(8936002)(6916009)(36756003)(38100700002)(86362001)(38350700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?DbPUz7JYCQvI0VUXonzrii7656VHBW8AaK1HQNxrMr2j8mdtq+0yI+f31KCf?= =?us-ascii?Q?JjvGdCPhbZwWtBDiR4gvh6R7okp67nMEf+5yy0713cQm0FHrAS1/SkFX7XBw?= =?us-ascii?Q?r4gqzDHCGNfZuAWxrpOy+GzAaHCmiZoZ3kgOImxnYcOvkXW6ZH51v1d8msLj?= =?us-ascii?Q?fOzNN24ICc4d/QwriQqDyUK9AOOSTmfzR3XG8MzIW0ZZcan64feE6N9mfIUM?= =?us-ascii?Q?uUMW6pLMsqbZ+xrN4xOqsfsiSLeM2Cg+DQ5uTt/s8EegGqPqBipmw6qkGocY?= =?us-ascii?Q?HVrYayo8JGjcCZ7hl8ai4B/kvgcliAVQ7b3AlK7x/quPkKLeWAue8N5aILmg?= =?us-ascii?Q?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akbasFJmrTTa6r?= =?us-ascii?Q?EG39pVqfL4Ra1xS1+Bv2GTBwCaalUdhmHt/UZV0Hhmi9ktKHPU/8rcDiqGNo?= =?us-ascii?Q?fC2//Ftt9D+oUzt0puvSxaL6UT+vAg6V0cATWkooI47DAMNQMaPJoCL3ZuSP?= =?us-ascii?Q?B3OoACYUosP1w2J/kQNGlnDhOycS70XixF/YMU9kZnj1VsTj1guPGGsg2ZDS?= =?us-ascii?Q?8tJJDhWP4Yixl9UmWfd4dZYSLKjqaUmVBwe9WYg4Zyr04iYc4aQwRRWL74Y7?= =?us-ascii?Q?P7jOiToWOx+sgKF9BXRMBaYLVAYDWi4v2jhNgJOAh75neynty9aus1RuGkQP?= =?us-ascii?Q?mFYRYG23f3d6+UY7TfQyC4cAWsIpTrfLmH3wXizcyvlROXLNaFjBMcyTRbZn?= =?us-ascii?Q?Ew=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7a9d1f67-9337-428b-f8ea-08dbcac27a81 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2023 01:28:03.6264 (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: 0W+5uBqqPXelcuRWdev3U/saflS0psh2H2BtTtG5Gu9sPB7wJOJ2+Vu3tSrh4jNnk+wEmaPhkW5rKqmOhMqrEpmhVS4B7QHnhTnnNHPPEC4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR13MB6111 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 Rename some parameter and variable to make the logic easier to understand. Also avoid the mix use of lowercase and uppercase in macro name. Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_common.h | 20 ++++++++++---------- drivers/net/nfp/nfp_ethdev_vf.c | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/net/nfp/nfp_common.h b/drivers/net/nfp/nfp_common.h index cd0ca50c6b..aad3c29ba8 100644 --- a/drivers/net/nfp/nfp_common.h +++ b/drivers/net/nfp/nfp_common.h @@ -19,9 +19,9 @@ #define NFP_QCP_QUEUE_ADD_RPTR 0x0000 #define NFP_QCP_QUEUE_ADD_WPTR 0x0004 #define NFP_QCP_QUEUE_STS_LO 0x0008 -#define NFP_QCP_QUEUE_STS_LO_READPTR_mask (0x3ffff) +#define NFP_QCP_QUEUE_STS_LO_READPTR_MASK (0x3ffff) #define NFP_QCP_QUEUE_STS_HI 0x000c -#define NFP_QCP_QUEUE_STS_HI_WRITEPTR_mask (0x3ffff) +#define NFP_QCP_QUEUE_STS_HI_WRITEPTR_MASK (0x3ffff) /* Interrupt definitions */ #define NFP_NET_IRQ_LSC_IDX 0 @@ -303,7 +303,7 @@ nn_cfg_writeq(struct nfp_net_hw *hw, /** * Add the value to the selected pointer of a queue. * - * @param q + * @param queue * Base address for queue structure * @param ptr * Add to the read or write pointer @@ -311,7 +311,7 @@ nn_cfg_writeq(struct nfp_net_hw *hw, * Value to add to the queue pointer */ static inline void -nfp_qcp_ptr_add(uint8_t *q, +nfp_qcp_ptr_add(uint8_t *queue, enum nfp_qcp_ptr ptr, uint32_t val) { @@ -322,19 +322,19 @@ nfp_qcp_ptr_add(uint8_t *q, else off = NFP_QCP_QUEUE_ADD_WPTR; - nn_writel(rte_cpu_to_le_32(val), q + off); + nn_writel(rte_cpu_to_le_32(val), queue + off); } /** * Read the current read/write pointer value for a queue. * - * @param q + * @param queue * Base address for queue structure * @param ptr * Read or Write pointer */ static inline uint32_t -nfp_qcp_read(uint8_t *q, +nfp_qcp_read(uint8_t *queue, enum nfp_qcp_ptr ptr) { uint32_t off; @@ -345,12 +345,12 @@ nfp_qcp_read(uint8_t *q, else off = NFP_QCP_QUEUE_STS_HI; - val = rte_cpu_to_le_32(nn_readl(q + off)); + val = rte_cpu_to_le_32(nn_readl(queue + off)); if (ptr == NFP_QCP_READ_PTR) - return val & NFP_QCP_QUEUE_STS_LO_READPTR_mask; + return val & NFP_QCP_QUEUE_STS_LO_READPTR_MASK; else - return val & NFP_QCP_QUEUE_STS_HI_WRITEPTR_mask; + return val & NFP_QCP_QUEUE_STS_HI_WRITEPTR_MASK; } static inline uint32_t diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c index 7096695de6..7fb7b3efc5 100644 --- a/drivers/net/nfp/nfp_ethdev_vf.c +++ b/drivers/net/nfp/nfp_ethdev_vf.c @@ -396,7 +396,7 @@ nfp_vf_pci_uninit(struct rte_eth_dev *eth_dev) } static int -eth_nfp_vf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, +nfp_vf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, struct rte_pci_device *pci_dev) { return rte_eth_dev_pci_generic_probe(pci_dev, @@ -404,7 +404,7 @@ eth_nfp_vf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, } static int -eth_nfp_vf_pci_remove(struct rte_pci_device *pci_dev) +nfp_vf_pci_remove(struct rte_pci_device *pci_dev) { return rte_eth_dev_pci_generic_remove(pci_dev, nfp_vf_pci_uninit); } @@ -412,8 +412,8 @@ eth_nfp_vf_pci_remove(struct rte_pci_device *pci_dev) static struct rte_pci_driver rte_nfp_net_vf_pmd = { .id_table = pci_id_nfp_vf_net_map, .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC, - .probe = eth_nfp_vf_pci_probe, - .remove = eth_nfp_vf_pci_remove, + .probe = nfp_vf_pci_probe, + .remove = nfp_vf_pci_remove, }; RTE_PMD_REGISTER_PCI(net_nfp_vf, rte_nfp_net_vf_pmd); -- 2.39.1