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 2184F430EF; Thu, 24 Aug 2023 13:13:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4EF0F432DC; Thu, 24 Aug 2023 13:11:27 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2133.outbound.protection.outlook.com [40.107.93.133]) by mails.dpdk.org (Postfix) with ESMTP id 84D9F432B1 for ; Thu, 24 Aug 2023 13:11:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LjRNcPuN0tKhbXMGfq8vF3Hov1I+9ziUK+Tj5VX+FFUnznmeHhTW+fGsECAWPmbXAyBTrLKoyteJd/ffmNqe/3YnDgP7MtzSgLbcNFEd+aqBQKeHL8IbELX7BcdIHx0uiSVyQ1UPf8iQGG2mZ+lHzb/Md9S5sRtDM+bmS0EOR/w1SRx5tBgscjVFKv+sza6ls1thur7xXh4udctwey6skpD552WR/SqNlqx8AyX0rmaE8Mq4IL3GGclC/qwmuSPmiHOrgbOAjcQFKuPOCrks6v62hR5tI0/4ni+/jwsZYP/1ykSki15eGezzz6TqbQFkF2L/y24fjxt3hZlmC74SMQ== 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=jp/Anq7KS6HJ/xw9sfwqpj0h2aKJ/rewgBb9fioh/BzyVprdUcSFw1OpgTrg/YQrm3+/6cbnvkYU268kJ47+IazL5SzWgoVjuLcw0TEvsuGdk2TSkTKMbDCac/kRiAozLZPNzQr74RVo8ljS4ddxK6vmofESnPfG8YF8Qdbi4ZbBgScfjW+uYmx0dueRTWCC+mAQguo0IPrpvLYkrPBh9TbJXDcAuEZ2KlfDSfZz0MMrxrN0ApaA50FzbA4EjD+oysmwQpxpEOge0wBlu/In+/trMZGEkSCKzPl2kt69HnntRgNqQDZ4l/C+QI2O9Ou5DU6gKV6sIrhj/bD6VOT/eg== 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=I9Kd2lr7sVCz7sc+Op8UdyMSmz88oRWCeQVDgAL5fUxtiC01m4km5QIlvfWzTCHkGqjuk0ZuqfU0xSUIabh//m+ZMv90Ei75xq5fuOFFrksVYWkhQ4+GVbz9TgbyRgiEzA1HGO7w2alx/HuMEGtGCUZrv4ZBk6hMQqDkwfeOQss= 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 PH7PR13MB6116.namprd13.prod.outlook.com (2603:10b6:510:2b7::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.20; Thu, 24 Aug 2023 11:11:24 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::51fe:5846:af8b:bace]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::51fe:5846:af8b:bace%3]) with mapi id 15.20.6699.020; Thu, 24 Aug 2023 11:11:24 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He Subject: [PATCH 21/27] net/nfp: rename data field to sync with kernel driver Date: Thu, 24 Aug 2023 19:09:50 +0800 Message-Id: <20230824110956.1943559-22-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230824110956.1943559-1-chaoyong.he@corigine.com> References: <20230824110956.1943559-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SJ0PR05CA0005.namprd05.prod.outlook.com (2603:10b6:a03:33b::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_|PH7PR13MB6116:EE_ X-MS-Office365-Filtering-Correlation-Id: 6547b89e-235e-455d-00ee-08dba492da47 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZWKnENNN+siNnuEOTscO7Vm8MnOE5Y78E6rhOyhUkF383LA/hQXnCawcZkpEk7pgGOjr/9aqpmFx1+TVfgcVY5u9WDDmQah5BmcXM7OToQAdgL6W24Gg0p+K1SDXUsFYfgPlGTMD03AQPGgc4j7mN1obQB5BqSicxdESySmTWaTBsl8ye0IyoLjFmgoXeQb0kHOtD65BOF0zjON5TmyWp8QdgTsrtF+26B/hhmxPXRXAZpeeRaEdw4oTyDgy4rZ5Z6GjY/QOBudvwmTuWjKVuzwkwQPPMkSnw4PuTCoZAx+wKNM276hHgFAriFks/0NUPHLKfn+IoCEUZpHiodeO9viSo/g/GKGTCEFzTZ8wvYq3PtddOYAf6TavfKR7AqXUy09NoYo9onpjdkevenZ82F+T3Vpuk3pxArj0DF6zq58hHkL1YlwHc+LEybHx5E6tOHQXwXROdCy8I7y+5IxFBGXLMDl1HAJytQsUf3diFyRglto3Du8KEac45tjM7fAf0qv7uzLXuxqpGWqcfVX5jBSvD5WDcZ6UNFJ2aTwZzG7ZEohVfp3TYWsJDbbA9lObDdz8YF9cNfnmMqrOecIws6AmXCEqvi2Qdzp7EHxO3xkHexFcQBddIMRFc3rODstMBM4hd6j2IpJkXf1NAvwfkXa3lQje9K2gI8PZuvOTOHlE36DtmZsmrSY61EE2FyzwU/zexvDsHFDofW1ojnYsRQ== 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)(39830400003)(346002)(396003)(136003)(376002)(1800799009)(186009)(451199024)(6506007)(26005)(1076003)(2616005)(107886003)(52116002)(12101799020)(6512007)(66574015)(6486002)(83380400001)(38100700002)(8676002)(8936002)(36756003)(316002)(4326008)(41300700001)(2906002)(86362001)(5660300002)(44832011)(38350700002)(6666004)(6916009)(478600001)(66476007)(66946007)(66556008); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TmJzRHkvdVM3OFNya3ppZ3o2SEtpdmVsL2tjMnFzcUdMSTlLK2FDc3dDZTZN?= =?utf-8?B?S2I5YmR6U1F0RHBOczZCOWlHN2luT1ZDZFBzWmdza3NyK1k4bnZkS0VvWGtI?= =?utf-8?B?SlA5bGRmNUpraU95bDFDVnBibkRwYnE1NWZWajVYNHdrZFI3L2xxaDRKY3FT?= =?utf-8?B?VW92eTlqZm5rNTRpcTJRM3UwK0YrOVh5enRNOTg0dUZqYmhqNlVoR2xYZE5j?= =?utf-8?B?bHpXdFlaZkd6c0tsUVNRWVVuS2MwL25WbE5TKzRmOUtFZDQ5ZWEva1JJdi9n?= =?utf-8?B?WG45TGVHeGtQaThzY2J2NE9NL2NMVmVUZ1ZENUc4MHQ0Z3k4QTg0N0cwSm5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05TDNOUFUrOXQ1VGF5VUJLVXpvTlJn?= =?utf-8?B?dFE9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6547b89e-235e-455d-00ee-08dba492da47 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2023 11:11:24.0640 (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: 2Rwuw1jt9D8Rs06k3SWZSkxaZUvv4TV5BFp2BYREa2Y0qvyjVN0f14doWJhnXcplKCm0puLTVaOkAnXTxhfBNFz/tbwn0eSjlm8f39I5h1o= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR13MB6116 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