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 287B4425A3; Fri, 15 Sep 2023 11:19:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4363A42D6A; Fri, 15 Sep 2023 11:17:04 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2129.outbound.protection.outlook.com [40.107.223.129]) by mails.dpdk.org (Postfix) with ESMTP id F0F5F42D83 for ; Fri, 15 Sep 2023 11:17:01 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SWWLkAWU59e8fXMR003ScLs9w+tZ9ctkUe71nXpk5GmhrLoxVBKqbzDYcnOcE+m6FEzl4pUueBpgaprGOsJkiXjjH32o9eAe/i2ee4r0vdSt4ucZ/zyuE9nMgRyth5P54qokl8F3DeiZFx9djmbVtQ/q+Ex1Gk2Jvhwi5gxp8Cx97oWpqMJbXnULUEYTQraj58sXRtvZdAJ7Igdh6FZJ+1QCw8PMSCJj0Nt2hFRz4V8Lh5asc8N3+LPDzxgFUw5wUZDPHA7RfoyZ431pwXlkkXriYBdOKFv4mEd9VqLalSdDSRjrALoeqlQLlRbizEhFSdKS6Um+2DaiT9jix0CpOg== 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=4TWxqp5CfHjYHGOVb2S6lbyzk+2q0SKPUH8f9dCPDm0=; b=R1hrSlav7Ti9tkWGXJQ75DRVL6ckS9PRG3KTkRg9y0NmuBFgSswWXkU6xUDoV9d1INk/BI0gD+33qvu7UE4QjsUpavVtVDg8Hsqy6lW/7fuaX8BPfWattwklZQ96SZnwWPAzLeqg7bmrFqFTTsbRZ1dP6uEBNJ3VSpECPyYH4UVWNPfCysnPJEWvSGp9H/bBwTA7qDZcmbTvueEx5CCfEubQtg1GU01RrB52c4Dv1horPmu6qKeLG4RiBO2KWDoHdhvWr8y+XzDXG1ka7onkjbN0BE9SnKtnRR7OKcUYEBS8GpVzTOcEbxaWVse3ZGSCsYIShFt4++zBgVBRfu1lzg== 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=4TWxqp5CfHjYHGOVb2S6lbyzk+2q0SKPUH8f9dCPDm0=; b=EfwLFQUy3/XOYbyqCQn+gLEnqDXP6mXJGDxXq3bsAOxM84K83uo+OmFl0FfKuIfrhLexinxRHJAF9Lq7aW9Px6vbxzcrOTR7qigKGYYBFFxt2FaOeD4QSo2vef1EGoBiivJJAwBS6JyEVvYKue9ACW9ZPuqtkNcHXmmQPbkM5eU= 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 CO1PR13MB4773.namprd13.prod.outlook.com (2603:10b6:303:fb::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.21; Fri, 15 Sep 2023 09:17:00 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::c05c:6915:1628:70c4]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::c05c:6915:1628:70c4%7]) with mapi id 15.20.6768.029; Fri, 15 Sep 2023 09:17:00 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , =?UTF-8?q?Niklas=20S=C3=B6derlund?= Subject: [PATCH v3 21/27] net/nfp: rename data field to sync with kernel driver Date: Fri, 15 Sep 2023 17:15:45 +0800 Message-Id: <20230915091551.1459606-22-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230915091551.1459606-1-chaoyong.he@corigine.com> References: <20230830021457.2064750-1-chaoyong.he@corigine.com> <20230915091551.1459606-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PH7PR10CA0017.namprd10.prod.outlook.com (2603:10b6:510:23d::10) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|CO1PR13MB4773:EE_ X-MS-Office365-Filtering-Correlation-Id: d1e217e0-fff7-4b71-844d-08dbb5cc845d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CGvdCJDF7lMH2R/V7KBFQwrFqrqleHsBi/J1bhI3mtk3+04TLr42oPHY3axi+V/9S+ePFoq4XUrUR699TBgQ54UXN+YsCTYYhXBN0eYIrdgTM49P9Z2wr3uMhRgKu5ZkG1VlI/aJ62ziV0LgDG6tObWeHz+uRd5jvsp2mToQYXEgYHBcYhRGLXRpNO3gyDfBre8iQl08KO3bXLWUbQMo0t+fNQEzOMAOwqIY3VQyv/xvFRSFjHVRAetmTdCfyYZuo0XxcwqTWpKloFvZaOf2uZsv10gCh5k5JngE3XCtel6aSb3fSjSY5IbwsqxPpm1U6vmBGXHxCWjWdA4n+J1JNtL/TZHFu0b6hSaeI/nxrkKXBNT2DwdEeVyeYnX3sQhOWniTuJwqqEPSfxNgT0OkA7qBQPdqygJbdYeei9BUDFebyVtAzsCJPYj75vZT/oNmApcpA0DKzKnxgN0V1BPZBQ9/197hN3KmFvgdFULo04jRD/A/uXDPBWIdr161K91xEiV/g/QhIpaUjgwheWACjB/HKe6OgXNVbWiHh83b5NmO71jOOu24C8/Ko5pgwv7RCuWA2SvvG8QB5vQ10V/RyrBf47n0kU/B65b+w11rNQwnfs7NOAPjtjAB1Qwga1syl9PNMNsB2tNdkI1DfH1kEbrs3eDtE0XjcSerki2qngA= 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)(39840400004)(346002)(136003)(376002)(396003)(366004)(451199024)(186009)(1800799009)(6512007)(107886003)(1076003)(2616005)(6666004)(52116002)(6506007)(6486002)(66946007)(26005)(316002)(41300700001)(66476007)(66556008)(6916009)(54906003)(5660300002)(4326008)(8676002)(38350700002)(8936002)(38100700002)(478600001)(66574015)(83380400001)(36756003)(44832011)(86362001)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QW9IVEw4KzZKNkxSc25MN1BzbENGdWR3NWpvUmUrVjZIRHVqQXVzVDFZZHdI?= =?utf-8?B?dGxMNEVtK0xlejZwTHIzMDlFaVUxWnJ5ckhSckIwNHJIYStBMmw5WFFKVmEx?= =?utf-8?B?bEk1N3Q4cGl1QUlKNEFjTFZzSkwrNVQrMmVXR2EzTHZVUHF0UXlQOGN5Tk9p?= =?utf-8?B?a3ZyR0Y2RlVBNFJGMkgrMHAremorL0tvUnEzbkZtZ3Q2akN0MEpLMmlqTlM2?= =?utf-8?B?YzJIRko0cEhRTUFEbXFsT2tTWTBjTW1wZDgwUFJNNTZrNVAzbDRTendYbWR2?= =?utf-8?B?OVQ5QUNaaHVTeUpDektEN1dXelNpZ0MwWHF3ZDBBY1Y1Smt2aU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o1dVFEaFFRdWpKbTJ5UGtHOHJ1QTk2?= =?utf-8?B?Vnc9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: d1e217e0-fff7-4b71-844d-08dbb5cc845d X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2023 09:17:00.4657 (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: wHx7hCsWbkWTguya+aPSRlDRgXKFpXLoy7rpgBWaKwpitQZs2jqu5noEWWFZelLSFyQRaoClVFZUHGXBf3PNkHt16sa6Lp6UCT+yLOQJc0g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR13MB4773 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 the data fields to sync with the logic in kernel driver. Signed-off-by: Chaoyong He Reviewed-by: Niklas Söderlund --- drivers/net/nfp/flower/nfp_flower.c | 6 +++--- drivers/net/nfp/nfp_common.h | 4 ++-- drivers/net/nfp/nfp_ethdev.c | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c index 37895e8355..24a6878149 100644 --- a/drivers/net/nfp/flower/nfp_flower.c +++ b/drivers/net/nfp/flower/nfp_flower.c @@ -224,7 +224,7 @@ nfp_flower_pf_close(struct rte_eth_dev *dev) /* Now it is safe to free all PF resources */ PMD_DRV_LOG(INFO, "Freeing PF resources"); nfp_cpp_area_free(pf_dev->ctrl_area); - nfp_cpp_area_free(pf_dev->hwqueues_area); + nfp_cpp_area_free(pf_dev->qc_area); rte_free(pf_dev->hwinfo); free(pf_dev->sym_tbl); nfp_cpp_free(pf_dev->cpp); @@ -360,8 +360,8 @@ nfp_flower_init_vnic_common(struct nfp_net_hw *hw, const char *vnic_type) start_q = nn_cfg_readl(hw, NFP_NET_CFG_START_RXQ); rx_bar_off = (uint64_t)start_q * NFP_QCP_QUEUE_ADDR_SZ; - hw->tx_bar = pf_dev->hw_queues + tx_bar_off; - hw->rx_bar = pf_dev->hw_queues + rx_bar_off; + hw->tx_bar = pf_dev->qc_bar + tx_bar_off; + hw->rx_bar = pf_dev->qc_bar + rx_bar_off; /* Set the current MTU to the maximum supported */ hw->mtu = hw->max_mtu; diff --git a/drivers/net/nfp/nfp_common.h b/drivers/net/nfp/nfp_common.h index 1ce51d44d4..86c4e10040 100644 --- a/drivers/net/nfp/nfp_common.h +++ b/drivers/net/nfp/nfp_common.h @@ -123,9 +123,9 @@ struct nfp_pf_dev { struct nfp_cpp *cpp; struct nfp_cpp_area *ctrl_area; - struct nfp_cpp_area *hwqueues_area; + struct nfp_cpp_area *qc_area; - uint8_t *hw_queues; + uint8_t *qc_bar; struct nfp_hwinfo *hwinfo; struct nfp_rtsym_table *sym_tbl; diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index 9243191de3..3f5375deb9 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -311,7 +311,7 @@ nfp_net_close(struct rte_eth_dev *dev) /* Now it is safe to free all PF resources */ PMD_INIT_LOG(INFO, "Freeing PF resources"); nfp_cpp_area_free(pf_dev->ctrl_area); - nfp_cpp_area_free(pf_dev->hwqueues_area); + nfp_cpp_area_free(pf_dev->qc_area); rte_free(pf_dev->hwinfo); free(pf_dev->sym_tbl); nfp_cpp_free(pf_dev->cpp); @@ -593,8 +593,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev) PMD_INIT_LOG(DEBUG, "tx_bar_off: 0x%" PRIx64 "", tx_bar_off); PMD_INIT_LOG(DEBUG, "rx_bar_off: 0x%" PRIx64 "", rx_bar_off); - hw->tx_bar = pf_dev->hw_queues + tx_bar_off; - hw->rx_bar = pf_dev->hw_queues + rx_bar_off; + hw->tx_bar = pf_dev->qc_bar + tx_bar_off; + hw->rx_bar = pf_dev->qc_bar + rx_bar_off; eth_dev->data->dev_private = hw; PMD_INIT_LOG(DEBUG, "ctrl_bar: %p, tx_bar: %p, rx_bar: %p", @@ -995,16 +995,16 @@ nfp_pf_init(struct rte_pci_device *pci_dev) } cpp_id = NFP_CPP_ISLAND_ID(0, NFP_CPP_ACTION_RW, 0, 0); - pf_dev->hw_queues = nfp_cpp_map_area(pf_dev->cpp, cpp_id, + pf_dev->qc_bar = nfp_cpp_map_area(pf_dev->cpp, cpp_id, addr, NFP_QCP_QUEUE_AREA_SZ, - &pf_dev->hwqueues_area); - if (pf_dev->hw_queues == NULL) { + &pf_dev->qc_area); + if (pf_dev->qc_bar == NULL) { PMD_INIT_LOG(ERR, "nfp_rtsym_map fails for net.qc"); ret = -EIO; goto pf_cleanup; } - PMD_INIT_LOG(DEBUG, "tx/rx bar address: 0x%p", pf_dev->hw_queues); + PMD_INIT_LOG(DEBUG, "qc_bar address: 0x%p", pf_dev->qc_bar); /* * PF initialization has been done at this point. Call app specific @@ -1041,7 +1041,7 @@ nfp_pf_init(struct rte_pci_device *pci_dev) return 0; hwqueues_cleanup: - nfp_cpp_area_free(pf_dev->hwqueues_area); + nfp_cpp_area_free(pf_dev->qc_area); pf_cleanup: rte_free(pf_dev); sym_tbl_cleanup: -- 2.39.1