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 CC03341FC8; Wed, 30 Aug 2023 04:18:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7E7B740C35; Wed, 30 Aug 2023 04:16:08 +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 2F9094064C for ; Wed, 30 Aug 2023 04:16:06 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IgRsXikv9KwKTtySfLR4jAGmbeMz/M57EBAhS6vsEZOYuFILlEHaQxjwOXHJdCtfF8hj7OpSpkP9djID6Ec7EJctmgw6tfqjqQ15IJABcimLgycj6UhxByi9tPwytHSQ/HbxC2O+JNtWAeqX+RrmxJKZnhSg3+JsSeeXFxxKfS8aZyru+PEHGVtXeoKXTRP8kySwZHwGKbTU5fBlznz0kHsBxNdbaiTDDggu+D6Ry+whDQaAKY16ycNaVnRc2gnyn8R6ecUQyGJiBNFPR6PLndHdF+B1tnJzT2Z7+RDF4d8ioOp1go3Mv519E6ScGcmZ/lz5d2GRZACzwozvT76MrA== 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=NYip4S1w0uB6ZmLBQQlSl+fOQmZoUg+g6qClZFHT/Tb1DkfhbL3d5trbl6jraQbbo/wAkn/x4RAPDme+FRxRW8Q2g/m6IvOk3LgHxgSfZUqc9vADVS+GWrpyRUdTIBGvcbNE4rTkgMyRIdVuCUTif9Ry0R02Rv4wvn/FMpYP0zkOP94wdaxsR81+gt2QVYiLo1ZHakyQA53KupcPOrqzHH8wwKJp8RZQgSMzyhJzgM83Cp4I4B5VxY2Kwp45fik0GWYlZ536R2p3rP9k91ygM+oTnH0ETjGMIIUxePc9aNa96ROqYRxOnOd9PVsKhG8qi+farazPEPvswk6XzRZiEg== 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=IcBzfPmu0novySNHR6uxdGZzyCnXnCrr7UE5BK6OUeYDIKFy09Y7UqQOkVW4C8HkAOEX10loahaHsnLl1z84X9PxsR3Bw6sIIcWSxTOLWl2g8D4JhN96hu2yTP46yXotcxLY4eJVPByPGsnEt5KiwZ9QAixq5wQGsZNighzkv64= 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 DM6PR13MB3786.namprd13.prod.outlook.com (2603:10b6:5:229::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.18; Wed, 30 Aug 2023 02:16:04 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::c0f3:c2cc:b5bb:4192]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::c0f3:c2cc:b5bb:4192%4]) with mapi id 15.20.6699.034; Wed, 30 Aug 2023 02:16:04 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He Subject: [PATCH v2 21/27] net/nfp: rename data field to sync with kernel driver Date: Wed, 30 Aug 2023 10:14:51 +0800 Message-Id: <20230830021457.2064750-22-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230830021457.2064750-1-chaoyong.he@corigine.com> References: <20230824110956.1943559-1-chaoyong.he@corigine.com> <20230830021457.2064750-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: PH0PR07CA0113.namprd07.prod.outlook.com (2603:10b6:510:4::28) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|DM6PR13MB3786:EE_ X-MS-Office365-Filtering-Correlation-Id: c62dae21-a677-4c74-7473-08dba8ff100c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hN1WYJiGp8Ul9WZn/40v9HxA2hzgkwkr+hCdFSnT+pN5GcZWagsYljKJWDqBJnlijwZnyz2tbTmkGq60wKk9nwCC7jtRiEeJyAAtHKojZtmTOvUsVs34FRzzwtxl+l1M3+KWFRFGDJJSVNQDoxBbHsu4jlgqqIpLIHRDtyOjt3qWE5e6jTGHAznUd5VYL4G14MRWGfHO0DXh2VMq7dJ9It0b4TVJKrqZynf4pDecBboAMWjn5T7PmopMSLMUXqoEnzDqFeYTl6CSn+mmefxjwh1o3iuO27Ed6YrlHLVQd65zP3cS6OuP7nDf99WJ1Sn5DAyp7IeVUcpnIzuDTs78e2iAmrDj6nbq8dotC3kStyBYv5WwmHxJk2yvI8UhGWU7sB1VxlRIjU7NtueutFXwcaRq8C9leWPkZPxOx1nNg/hP8ibcwkAy1yObeZaq7+Jnvx7+ue5KxlmOlw2EYn9tOyF2RcJLyoxCG2xFdg70sXMyJH6PSVDsALmm/HX+OucsBc6llUL81Fa1Ck0cqP0l6TnCh5AOq/FbPPKAix9IPIhCJqkjhYQc87IA9ROZ+ff27Ldq/d0av7TumI5cXV3nKhcht06mMRFwdUgLeNjGnOc4g0GZ887ePRD38EewXtTPJZ2/gES6GEF38zam//stBkdVJPCCVpIPE2MxWTyR1Dw= 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)(136003)(366004)(376002)(346002)(396003)(39830400003)(451199024)(186009)(1800799009)(6512007)(6916009)(316002)(38100700002)(41300700001)(38350700002)(2906002)(4326008)(66574015)(83380400001)(2616005)(86362001)(44832011)(26005)(36756003)(1076003)(8676002)(5660300002)(107886003)(8936002)(6666004)(6506007)(6486002)(66556008)(66946007)(66476007)(52116002)(478600001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZEo3VmFVY09OZ0tUbjRQMXl5dVFxVWJsTlBhOGpqY3RSK0MvS283ZjQvb2xl?= =?utf-8?B?OTc2TERRcWgxS25pTFhDeituajRFdzZUeE81T2ROY1R4UVVSNGE5RWQyQ1hI?= =?utf-8?B?TGRMK3NsWWFMQlROL0RGWC82S214SS8yTkZNRVlEbEtva1ZqR3lkZFd5dEox?= =?utf-8?B?eUpuelhvd282dkUwTFcxRU5QR0orRXN1dHBSN0RoVjJwWDkrZHhmRWdsYmUz?= =?utf-8?B?YnVUdFNuQytDRFROUHZNSjJFMkkrY3JXaGM4UG9kQ1lsWkViM2t1K1NMeUFu?= =?utf-8?B?TDZkQ3BISmpxQkFCK1ZmUWRDWlZ1ZXRRdkxMR2hwamdhZUw2MlVxaEwrRmtP?= =?utf-8?B?WnpzQW81cHovVGZwVUp6NF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-8?B?Q2c9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: c62dae21-a677-4c74-7473-08dba8ff100c X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Aug 2023 02:16:04.5938 (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: TfMNV9uDU+u/2iMyPk89YTtd7owxS1UBgn5iBL7/l1Kd1MS4jAOz8qDa7icGdK4Byt6Xl1knCcHlaJt2yUGQJG5JTlePpSYurqBVlxPiKv4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB3786 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