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 0A3FA42354; Fri, 13 Oct 2023 08:08:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 70D52409FA; Fri, 13 Oct 2023 08:07:47 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2132.outbound.protection.outlook.com [40.107.220.132]) by mails.dpdk.org (Postfix) with ESMTP id 2662440DF6 for ; Fri, 13 Oct 2023 08:07:46 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dGquNs7Mg/poHOu50C84AftLSRXNmxIEIJ91YA/Epz5qYIZwGzghY/Tyach+fzZXucERoYIEX91kXprVQevXVDvDYYDOYE3ZEi6PnKrCACmBcmpv2UkVIqR8F0KW/TeLEOyaS0W6hmmDWSnM3vnumgUkvNzNRJfxx1hpSFckWKChVk1iQZvN1M8LvZOlqAp1WsEA09vEc+IXxmaARGnedZ+QR4avINdVI8Wksg1cjpT87p4jWvoBcaHi9quP/JK/rC1P//ZUDzF3HMY2KDG944yD4FZVKjICuvE+Wuy4ICJ+IfQXd5uVgFMiOiOJYuoF2UTIb4I2q6FZxyhECe6QPg== 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=lS9X0OPezobSSye6OxJCxnFRTQOdI5QvTpjpoPcga82j14CXWg8zMSq0LMpwpwCTfZ2cvrHZSRZgg7Ju1xUXVN3Y405CCfIwIahIljYtb2vAJFg10YoC3x6cBG1VAgAAm93M/TxgSFFLWYCYaad5+qBwm9/lVhWTiOtQDr4j3ZvVyB1hofK6El/hm2cv3c4Xl3Y+orhVSPcHx3bCzdVwgS0lF+Ovowdkn/7RjvDc/fI/6NQdE7TZ+3rIBV1a+mrsyJP29oIM1EnrDryg1ql/zMJY3LWhp9gDV9/iUQ1EoR3k6d6UycRJ1jBFfG5w5abj9wuMg4SwbC8jb8wxRv4rAw== 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=kqd5fUkZULwgdrtWee5dAh6aFuvFw2q4jfLVy2N2ermemoOds/K/FIRoaUfjTg0R/F5xEX8hyKus/Gq8FGQoltR33iDLDO7qpEgWfkD4VKne2bZT4xlGC8ivX/TUF7G6BF6K2Lw6iYW21ntoDDiZY6YIH5FS26/tiFneYWMyZgM= 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 PH7PR13MB6296.namprd13.prod.outlook.com (2603:10b6:510:237::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.45; Fri, 13 Oct 2023 06:07:44 +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; Fri, 13 Oct 2023 06:07:44 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Long Wu , Peng Zhang Subject: [PATCH v3 09/11] net/nfp: rename some parameter and variable Date: Fri, 13 Oct 2023 14:06:51 +0800 Message-Id: <20231013060653.1006410-10-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231013060653.1006410-1-chaoyong.he@corigine.com> References: <20231012012704.483828-1-chaoyong.he@corigine.com> <20231013060653.1006410-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR06CA0008.apcprd06.prod.outlook.com (2603:1096:4:186::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_|PH7PR13MB6296:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f5613a5-c7a6-4655-3241-08dbcbb2b736 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: O4nl2kdMqQ2ea89xrJlFDqM0/vLHL3A/bhIFrQ53DkymZ05Bx2JRDm98A7A5PsY9jJrSflmxe4NrExHxvbyIxvpVk91S7A3bR5yaQB+dfUpprISxdmXtST8b0xhh6tvs1ThWnT87ZJ+1tHVGsNkiMurDolBuUdYHFAHNDZ5WTv3KuRxiv/EXw9jhLSaPu/bdO0oMKLDf3AXoj7NjqmutBuy8DlIb3x0VsmyZGZG6QDlXLXP1EuSFBz22wtLcLa5dECV63fM9mSK0HqJDMl7BVcJN9jHUjMA/uNOSvwOT5v7NK51IRXBE/3gHEzsBukjjNU+DqIQbV9Xt0h9S8YtNCmlz0W5jH2eXsJpJxWR6zhQLe4fkCUcMtZ8HYZ1ksHRqKYi4BYDuJaU2iM4zDCnOUxyds6zm7OAprRT1atXrPy31Ky6fJO8w185ybKlJUPvt/N/3RaiOayvWfMc8x9+6ss4TVsdiN0bC4tMr9GAjNPxroiQVVemXAB5cDTN5rVSJWuhhID3pRuqeIRjrB0954lp0rPNqpIpCguKORU//GmStNFEPyAUHi11vsGluKIuNZ1GTdkvqOQTQjiuSIH93Sc76gRM9V3FE5BRYeOpgyw6el2hqcpgORLxyN9DzJFKpKO4N+N2IJbtvA9y+e5vadmD4chfl3Nfwq54KjR8blJ8= 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)(396003)(366004)(346002)(39830400003)(376002)(136003)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(86362001)(36756003)(83380400001)(2906002)(38350700002)(38100700002)(44832011)(5660300002)(8676002)(8936002)(4326008)(6666004)(316002)(66556008)(54906003)(66946007)(66476007)(52116002)(6512007)(6916009)(6506007)(41300700001)(6486002)(107886003)(1076003)(26005)(478600001)(2616005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?v+t/9sPNPdz/qTar4vIAYStCkLfBiNHTReSPKREE4W1Dro5A0N2rUIRW8N+o?= =?us-ascii?Q?4sLLVvwg34PmMHLHC88myqnScNjaLPJFA7gwAIIgQAa3I4oyArfpGU2L5Vih?= =?us-ascii?Q?xaNqv9bbTe8yfi7u5mWE9cplRRvVs/s/zBpcjB4ajM8vUDehljeG1c4RLQ0J?= =?us-ascii?Q?YHgiDfOt+mB4oQwuTnKToG2owDHblquANu/WzzNYgKFiMQ5VJStACUd6ohDE?= =?us-ascii?Q?6NVvojVYINZUXHBSoKtRyP+3lepXUSRG+76/1hKwFa2bTn9ZPZNlnSR/WKCo?= =?us-ascii?Q?NhIatYX6lVEzSdvE/H525HsNGlCaQZ+U3J0Aq3Zs/JrvU3+1jcf4BNvj43qV?= =?us-ascii?Q?jcwnOuNVNT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92P4faPzZ?= =?us-ascii?Q?yCC40FpktItR6euYoQ9Vdgse4eCgeqNt4wwXGvDn2laSa8msLSnQ4wlgIubV?= =?us-ascii?Q?HpLzIRhKdxwa6691vFKtc8RaUl/8s8KXKQc2yDv/PGh7CTjIcIOvT10FYZch?= =?us-ascii?Q?6E8JFBIdnIyRWOeM9aHsdtKoHDZU3aJbn4e/e9kJdxd5xyQsOLMxBu7lQKvW?= =?us-ascii?Q?BNKbP9ocSkI2hywCwmkXurKwG6IyLxpemCJF5WmtKpzgdRw1IqYwgaV+h609?= =?us-ascii?Q?pWEh3W8ILfvu0HY2Z4bDym9fnw4qF8HYotEwPwRv6f96tFYq1oIw+csypNPl?= =?us-ascii?Q?ppG4EZsUJQGtDrnmfCjVdVuY2OaevHHdck4vDkr4a2e+QH4vqGT/THXtCnJI?= =?us-ascii?Q?RQ=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1f5613a5-c7a6-4655-3241-08dbcbb2b736 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2023 06:07:44.3301 (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: tkVYMnXy+CebLDPUPOsPxgfd90gQkItD6xz6JFv1UOkWjmH7G3TUeNtGS4aywUbw2BRMDqiu3j+gBngM7+8sMK2MKzOfNWzGN0bSJFFP6XQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR13MB6296 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