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 E89AE454B8; Mon, 24 Jun 2024 03:59:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5A3E140DD2; Mon, 24 Jun 2024 03:58:08 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2115.outbound.protection.outlook.com [40.107.244.115]) by mails.dpdk.org (Postfix) with ESMTP id 35FBB40DC9; Mon, 24 Jun 2024 03:58:07 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MfXAmSmkNxs+1rvpBiRxRtK8WdrNga0s/QY0tx3QgirQitBfhdZ53cfNXIK92e5k+iDauy1MFi+o4jz2zFxg4j6bcc8PZFpEsTi5QJ/xfxdEZz0xNZ9TD6WbKK851MahEkEOpsAWi7Ds0Lj9ekG0Z1C+m9a30vty1KtUVej37wnjufDqW7ew6GlmwunraMCUBgc3hW/k/40fkP1BbpIyDcINUTeOg1dyI17c3e2965OuaR2txOGCdHwXPiCX1GycVTkY5idIp1yXAyi1jATvJexLEwUH5vRg0mjGFuyAiXjCwIOPqOxI4Zb1RyNasFkFJme/zGrfxqTsJPBYmbHvXA== 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=SyPFfy3o9X0Cv4yIXEI+eVrqe0EtTR+0c0jhkdfQ1c8=; b=oLPDkdr7388D51vW0UKmOlQbmVUy5T7Hbn/NYWDri8JZsVLNMtDNwG8nT5dsw5LoB9SjWuDkb82Dcqz74ZevqaKygeFLtwLG9Dt+FnI/tRKAbOpculHvDDCNlmTE3E54DIXZt6jCqU4aNj848uhO3pP54Fro9nw3CYrZlPlHjkwG9/T73bwJ1/A4DT6ZjYjm/S7uneX+0SOxZCKp/R6ZvNmLVTXdBwGr7aZLsnUtgkOkIyAjHOYAZmopUzDiuco0eGR2LQ5xbRuA0kUCuGP8K0jhp0TLRUqIqXt7WEmtRo33rPGwwv2tq/DyRDAST+PFpXHf+UsMpzDGkVNSGnN8+A== 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=SyPFfy3o9X0Cv4yIXEI+eVrqe0EtTR+0c0jhkdfQ1c8=; b=P5HXCxURvdn37H8NONTLybk5yuBjvg3NL60iH1yqICrsbLh2dnrbhKU630sPYelE6vWuG0vtWhpL8CmhN5FmAC+Kfu9yVbwufbeRg+wWy4nCONo5UwOAV97Ks5tsxa0TnxVR0QfBmyCg1RgW2KLgUcjgqptzuogx5mcZ2VZDaHM= 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 BY3PR13MB4882.namprd13.prod.outlook.com (2603:10b6:a03:36e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.28; Mon, 24 Jun 2024 01:58:06 +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.7698.024; Mon, 24 Jun 2024 01:58:06 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Long Wu , chaoyong.he@corigine.com, stable@dpdk.org, Peng Zhang Subject: [PATCH 11/17] net/nfp: fix flow position index problem Date: Mon, 24 Jun 2024 09:57:17 +0800 Message-Id: <20240624015723.3712898-12-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240624015723.3712898-1-chaoyong.he@corigine.com> References: <20240624015723.3712898-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ0PR13CA0070.namprd13.prod.outlook.com (2603:10b6:a03:2c4::15) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|BY3PR13MB4882:EE_ X-MS-Office365-Filtering-Correlation-Id: dc88b4eb-0899-4c14-0e2c-08dc93f116bf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230037|366013|52116011|376011|1800799021|38350700011; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?yI2WcGrcNUQdkjV4XjIaVDZ440N0/Gga0t9Dtui07YBwn2jlpcNNCAdpeLkK?= =?us-ascii?Q?aDOtolPIpB2ex0FFJ3MjeOsO0mBs19JBHnOYnYuddjHGEL8CarJ+D40p+TDN?= =?us-ascii?Q?Zaqxjbje2HlEVpNVsIN/2H6nxreq/LR1uV6iaLvh0twaa3DLxeP8L1Njqq+I?= =?us-ascii?Q?ihsxJK5mosKBMwyO05RbNNzQxLWkfAtpr3P72cHbaQGz6Y/NBvH4KY5MiRFC?= =?us-ascii?Q?oS1d2hNZpk94UBvs/beCTia4WkmeiiE3pI6+C5tzfN+Ok7oXhzLeYit9he/A?= =?us-ascii?Q?JPKFjH8KH4vWEmREeyEA1pCUhj608T7lKyx6S/XFslxtIaV/aUCsDS4muLVc?= =?us-ascii?Q?5lZ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+U66x5Dru4uXRsfs88C?= =?us-ascii?Q?MasOQx7R8p/MN3Vyy5Gt43mbkxdEmPt8Cl87Dh/StjjSiObiX4+V7ixNa7Hv?= =?us-ascii?Q?mKyMMeabPmfi+bPv+jupZWrXDWg9Jk/OrM7bA/HgfUnNmcXm7SYD2Jf3FJUC?= =?us-ascii?Q?SiQ+Md4=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)(366013)(52116011)(376011)(1800799021)(38350700011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?vnh1UiVwN4RcagM66KIHbzf5XGXzkh5cYYSOmef9Erm4In4Iqu5pghLDjXk7?= =?us-ascii?Q?AG7HciJtcV9BwGWzBoO7o0Cf3kL+g6J/rFAjXtklUX/uDay+03HAP3QNzYMj?= =?us-ascii?Q?ZNpZ/G2ug36++VH3ZfsmYz9sbKQZ8rUbeZUfw091WSmdqqB99cedVPgQjvHH?= =?us-ascii?Q?B3eeSGtdXy7gr5niVZnTi7naeOXdVux2C0EKg5HvNRv8ZTBYCBEnGhbfLp++?= =?us-ascii?Q?FZHX2T1kTfcALbsvZwFbdy4Rye1tFFv/txu+YlVrFjAssAlascb/N0bZ4o2G?= =?us-ascii?Q?fOXBxh8m+GpL5uCvSuq54yqzocze6c1USS1n30e04k4IpoUJW/Dln2QeazUd?= =?us-ascii?Q?yz0ue6+fpP1hSddfpComRxA/HT2b1/rLLZqzoJ1ZbcWhS9KyRJQy0HxaBJ1z?= =?us-ascii?Q?MB5ZUOpKQ3t+kUpOm7kVS46Yomttul1GhTqbzc7iyKxpLQ+HBfaCLrhjn3Sx?= =?us-ascii?Q?FkWv7V34+VJPFjNkg0j0E9b2tYjLMtQrXHjHk6iSpVAh600k2slag7u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lUxw5mffyCnqt/C2Zp0w7UXMaDxWE0vKKdllDWoGg?= =?us-ascii?Q?rJ0cmRQkXPq7hZQoCXNtePXYrGpxM5RXciEdLbx58o6KzdBOjy1WFWLmN3Ca?= =?us-ascii?Q?q3bQQy4xzqCXRBILHj2ItKBQLfLF4Lsa5H4MQDdQ3BF9PM1cDk8lkKWAynMh?= =?us-ascii?Q?YHRjl9zgC25TAhyd/7qp9iq99RE1I7jZhSMKSxk7aEJUItpdzJoKBgdy8nbr?= =?us-ascii?Q?sA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc88b4eb-0899-4c14-0e2c-08dc93f116bf X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2024 01:58:06.0326 (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: rINc6SfDpc/Dg1M4YTDMKKaPpeVZMWyzg+1RXxrbg5QXH+XighmN8T4IhgGoGnCUB84oq6CYKZKxK53+6g6IMLyN6u1DXmuFrsjJZ8juQwc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY3PR13MB4882 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 flow position acquire and free interfaces use different index, and this will cause the flow free logic failed. Fix this problem by using the same flow position index. Fixes: 0b9079d24808 ("net/nfp: support flow API for CoreNIC firmware") Cc: chaoyong.he@corigine.com Cc: stable@dpdk.org Signed-off-by: Long Wu Reviewed-by: Chaoyong He Reviewed-by: Peng Zhang --- drivers/net/nfp/nfp_net_flow.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfp_net_flow.c b/drivers/net/nfp/nfp_net_flow.c index 2dab317a5f..2c7801ed41 100644 --- a/drivers/net/nfp/nfp_net_flow.c +++ b/drivers/net/nfp/nfp_net_flow.c @@ -123,7 +123,11 @@ static void nfp_net_flow_position_free(struct nfp_net_priv *priv, struct rte_flow *nfp_flow) { - priv->flow_position[nfp_flow->position] = false; + uint32_t index; + + index = NFP_NET_FLOW_LIMIT - 1 - nfp_flow->position; + + priv->flow_position[index] = false; } static struct rte_flow * -- 2.39.1