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 35D37425C9; Mon, 18 Sep 2023 04:49:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B3B0941156; Mon, 18 Sep 2023 04:47:51 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2105.outbound.protection.outlook.com [40.107.220.105]) by mails.dpdk.org (Postfix) with ESMTP id EE4E5427DD for ; Mon, 18 Sep 2023 04:47:48 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cfzOBIw9NOidY43z24izGXW48favynzN1auYxvF8Wu/RM1QjPvAOMRCDlRF+e4eXlgNb2i9IRADpLCRRy3qbmzT2QPI/Rrj4mTDtDnNO1vnd4EOIGSaxLoT2UMv/0v1FFqUBLFz0MmuR3CwjJ/ny3FOzRQKTvpyQ6AEJDtORtVTy1g9GndyP5AZB3JcbFnZ/EwelljwLJyqod79dFJB9/KqZOnLsNmKAS3DSefSwbmGTCuLrQ4q3aDAJ/rq4oWzknCI20uoR0TFcac35HrL4uQziGvK1McaQhEMCfueKJSav6dsgnWg5R5vunkmEKPEWoMV+iL5KUETLOH3wnR0big== 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=PGnk6Tj2fy1NsskDOgSrIbIalt/fW3tCIfP4SZLueDI=; b=Dx44cJp3Ku94gmINGvIlbVUwS++WDg8Yy3uQs91A1RVX1iO3TFwCDDYQ0N0rdrfQOZjc+1jD7gSe6UZVLsDdh/crBltDjy/VUnXJiy/vFNqT9Sqe0rzkCVuRqb8p2m0qc9y5vQ6maJSUWEBEBMs30Ox4p0Q8JWKDNoPtAbSbXhq5qwKds00KAWB9VMuc8gufH/WycFxAnjug5Y86LrnX9yyBQtfhQ2eQ3LPjJJTtVieSfc/+EbORlTawkg9YCWZ0BiZY8IU/60lZhfchaWzVushOZu8q1kj9DPotRfQS7bKpMo7iPFspxcX3apvbwzaqt+vy8rEE9g+jsiYv2GPRYg== 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=PGnk6Tj2fy1NsskDOgSrIbIalt/fW3tCIfP4SZLueDI=; b=QFl1Eoo9en42YnZvf96aNQKtgyIb9+jkaPfDwIokPJlMlBtkNxhgGshuFgnmNvgLMs686ZgeXvBoO94b2xD+rB+Sjl5IiPkxM/OnTVPhe1dygZ6qQEbEQ5ZZgEt3ktGEjeAmeFF0Fxms5utqT02VxvbN27Dg3akBEmUBaa//Xc4= 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 BL0PR13MB4401.namprd13.prod.outlook.com (2603:10b6:208:1c3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.24; Mon, 18 Sep 2023 02:47:46 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7a1c:2887:348a:84bd]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::7a1c:2887:348a:84bd%6]) with mapi id 15.20.6792.026; Mon, 18 Sep 2023 02:47:46 +0000 From: Chaoyong He To: dev@dpdk.org Cc: Chaoyong He , =?UTF-8?q?Niklas=20S=C3=B6derlund?= Subject: [PATCH v4 20/26] net/nfp: rename data field to sync with kernel driver Date: Mon, 18 Sep 2023 10:46:06 +0800 Message-Id: <20230918024612.1600536-21-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230918024612.1600536-1-chaoyong.he@corigine.com> References: <20230915091551.1459606-1-chaoyong.he@corigine.com> <20230918024612.1600536-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SE2P216CA0016.KORP216.PROD.OUTLOOK.COM (2603:1096:101:114::20) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|BL0PR13MB4401:EE_ X-MS-Office365-Filtering-Correlation-Id: 05acf066-60fe-43e8-f8c5-08dbb7f1a34d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Dr8SndlhiaBb5R5bdOev0moKsgvVR0LjHuCDf+1Vxh+17r4IMfiuwE2WwHFtnKF9xPIylSS7Aq2neLk4Q8rGVITbaujBqkJTDqgiuzswLqCI/kBW99qMGzkpP6EbjnxoCwPu6KiwhRXgu4Rq70yEcVdOA5CHFaDsZMS4YYLHLvLqE6Kf4noS+zrSWwec8fMmO/AVAm4aC43eaXrxhKJMvbixNKKCgRzlZ2lL+lfAsJy3TRn2qSeZXq92LHz9TFBhVU5cZM5M+rMQqSPAE77H0SUevMehQ/ytx/2rPaGjXMB8+uTgLvla+Q7RqXvNL62Cqic6n4xZea809H/uGg8fmQwk6B9WAPDNUeV0kjMxTYcZdhkeg6MZsQDRKeC0cjdDMSoUWc6iSyajNS/lqSBgtYpp0gVcKaWGD+b4pw2YbaOOUH/i9O2g41fxzSjp9MN9JZgrBJoMETlgX2GN4vnuPmgV8hMS7kNbgQFtzVQuD8zzEuNBkGzT1g1zeFp7WwYcxH/92Z1xqfZCBqOCz8WBI92kGxPvYXv5UuqbB9puEBtDw4c2UjsiHJ4kAMM/2EpzYxxDsuUTv7LoUXyGLYhWvFRJlbWCksxaTd4ED8ELONL4dr4ldQwF7zfe8MckoIaM3MMKnkSzBLJ4IWR36O9rrm1m74rrUOQ3vehuDbyjzgs= 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)(136003)(376002)(346002)(39830400003)(396003)(186009)(1800799009)(451199024)(5660300002)(26005)(107886003)(1076003)(8936002)(4326008)(8676002)(2616005)(2906002)(86362001)(38350700002)(38100700002)(36756003)(83380400001)(66574015)(44832011)(66946007)(6506007)(6486002)(52116002)(66476007)(66556008)(54906003)(6666004)(478600001)(6512007)(41300700001)(316002)(6916009); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eWI2ajhlUWpBWG93bDNNREtzeGNrUWg0a2VPdHZMcXBNOUZLQXIraExBTkhF?= =?utf-8?B?cWdHMm9VbjdWaFpjT3VzVStJK2tOckwzM2JSWEFSVmcvR0RXOE5xN3IyNHI4?= =?utf-8?B?MXhVczJHMThSRjhYS0t0MWxGVU41WFdsWWJDRUxaMXlucmVGUW0rc29NVmo0?= =?utf-8?B?REsxN2dPWVRkbnpUbDBMVXVJcFJSYU80V1Nmc01hNGUxN05vU2pRYW10Y1Fm?= =?utf-8?B?c1ZpQ3hzMWVVaEw2SVdBM1NjWjNESmR1bjVmaE0yRVEzU0U2MDI2SUlXa2NP?= =?utf-8?B?emtUSHNZVy9hRFRRTGk3S0ZPeW81UGQzS1JPaFdHblExYnY1MmZJQWRvbVQ3?= =?utf-8?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d0k5ZzB4NDVV?= =?utf-8?B?K1E9PQ==?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 05acf066-60fe-43e8-f8c5-08dbb7f1a34d X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2023 02:47:45.9576 (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: v4xfxnri/kqj53W5sQVhaekIDYZtnIN/SZaku2N1kzqs5oa9YQYi8Fiql666aWn8K8S29+TZuR25Lpv07kPgdY3KfsOfZwntW+Sye47ngo4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR13MB4401 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 77dab864f3..fead917599 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); 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 efb47c5d56..899d4dd253 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); 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