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 353B942910; Mon, 10 Apr 2023 13:00:59 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7A855410D7; Mon, 10 Apr 2023 13:00:54 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2108.outbound.protection.outlook.com [40.107.243.108]) by mails.dpdk.org (Postfix) with ESMTP id DD24F40F17 for ; Mon, 10 Apr 2023 13:00:51 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nHHa+XIJU2mNBuiJ6oD4gw75doJKowP+Ca2UNSkaYOLE0K2LP/PD2z3SXedEqqO7laVobMICaOvnKMX8aBH5iPNwtVLo51/s6Va0FwwlJi2ZX+I9ekVan+tRBNoNYbtz+NRFlM2O4jvMCDGWOlL9qhawG5fU4u6ALORRXjV/2ijdLjOTlytVl3voJRqp+APKciI9O3AXjxrzUSfs5lzDCIljtKkRvwL/R56INjUIS2jg9Extq0EdZWjTTuO8obBUrTQ4SZxOS5nwZgQPLP87N4kErCqSF7Z3bCmAu5JS4aQCRvWiQ58Cr49sQn2VBscXQlPxOdArdRV2idYXwj5QGg== 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=76AcAATyLoObvKsjlhn2AjCfUhMtLvatH1YQ2UUS/Bo=; b=l/20RTD3KkhHWwKN115zmehc7/j84dn4/3TjUUIsDBTV+VuoevVZFhYuhmbDSG7y79+lETnh/BoiojUcrxunISTKmdfCcUP2eUPDA2YCnWHVLQ4I4lKzDxGAPT9+OH166wg+ke65RbLIxaRw9dN6k+Ytg/5pMwkrSkSXuX9TLZruGf5Ou6dDQ+v4YtrhCKMWOgQTThcO9J2f0cSO+UdGKxJiiaCNUm45vEtx00PyxhvWTZfAN/ErOAIe+aYG5h3v6M++n5TvJ2l6yuYbgKfQ2wzS+rYxuieWuwYALU2BDd81hKixVIqWpNqZxoT4odMQgDy9ckULW2iwCvfFbRfgbw== 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=76AcAATyLoObvKsjlhn2AjCfUhMtLvatH1YQ2UUS/Bo=; b=b5NWTjgGKwgawioeUxqkcYq0IhEJyOHDbiQ9Ky2a2q3OiUakuP88zETSCZlIFnsHEtNKWlEdVbfjWIx1jHMcbe5759+o2TBnOFy9QgplDtSrqoRPFGOV+j+TFJj3xE26Zul0jv3G0oU/ygrZzSv8INBdnC2haAeIyLHv6UdvNgI= 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 DM6PR13MB3882.namprd13.prod.outlook.com (2603:10b6:5:22a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.31; Mon, 10 Apr 2023 11:00:50 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::baa6:b49:d2f4:c60e]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::baa6:b49:d2f4:c60e%4]) with mapi id 15.20.6277.036; Mon, 10 Apr 2023 11:00:50 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He Subject: [PATCH 01/13] net/nfp: define correct size for configuration BAR Date: Mon, 10 Apr 2023 19:00:03 +0800 Message-Id: <20230410110015.2973660-2-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230410110015.2973660-1-chaoyong.he@corigine.com> References: <20230410110015.2973660-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2PR01CA0040.apcprd01.prod.exchangelabs.com (2603:1096:4:193::14) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|DM6PR13MB3882:EE_ X-MS-Office365-Filtering-Correlation-Id: ffb810a5-4212-45c7-3791-08db39b2d84a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dNDp0KsQRvI1eODxJIVZWXAtlmEd6Ex48Fwv3fgBJz8kng5x2PQT5QXAX7Y0wfmhh6xo8QXgYuFZjpkN08QyJSX+FFdHPl/ze59NMxgrdfAcasMa1y638PIp1NQuBzQmBL5DvhwBYAASaicPnNhJ6AaqotZpAF71Mln9LYPRzVism0RbADFQpGwILW6I7hjjs5GvIflosR51RDbqGl80I2sD7e96UInRXpAawSBRxCcy6tnyWY7aE5/PY7iHsBBcycMf0kV0gK9lNik1z/+PTLmOtYDEHko5YSXfhXaSi7TPy+wW7cy6eC2I8FkCcYCc741cRWl/timRlIZUzoFnHQk87cLAGsacFDcEKwqt8D3Q6xaAZe7IJ00CRcrRXNYA4bFObCKsQdb0zzb06cXCYIyK7C5kedWjAhNPij5gn4tG8JKRMXTML8NrcWJ14U5K7b6Qns2U67rUN2rWAD0n9aMUrsLmw4J/ocjPbgJzwE6XsIVxNDxfedyD6eVxq8U1s4Z54ae3QRfZWlEENeqV1n6h6GC3o3X6MRSJctO6BBvhdgzjkUcqzJyM6RMhoPv56IetW2N7PryrySciZqxaHY3jn0fpCH+ze168TtIHcIww2jy8D+2Vz+1RtBalM/jD 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:(13230028)(4636009)(396003)(39840400004)(366004)(376002)(136003)(346002)(451199021)(316002)(86362001)(66556008)(66476007)(478600001)(83380400001)(66946007)(38100700002)(38350700002)(36756003)(186003)(6512007)(4326008)(8676002)(2616005)(6916009)(41300700001)(2906002)(1076003)(6506007)(26005)(107886003)(8936002)(52116002)(6666004)(5660300002)(6486002)(44832011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NXNQYithQy9QSFBJNTRoVTNOdkV2VlRJYTh4citwUW82R0dpT0tseEMzeG45?= =?utf-8?B?WHV2TWxYUUJ4aU8xS0Z2ZG9nY3dHV1g0UW1FZzVnQzlZSXBTUmdLTi9XRzRn?= =?utf-8?B?dXdhUU5iM2FsV3BkZlZkK2VnQ01mMDlPRmNiUXlINC9SbG01VkNuWU9xYXZ2?= =?utf-8?B?eVVNUFZmVUM2bVJWekR4MXVvWEtMOElMK1ZmQ3o2eFVUbGRvb3c3dFNxdWor?= =?utf-8?B?VDA2ZWtsSFdhQjFaRXdzeDE5L3hLdFQ5cTE4aGhNOU40bWt2ZkRCNXNBajR6?= =?utf-8?B?TTNXQzZNY0NrVTRjYnFTSTQ3anlLQm9XdEp1T0hpSU1lUlo1bDF0S0RuT3l0?= =?utf-8?B?MlZKQ2szT2tFcUVLRlAyRnRsc3lhaHVic05LYVpKeEsrOHNMWmVQSXlWRUNy?= =?utf-8?B?YmRsOEVBWmdiOFBKNjl5NitvTEFraTlCTlVSS0VyO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08db39b2d84a X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2023 11:00:50.1880 (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: 882ne6xf8VYOBpIDVuTyjSMuq7vyJ4xVK33igpR03YjbRZWJTTWN3nOyoA3f02Zb6p7CX0N46U60V4gyOngx2IgAehpPljwT4sxEJBZzUp8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB3882 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 For NFP6000, the size of configuration BAR is always 32kB. Remove the out of date value of macro and replace the hard code value with this constant macro. Signed-off-by: Chaoyong He Reviewed-by: Niklas Söderlund --- drivers/net/nfp/flower/nfp_flower.c | 4 ++-- drivers/net/nfp/nfp_ctrl.h | 7 +------ drivers/net/nfp/nfp_ethdev.c | 3 ++- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c index 6f197396a4..4af1900bde 100644 --- a/drivers/net/nfp/flower/nfp_flower.c +++ b/drivers/net/nfp/flower/nfp_flower.c @@ -1108,7 +1108,7 @@ nfp_init_app_fw_flower(struct nfp_pf_dev *pf_dev) /* Map the PF ctrl bar */ pf_dev->ctrl_bar = nfp_rtsym_map(pf_dev->sym_tbl, "_pf0_net_bar0", - 32768, &pf_dev->ctrl_area); + NFP_NET_CFG_BAR_SZ, &pf_dev->ctrl_area); if (pf_dev->ctrl_bar == NULL) { PMD_INIT_LOG(ERR, "Cloud not map the PF vNIC ctrl bar"); ret = -ENODEV; @@ -1145,7 +1145,7 @@ nfp_init_app_fw_flower(struct nfp_pf_dev *pf_dev) /* Map the ctrl vNIC ctrl bar */ ctrl_hw->ctrl_bar = nfp_rtsym_map(pf_dev->sym_tbl, "_pf0_net_ctrl_bar", - 32768, &ctrl_hw->ctrl_area); + NFP_NET_CFG_BAR_SZ, &ctrl_hw->ctrl_area); if (ctrl_hw->ctrl_bar == NULL) { PMD_INIT_LOG(ERR, "Cloud not map the ctrl vNIC ctrl bar"); ret = -ENODEV; diff --git a/drivers/net/nfp/nfp_ctrl.h b/drivers/net/nfp/nfp_ctrl.h index bcaac1f32a..c5961bdfcf 100644 --- a/drivers/net/nfp/nfp_ctrl.h +++ b/drivers/net/nfp/nfp_ctrl.h @@ -14,14 +14,9 @@ /* * Configuration BAR size. * - * The configuration BAR is 8K in size, but on the NFP6000, due to - * THB-350, 32k needs to be reserved. + * On the NFP6000, due to THB-350, the configuration BAR is 32K in size. */ -#ifdef __NFP_IS_6000 #define NFP_NET_CFG_BAR_SZ (32 * 1024) -#else -#define NFP_NET_CFG_BAR_SZ (8 * 1024) -#endif /* Offset in Freelist buffer where packet starts on RX */ #define NFP_NET_RX_OFFSET 32 diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index 56fb8e8c73..26cf9cd01c 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -827,7 +827,8 @@ nfp_init_app_fw_nic(struct nfp_pf_dev *pf_dev) /* Map the symbol table */ pf_dev->ctrl_bar = nfp_rtsym_map(pf_dev->sym_tbl, "_pf0_net_bar0", - app_fw_nic->total_phyports * 32768, &pf_dev->ctrl_area); + app_fw_nic->total_phyports * NFP_NET_CFG_BAR_SZ, + &pf_dev->ctrl_area); if (pf_dev->ctrl_bar == NULL) { PMD_INIT_LOG(ERR, "nfp_rtsym_map fails for _pf0_net_ctrl_bar"); ret = -EIO; -- 2.39.1