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 9190045492 for ; Wed, 19 Jun 2024 11:52:07 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E6264161A; Wed, 19 Jun 2024 11:52:07 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2119.outbound.protection.outlook.com [40.107.237.119]) by mails.dpdk.org (Postfix) with ESMTP id A76464021D; Wed, 19 Jun 2024 11:52:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gXb3RGiQk0gQgNGZW5wbkOb7UEj9/V/i0ES6OlBb30I3qNacaaN5UIwOCGUqjkQ9Ww9D9OQNRKOWWcD+NNpvXUc2V6y57U9roXc+tx+kz0aNQBIgwSd1852pe+OpXx0UH/nDMVirOJwSUulRoyAfT6AT4EHutnfDk8IO8GzgB2CL/XRbmjytKSDiLAc/gAuV/io5jW7PdECxQ2IPfTFQkE5A4Ogw+muWqqv3LZS1j72JRzgBdEHrfaVqjQpfKWqzecvltXuHyW7ZKDc4NpF2Om3j/uK8p5TbjS9eYBPyZbRo/eMjSTXq60/F/VafAmtt/LzWeTMKZppadqeN08ikMw== 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=xx2svSeb5No00DU3P3JBANdrulEgSj0CsYOVg2vpbjg=; b=nErAMEp1+P3He1SIGqbHUbaxHi8mLBZCfH640rtukH/gjgAs5wgLM2eb/0DAgc0XPHzR0aX3khDjZAXItT6TOkrHOZvVm3cCfgrWBEIu2OZQlmVgIEy4pO0+Od9VCFwtuKM76CO3T/hQYMaP87AFsXjjnrNCRFYBRChOJaO0qpmOpD5nod9Oyp1f4NliMTv2sfyZBewpMtfaGQoQJzC3oMH+oHVuaTyqVHLInuyJM5t57or/W4bHfi1uelZV4sSWLadJ6tY3S/swjg6nBku3fd1tG2uKtWbueAswtw7B4+PiSZCg1DfzQUXhxOu4SWnUwfzX9ANA76lxgF0txn9Osg== 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=xx2svSeb5No00DU3P3JBANdrulEgSj0CsYOVg2vpbjg=; b=RddyB0JfWdJmnNPT535rsQ19Wa1lZZowTyHQuAXU1hwGxv/hxklO7TAsc/rWJffFHtcN1zm/UMa5ckBFoKgK0IdedSAvHfEXm7ag2CtjX5tx4DJg2ucL1chGm+Ey746K/8D7Z5HGObGUdJCmROX1SOQvvz8N4N46INur5f5Z3rU= 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 SA1PR13MB4877.namprd13.prod.outlook.com (2603:10b6:806:186::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.33; Wed, 19 Jun 2024 09:52:01 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::b900:5f05:766f:833%4]) with mapi id 15.20.7677.030; Wed, 19 Jun 2024 09:52:01 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , stable@dpdk.org, Long Wu , Peng Zhang Subject: [PATCH] net/nfp: fix the allocate of switch domain Date: Wed, 19 Jun 2024 17:51:33 +0800 Message-Id: <20240619095133.3479537-1-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0103.apcprd02.prod.outlook.com (2603:1096:4:92::19) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|SA1PR13MB4877:EE_ X-MS-Office365-Filtering-Correlation-Id: 68ede5fa-f0ee-4c69-7a36-08dc9045778f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|1800799021|366013|52116011|376011|38350700011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?5q0JpXSE6levICOcbbtYZtkHY/0SRmQ0bd3HDdv1px2tgPiaqTwZ+NkBluwM?= =?us-ascii?Q?L/h1EfFlscPC1Vy1fIZCVl1WJAp224CmACj6+jmT6Y9l7/kbspRLqQS8clHx?= =?us-ascii?Q?B6wXGwWZjBfTFytORsIZPg19pu6r5twmWhZlG8v9z6P44YAKog90LQ3QXlMe?= =?us-ascii?Q?TQaXKwJtAZy+EuumRhpIY37QPIQb6BF5rvYEaqTL4DAKAo1rOaC7Pp/F+4YK?= =?us-ascii?Q?O86TYcGTewhDNR82nxxcESS8fdoZ8iTkFu2GU48jfosbWfodO4vZzGrHRk8p?= =?us-ascii?Q?jhCdDz/Cx0eJimXnHEhwFPut5Nou/3Brv0+vMBecx5uOjTOyMIVIs2wZtqTl?= =?us-ascii?Q?2XMmte7qV1Au2eWgxJdpdYcMLLeyayXzKf9RclvsRjdaOAvbwCdOwJaCheSp?= =?us-ascii?Q?guEX3IC1afSfVoiCTMJqd57sOyjOiFeqlai3qITTlM/S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um8d4Sn+sUS0SqIF0r0vrE/dC0ldB2+AvGyFFPlC7IhIkTTXtGB?= =?us-ascii?Q?NlDMDZQ=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230037)(1800799021)(366013)(52116011)(376011)(38350700011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Igk3r2pFyfYcZGM+5SV+YG7Qb2hvXzm0iHvc+5quP+cSqrj4TzJ/dkIXWCQV?= =?us-ascii?Q?CclhsYBWUCVz4DokpJJAm4zsIrNV/EZ64ntHc1Qx2Jil6YpRuPTqEa4TXOe7?= =?us-ascii?Q?d2niKd9O18R7uxngTTq4YsmqwUKLve7moNiDrxdWtGsyQyPqp643OszfWPIQ?= =?us-ascii?Q?sHSLHa78i+pBG+bIiSB8diMSHH3/SJCmzZjEftzae8LsCEf8Ant4+CVLdGRu?= =?us-ascii?Q?9I0ElnAf1uZiRU96SOL4zDn0+C3/LA3dXtQGgUoP/47ATWG/j4RRMKQvwiJI?= =?us-ascii?Q?W5y6UoLFJrB6w5oN++7KMEIZJX12ECehK8swgulNUjzmYuEN+ChcfcRQAZoA?= =?us-ascii?Q?JTwwkqp57um3HGYrax+b81YZNtP3IaOTxM2CNeziVcLuo26sFibAOa9SHRui?= =?us-ascii?Q?55mjzsHBsLJeTBXAWjAKC81ollPoMatj6h7SyMp+knNDL6+WjHmuZR9fxl3B?= =?us-ascii?Q?lC3jCQZ7JehgLKqX+inxyB9UR09KEpcr8ZJif39ae2QDw8/70IRrObTialpv?= =?us-ascii?Q?QonECymXPrfMnCRPGIY2EBMkU2Ro81krc58N8ks0cuYKnp8mGXXUbIJkfCu4?= =?us-ascii?Q?LoCHG6TJhX/NfjH+y1n9BTY2n4uF20y52kPWZr09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LS5GzudrgyfC+mLGOYOaXGFKr542DTPumgBt4X/d/wd?= =?us-ascii?Q?XsnfpJI3RQwV2NCgfl9aDhYKQyny9/Pg+n+TaA9ZSxdgeCLIG9jux7RCcyd3?= =?us-ascii?Q?zw=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68ede5fa-f0ee-4c69-7a36-08dc9045778f X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2024 09:52:01.4361 (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: aYYte/hk1JN1L72wu97O8DLq2DIlvor/3Zl3wavzw5Kq6+FIlHecgl950PoaxhgpGwZ2tF5qk6OvosEAWXsSerQ6GdEXD4miAHvIFNwBioE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR13MB4877 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org The check of 'RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID' cause the following call of 'rte_eth_switch_domain_alloc()' never trigger. Fix this by just remove the check logic. Fixes: e1124c4f8a45 ("net/nfp: add flower representor framework") Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/flower/nfp_flower_representor.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower_representor.c b/drivers/net/nfp/flower/nfp_flower_representor.c index 700957f945..e7550ce9ef 100644 --- a/drivers/net/nfp/flower/nfp_flower_representor.c +++ b/drivers/net/nfp/flower/nfp_flower_representor.c @@ -907,10 +907,9 @@ nfp_flower_repr_create(struct nfp_app_fw_flower *app_fw_flower, pci_dev = pf_dev->pci_dev; /* Allocate a switch domain for the flower app */ - if (app_fw_flower->switch_domain_id == RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID && - rte_eth_switch_domain_alloc(&app_fw_flower->switch_domain_id) != 0) { + ret = rte_eth_switch_domain_alloc(&app_fw_flower->switch_domain_id); + if (ret != 0) PMD_INIT_LOG(WARNING, "failed to allocate switch domain for device"); - } /* Now parse PCI device args passed for representor info */ if (pci_dev->device.devargs != NULL) { -- 2.39.1