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 2BCF1426D6; Sat, 7 Oct 2023 04:35:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E34540EDF; Sat, 7 Oct 2023 04:34:20 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2139.outbound.protection.outlook.com [40.107.93.139]) by mails.dpdk.org (Postfix) with ESMTP id 38A1740E54 for ; Sat, 7 Oct 2023 04:34:17 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GMABBxWabmzCZ5s/0pai6Qw31N9L2arNsmUffrdRH+9EYCRulpd2ace+6PnLSCErfHWJpwvznSWBILhcv+N7291E4OagpFXjtwDwN8z1rOnJAYqHwUR0zoF7h6SeRIxf7WUkugC7uJmw6CH8yGl2u/ACGWYTuvvX7ghLgSo9HrCQiervnxFDE8kknD7cu+9/hg5LpzpgqnjklFP2wI5g6/tko8MTa/X73nQMrK00qid/Gob8pb2yrbujW3VxFkOIwb275x1Cz8DfQtNUw1jvLb4ZMxjRPzmReeQ4Lo6/yaR3xLX/jzcqKvg34BR4/h/ypCl7jWZAiqN+zxDG5ChWTQ== 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=8tqDP96CGc2Acn82c8Yh8nne0ByhETJZgQXPvctSaK0=; b=ObmV/jgr15n/v2DuouZKxq1An6iWrBT2U5GqN9MEcHBNbMdQ7MosT0inLR/ZwW91OBr+9S1OxHqEiw69qsSkavmp5d/rJcQnJbSwGw39chH7VrrXk/Zlp6Nq0hJon5ax3rRRJOVnJaUyqAP/jPorUWAmYGAjVK01C4fMUjAegg/YAAXISgYubpmMkwQHt4kcYuwGsSM4p3eLpk4pRcT99pfQrzp9LL4wasmzNh5Z1LaQniBKM9FvroWLmKFv1APnPoNdn3IFjw5YnY1T8IQAXRirsQCzhn5yilpzYbNJsPLhwphSkdPwfEHdvP1LvnG08UrN7vLXDtNPiZEEN1Lc3w== 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=8tqDP96CGc2Acn82c8Yh8nne0ByhETJZgQXPvctSaK0=; b=PI1VlkcCa0y4Pc1tjdCxDNka2iwk2lr+LppIc1yET8c5XiTUcyXupHffNmQdS4xBzFf875bhdYEmjccUnUUvoubH7x6TMwYa23Ut/376+8hSI7uerrQEfVcCRqtEsLT8Qdg1qMPwgSv4BTPwPWdF78XfNQkAPDHp+I1C0L3P38M= 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 SA0PR13MB3936.namprd13.prod.outlook.com (2603:10b6:806:97::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.38; Sat, 7 Oct 2023 02:34:15 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::28c0:63e2:ecd1:9314]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::28c0:63e2:ecd1:9314%4]) with mapi id 15.20.6813.027; Sat, 7 Oct 2023 02:34:15 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , Long Wu , Peng Zhang Subject: [PATCH 09/11] net/nfp: rename some parameter and variable Date: Sat, 7 Oct 2023 10:33:37 +0800 Message-Id: <20231007023339.1546659-10-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20231007023339.1546659-1-chaoyong.he@corigine.com> References: <20231007023339.1546659-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR03CA0212.namprd03.prod.outlook.com (2603:10b6:a03:39f::7) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SA0PR13MB3936:EE_ X-MS-Office365-Filtering-Correlation-Id: 15eec2ab-eaa1-45fc-413e-08dbc6dde61d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RaVo5oDwKtgXmsc0DE6VIOCelXFtdlhtcWqEM2CrAqhRVSlpUjlURk6ppsgEouna3WQSZZmMbaFSkAap1DW1e3wOsCRrDnxqeUe48kYmWmX6hc2q2ZhBvM6B1kSUjv3F3s+qUBxM1B6OqI66WVG5yMsUqUzKWogHH2CHSmDTL63iigMquHSwkzUuyweMHTzAFwpYcbC9j40DgUN20MtbuolfcpliKR1zKY/Cvnd7azObIKCrWQnJLENpGsfUwAoGqf7MUATNz2+5ji5ztkMI/LWTKQ5fdu2+7fotqF2QWl5XMEpCzK1PUiURa/RkoBDcB2IGVs96m9U92m6BsaeayPhUS9nsh75UQehRuwlbgckfzUTNEUfVA8FJiuWmrPNplx5BCC9h4R8jlmJH4CcHMZfaRCm9CEYqTbYSbdmkOtuIQsCKC38d9kQYtJh+3yk6v0f4X96oTsxhaN/CRMYJsI7UA/i7J27nizlhbJwW9VRs/r64T3WmP/RX55T0sqmKODf7t6cPP1O+8jolyJB0F7h2F1hWlmG969HENrPIfwBLyrKqDeMk0jzLcDQyWXVKmmmj4rEda5Dc+FTO/+nxpDKsFZEO5h824n0R2+2fGM7ZU4G7W7rSRVt/SWGIiF5PIWWhoDeNPHW3+33NGj9z5Yfs0t+y/jIBnLkBj04Hsq8= 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)(366004)(376002)(346002)(396003)(39830400003)(136003)(230922051799003)(186009)(1800799009)(64100799003)(451199024)(6666004)(6506007)(52116002)(6512007)(478600001)(6486002)(26005)(107886003)(1076003)(6916009)(316002)(41300700001)(2906002)(44832011)(66476007)(8936002)(5660300002)(4326008)(54906003)(66556008)(66946007)(36756003)(8676002)(86362001)(38350700002)(38100700002)(2616005)(83380400001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?TsL3fwBllCYBu5TLgZEYaapIMHdz6I9Vbp0sibdEOL5M5SVs6aLURRhKuZBy?= =?us-ascii?Q?JuD/wpHXHk5hpaf7jkiFlg/6QZTaR6qcNPbASNk8GS0kBmzfZVH7wLjzRTXG?= =?us-ascii?Q?Bf9Ls8JDcdLhSgpmv5cwoOWtXUk/OeM1NXvqIKTYDIi1OT3ybuotQ+26xlhJ?= =?us-ascii?Q?oCTNP/PCMx15t9PWHadeNaNgvccU6+vn05mbUVlWxFM/gKVqWrLZb9cWS8HU?= =?us-ascii?Q?+By8gWgHSF0Vg5DfQScDubdsulzR+h7cczOq4hOduV/3QttGU2hlWedSI3Hq?= =?us-ascii?Q?YMBt6oleRqSJLS3ipafUm/xuRcjvPzEmzJOKaEMZw/2rhzl/KAuyzYjwAZmR?= =?us-ascii?Q?orFJm0atP0YKklAOFnaq/DXxjjehKI9nuOT5r6VAhhO2POoyebVnK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acofLx5pTnZodWlFCLPEjm4B+t8XDKHoqh?= =?us-ascii?Q?nMk4zyFKqCctIzBQbxnNKM43rrSRP5PAYmefz95OLgdjf7o0aanAXGEoK2pv?= =?us-ascii?Q?UL6cZprmPNI3IgRtMR+5qLJDqpnjxr9ERewJA+1CuSAbrwZmWmdL3u2iS7CF?= =?us-ascii?Q?Nm68nMaitfQsKc0LTJl8OlEh+SdvcowR0Aau+LBe0k/D/c7oov9cpQJwTBZY?= =?us-ascii?Q?IwkX0FApmAZkQrg9g8mxpVTUeGxcfre9/n3QJiAAUBSeXo3EZD+r7vJxm+K8?= =?us-ascii?Q?qFJXrpaaaN6ToMM3Zrj/KwGR6i31IbImP20AX/Nlu4nx43SUAkCFaL96SC5K?= =?us-ascii?Q?rA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 15eec2ab-eaa1-45fc-413e-08dbc6dde61d X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2023 02:34:15.6737 (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: VnsyGCORQdxc7Z2NuXZjMXb/QPbZHYP5u6pHbAYkPVpMdIWTLtv9EsJqD1deogRDpcSWwkLNTt3LN5li0tntMRKTD6I/AfQkLjHGhy0oHgM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR13MB3936 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 11eda70f1a..a5e20bc4a7 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 8053808b02..af0689832a 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