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 E61B942600; Tue, 19 Sep 2023 11:57:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E7E2440EDC; Tue, 19 Sep 2023 11:55:59 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2132.outbound.protection.outlook.com [40.107.243.132]) by mails.dpdk.org (Postfix) with ESMTP id 90E5140E68 for ; Tue, 19 Sep 2023 11:55:54 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FIiS4Q4GSthZLdWtuiQT2kPRRi1AYMiwqz3HAUoFExOj2gKq3HPgJmwY1sP8qNHA8H6OLCQrH80hOxrUFHO0o1dVKqP9mlK1p4I1L5OKAm2+XFDF43rclu5FfdSsmZljJ8lFtGMRtDcWbX63QGBYnrfAfn2A+cTUNR+rGWD6qi23CoV6vO+j6p7MRlVPDPJuiXfz1ozaVmt63ZLxEpMFp2t3x9EzC7lZYn9tl7pLDmxTmLke2z0DWer9ESx57vZ2TkprtWYnVPuiVLmqdeZFHOzy0PZHCpByUg59whqmSlr3I2rN4WfLlfMPuknxuU3f5SeFNOGTqcb09SSlnqPrtA== 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=v/eTxtoUG0oHUmRiirfkE0AitwfrH8EautNNlmCSLGU=; b=igLqOKHPEPAvFrXN68K+QrW4GQaNJAH8ZTNs2pTPQ5Pzto2R/tIwxkOUMXgH2Ec69LkMIKJuvE4St4gdacaFpt1XkoO5bTw4MO4dleIINLwmXdypBS6gwUZLUFd3C9XLE1y7xkCK2koP7mgQgSSb3ZSge+6HAHmzZZ5zEcrhwdDGc+TxZfmfOU9hX/7XHkce1BvThlf+7laFLzbYxm038QseNs2mMcDICeKsEadKdtto1mItksZYkBHvCWtT7GhnGzjGZyhdrhqaQo3FJFG0bWjEE0Cwqrl2f4UtzQAJCfyMzXMbOjicA1yhW7XD61N8iFj7lN4lZ8g2aVrd9V05Xw== 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=v/eTxtoUG0oHUmRiirfkE0AitwfrH8EautNNlmCSLGU=; b=Rcb/TJOxZpHF60Az28b/acWepc6ZRW/QUl4UQ2SOm/6TkhagR2v05DObcdxmlT/6IPiRGDP1o7YNaAqKKeGfzNj6wYK5/QM6upFWs6Ke8656AQnNbWgEqHT2eJ5rgMIvjjKhrFWSLGFgTmpTNQgaPdK0IgWD1R4eSL8JKYxP4EM= 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 MW5PR13MB5877.namprd13.prod.outlook.com (2603:10b6:303:1c7::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.28; Tue, 19 Sep 2023 09:55:52 +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; Tue, 19 Sep 2023 09:55:52 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He Subject: [PATCH v5 20/26] net/nfp: rename data field to sync with kernel driver Date: Tue, 19 Sep 2023 17:54:34 +0800 Message-Id: <20230919095440.45445-21-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230919095440.45445-1-chaoyong.he@corigine.com> References: <20230918024612.1600536-1-chaoyong.he@corigine.com> <20230919095440.45445-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BY5PR04CA0014.namprd04.prod.outlook.com (2603:10b6:a03:1d0::24) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|MW5PR13MB5877:EE_ X-MS-Office365-Filtering-Correlation-Id: ad628aaf-0028-47da-a04c-08dbb8f69c02 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kNLxRpb3QOpRnr40+Jqn6IdnVIkZwURVjnwQvt6zB+HfEiE1/B0Md7pNxaj4E0VX3JfmnaDVdWqE2cwqX7FueLEL1WMOAzh2n1yKWNdEpZ7D8T+Am271o99olQu2XeOOGLOmkX6yj3wkgNCJFmKLl/3w96SwptalRXq5fU3bGR+hxG3L9HxbH9Q3FjOlGyq8uLhLCSe/iMrDxedyJrd42XyrtZZcwstqp+R5zWIVS90Fk29W/wVIz7fiNAzAyIeQWprSU8Np7CpREDp0oY/omAeGl7prrE5ju4+89ZTPbZ7fakAVaAPqeo6ffv82rTCr/YAj2FyJ+u5p2CAGfPozthYsmLvW1S3H0ItZwj0Jnh6vyRmIe1SwxJCT0EPaYVsYOIrkH0kPDYW82iv7NWhYJR6aiQ/63fx65ozXKB8xfBwal1P/80VlWfTGdxzw4UUHeJAA4ueUblg0auKeJiZuINAzmTexsQCEV4j/8He3QRmBSspi4D5eMocbtT8p1shdKDFqxDGtUJjTdDmWhGgTefDViBWbjTixgJmMWBf8NdiNjxsWvndt77VrxcTCtOPaAEMaaknUEtr0K7bB0lnmPwA5ud5oSbDP+UuVVXKdh4auAL2gcHd7gATfnzYaYRw6QuFQN5kp7RwLQlO+naDxq+a04A5KUphHIpkxwMBu7KQ= 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)(346002)(136003)(396003)(39840400004)(366004)(376002)(186009)(451199024)(1800799009)(6506007)(6486002)(6666004)(52116002)(86362001)(36756003)(38350700002)(38100700002)(2616005)(1076003)(107886003)(26005)(2906002)(6512007)(478600001)(83380400001)(8676002)(5660300002)(4326008)(41300700001)(8936002)(44832011)(66946007)(66556008)(66476007)(6916009)(316002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Wbjz75Ora3UkDLcvtkyRRsJN0H+HPirclLY5xlXcCwAjsaYA3sQ6Ep8wIvHr?= =?us-ascii?Q?zwqXCVTATWsENhWiRCEZSkZNY2KaLNVpBMxlDzV8/9ny+KgfPccPZSopvuJD?= =?us-ascii?Q?Nc5QAhKxe64sD1O4pxRAWgJCjhZMmNCjyNYcpI0dbIO2T6oSEsPCFTsCQgf9?= =?us-ascii?Q?z1h4RNI1MjgMUVRcFcB5xZLJnp9l478FBwgvjXF7sQ2HAfXnHqrXshZJp7Eb?= =?us-ascii?Q?rfDhTZPvL8WFSyTTYaRIQZ7gyDkk+iaQljwXAzyhrgIb+P2TNbQz18TteGF0?= =?us-ascii?Q?SRSRJ3ZPYT5eu61nwBHhwOnsV5/IZjPclgadgoTZ6eoSBNa5C/d91lU9r81o?= =?us-ascii?Q?YFTAf8OmB+akor0hsJNxUtFdEKtbj9lIB1de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gwyFWrTCtrnuZmP+/a4+k6tNmXV36N7VqKRvGzuNpRJbJN4xW?= =?us-ascii?Q?Kux8No16vEZ/0tOjbs0AGSdU1pdT8sLAWG4x3/rgueedCLu6a8T1INE98naN?= =?us-ascii?Q?qiW/Yf0bjiHb+c7YMYz6kbt5EXKEOluuUQ1QourZgaUHH3UXo0IvljONSgJa?= =?us-ascii?Q?ui+XCxtNJnKiOb0EbjgDajTsLgQKctNfvrnG3GPHD/vnrwVKjHqoCk2ty9u4?= =?us-ascii?Q?S2+hMrwuouLcdbPWlMuC7I1aRykXz++99rENvEuqx4RnaBNHHD4aJpCBaAGS?= =?us-ascii?Q?Yw2yfZYbWDBkPP0W0J67S+oQCroCFUhndGByRWFlF6wVM4mkjXhHZZ++44d3?= =?us-ascii?Q?mw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad628aaf-0028-47da-a04c-08dbb8f69c02 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2023 09:55:52.4694 (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: 3Ys46NfdnLhPreRc4ST2GqS9SmxuPsTAzhiq+/DYez+1iOoU0pqbFwVY/UNszd5rhAZyquVHe8sdPVM7DMNjunr78PJUN+fZfiO8NDxGVI0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR13MB5877 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 --- 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