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 49FD142C69; Fri, 9 Jun 2023 08:01:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A98F241153; Fri, 9 Jun 2023 08:01:31 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2100.outbound.protection.outlook.com [40.107.236.100]) by mails.dpdk.org (Postfix) with ESMTP id 13A6540EDB; Fri, 9 Jun 2023 08:01:28 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SBL9DPTIXSN2gfTufYekJoSXjRrdQzOyn80LZ3RLgQ/Yb3JtggKshOIxCYhVOgTcvPjekpYFiOAt/pGoRcig/y3TQfk/3LLnGlup9LhFCqw4NGg4PwV+p57dZP3F4RqXC5tH40KEI3JIk7PDe5lcsIQkchBM/5yg0ZQndRV4+kGGoqPLI+ATk6KwXKsxdI1GT4XwzyWEVzcEnR15+ho6RnVM4nE/5gJRK9k89eAHM55YWHfQC+tavYTeN6lTvuNtFCNOCmJF+qQDZx783KTVTHMT/qYP5p6/6NXpQkSzcuNmgod7BDGLKxvtE16MkOg8DL4e78EgO7yf8KOGQizy3g== 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=HCaOtTtT0hTnlGkIBAhqFT31hzzAs4KwZ5bdHw+1dS0=; b=PPrwAVnaGUftgE50VpUK4nnwD0hD4UqDAVhXBgwkm7yqEdMIQAHYyIYJKtsP9huXawNCpxhQqWwbaiH5j/QNcrXKnaC1ZNDnHgF0pGscAHIqoEG2d4oWpGTUbqnWKXRA1ufk9I87x1ip9FWG33rez+XF52ny0EWgIZPwsWNZJYaV1TuTz1qcqfRWEe8rUMnngzUjxe/Ok44N93CFyfhrYKEpQUvEojQxMFt48pY2BjNza0hg1pjqayWoHOemvemha/cW7wBpqt083BWZ60dpxz08A4PiRNXg0KUAJXPIigjo9HWa7AU/9LUoa2LRW6ZDOIYvff349/ZKxQ0SJwLDsg== 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=HCaOtTtT0hTnlGkIBAhqFT31hzzAs4KwZ5bdHw+1dS0=; b=PQkdw9C5UtSf6UrNa2mdlLbbxcY/ry48Kd7jj5whzeFUtFhr/oIVDg/CC3mwoBbwmWzocNPJYyex/UbgmGBLIOziHpmxFgAyY+iAgFNbwRrhLHZNEy3ll07QLLmn9VpvOPCjS0ncj+DdR7Z1zoOOSOWv03awdZZRhtZxvrPMrOk= 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 CO1PR13MB5046.namprd13.prod.outlook.com (2603:10b6:303:f4::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Fri, 9 Jun 2023 06:01:27 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::d2cb:a650:e1ce:2174]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::d2cb:a650:e1ce:2174%3]) with mapi id 15.20.6455.030; Fri, 9 Jun 2023 06:01:26 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Long Wu , chaoyong.he@corigine.com, stable@dpdk.org Subject: [PATCH 1/3] net/nfp: fix control mempool creation failed Date: Fri, 9 Jun 2023 14:00:58 +0800 Message-Id: <20230609060100.1306648-2-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230609060100.1306648-1-chaoyong.he@corigine.com> References: <20230609060100.1306648-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SG2P153CA0035.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::22) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|CO1PR13MB5046:EE_ X-MS-Office365-Filtering-Correlation-Id: ce698a9f-01dd-4250-f163-08db68aef620 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u6kOtANFwr+2jMGl/qSG0nF9vc17foDfNPmw/+BY7VaEYbZrpSHXNiTLfik4YFNHIuOE+qv9tSVPFzPWrYTZ4po8S5Lq834vNgESmBkcRaQEKlSlkdfb21oPyP+vlpkg1fNvtuDKSwr2jOWmF/B4diOObUhi6lrVawJTrh7iXwPZ4b0eyZiSVJ9R7rnod64fKDA007Kil1a39g6zk7tZ0ZUC2xFYoeAM0mueLRS2T241vOby1CtpoBN0+OYuNzS6b5gOQ5p/bB5DKbMOXxaHkN3NcylPge7s1kV4xTZjSb/YVHmgUv9Llr1UIxO4tbsADdpU45rSucs9doJF3YiLw9VRVj7jKR0UjXhVMKvuNrkhKoOtbOzLQfjjX3LE3Rm9iyYB9AXSPXQa4dqDOyn9AUJKdQOMyAcpXspc5tIk/dcgbaghR2AxzV/X0GU6lRF9Py/JTVK9GcVu4Z9BjLYw0bXxsNpNw4RKSXCCyimIMXVjF/UW7IQ2MLvzT+39szXO/0Gck02Cv0LVXqpQkYmo4LNLUuzzt73rKxAATza4lfe3VcZ2sSuGxeIufhmdG5tC0w5DY9r/jarahFJc8LWK1mI4bZKEKB6DmgQWNLUA9AItFbbkDKHrqKcvzF5cpo6H 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)(136003)(346002)(376002)(366004)(451199021)(41300700001)(4326008)(66946007)(450100002)(66556008)(8676002)(478600001)(8936002)(6916009)(66476007)(2906002)(316002)(6666004)(44832011)(5660300002)(6486002)(52116002)(6506007)(6512007)(1076003)(26005)(186003)(2616005)(83380400001)(66574015)(36756003)(38100700002)(38350700002)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SHZSTjNvbXp2NzdXN0ozSzJYbG56Zk9jZW84QWF5bWxyZ0h6c1NzMFVVcGcz?= =?utf-8?B?eCtXa3JZdk1iWVF3VEpsTkFsZTI3MWl6SzhtbXN2UXh3ekhKSk80M0h3czZq?= =?utf-8?B?Q2RpR3pFZHFSQjQ1dUwzcjRwNVJDVmNGWkRDbFBLUTdvS1RoTkpNYURaandB?= =?utf-8?B?d2poK3Z4WE1GemYwaExDYmpISGRxUkgrQ3Y1Y2FWTDAwN09XYVZjWDNlUVNE?= =?utf-8?B?R3NtN2ZOMWt1UVZyNStORVBDa092dHVoKzFTWlg1VndRSlpqaktvYnF2M0Fh?= =?utf-8?B?WUozaTFSSDJzN0l1WG56c1RXVTVIbXYxdTh5U1JvRnpKcHRRNW1RK0Izdjkz?= =?utf-8?B?OVp4WVhkRDlXVjc3OW9GLytSQkp1dGVLTmVJTThsQWI0QUMvTWM2bmx1ak5a?= =?utf-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: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce698a9f-01dd-4250-f163-08db68aef620 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2023 06:01:26.8552 (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: 3mVKqQsRwgZWYszN4e+vxoDmxjKzIt3YJ45YCUZws9F76c45V4qRIbPyRmPav2x1SXcZRb51+c310IYPi9JEhYwEL0VdLQmFydBfCPS7LFM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR13MB5046 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 From: Long Wu The former logic does not consider the simultaneous initialization of several NICs using flower firmware. The reason the initialization failed was because several NICs use the same name parameter when we call rte_pktmbuf_pool_create(). We use the PCI address to give each NIC a unique name parameter and let the initializtion succeed. Fixes: 945441ebdb9c ("net/nfp: add flower ctrl VNIC") Cc: chaoyong.he@corigine.com Cc: stable@dpdk.org Signed-off-by: Long Wu Reviewed-by: Niklas Söderlund Reviewed-by: Chaoyong He --- drivers/net/nfp/flower/nfp_flower.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c index 8e1bc22747..53ee936f4c 100644 --- a/drivers/net/nfp/flower/nfp_flower.c +++ b/drivers/net/nfp/flower/nfp_flower.c @@ -421,6 +421,7 @@ nfp_flower_init_ctrl_vnic(struct nfp_net_hw *hw) struct rte_eth_dev *eth_dev; const struct rte_memzone *tz; struct nfp_app_fw_flower *app_fw_flower; + char ctrl_pktmbuf_pool_name[RTE_MEMZONE_NAMESIZE]; /* Set up some pointers here for ease of use */ pf_dev = hw->pf_dev; @@ -454,7 +455,10 @@ nfp_flower_init_ctrl_vnic(struct nfp_net_hw *hw) /* Create a mbuf pool for the ctrl vNIC */ numa_node = rte_socket_id(); - app_fw_flower->ctrl_pktmbuf_pool = rte_pktmbuf_pool_create("ctrl_mbuf_pool", + snprintf(ctrl_pktmbuf_pool_name, sizeof(ctrl_pktmbuf_pool_name), + "%s_ctrlmp", pf_dev->pci_dev->device.name); + app_fw_flower->ctrl_pktmbuf_pool = + rte_pktmbuf_pool_create(ctrl_pktmbuf_pool_name, 4 * CTRL_VNIC_NB_DESC, 64, 0, 9216, numa_node); if (app_fw_flower->ctrl_pktmbuf_pool == NULL) { PMD_INIT_LOG(ERR, "Create mbuf pool for ctrl vnic failed"); -- 2.39.1