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 B419A424CD; Wed, 19 Jun 2024 11:54:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A51A54161A; Wed, 19 Jun 2024 11:54:05 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2103.outbound.protection.outlook.com [40.107.243.103]) by mails.dpdk.org (Postfix) with ESMTP id 8AE544021D; Wed, 19 Jun 2024 11:54:04 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IFnXD5hkIK8E08MpI9u+5LMKgheJzOQiAMk9MX21wEF9LfID2g2jQyc4hwD0+cjrERKFh5er2oPxydSW94x/s44iWUGHxegGZ0XEQY/uk/5A5vRvsC2OCB0qf23riN0ezltJ5erSVEDuZihxU/a/06qCKkTYtln8BUhsPYO4PkU0TPttToYhnvx3jsPz9VpRTr+L+rYcnpaVPVp78MRbS+FwYye9smsZwwjMeDo2HF+ADn9TTYOCqlpS0PDKyBW+FwZW3W7u+cmi8tb1IrO4p73zgn7s5oWwP4mBzxzzZ64+F+uC5rKitf5XFAx0Xg41Le/pBIsyhqLgkB6Tv+XFwQ== 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=nlEAjdsVfWyPtOhIHhLDqUb33zXYPhLQCW6NJcKY2qo=; b=nBGlvtUSwXwe7bscqCzmKonppLdOJ9XCebT1AUmCERdMpbE0v8SFmNxt1SPjcLEQnn3M1TBP0a3nZqevMn7YCABnYD8kEluqXmIumg8nRo2VsLILob4q2QS9uLY/vX2gRfnvl9YEXc6q4kMxdGHfuoiWKQ94YA0hwHhxBhkU0jbxeI0UP43Az01aqOb1qPC+g3qTF04FiSCeIUin0paUHCq1RvkYYJ2Yhsr1JcSPc/lLC8Ai0lE3bSlAPQz6bT/tCoD0aiRUuLep9vyQBROk67XOoPDiiPLQURbWxsn7jC/+nmpWuKyC4tDSvGmzA+S1scBWto2AGJWe3BEeWnEAqA== 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=nlEAjdsVfWyPtOhIHhLDqUb33zXYPhLQCW6NJcKY2qo=; b=NwQdO2NU4Btl1zGLV7gJrB1hK+TEqkWkgMwSHIdBIbJML8U4KoXZ0R6Tm76lfs8Cfdy/1w4ma9Mb7X4R/S04RPZ07gtod3lezSvjz32hM6iRQ/xdlmcuMZdjY5bOHrGRqo6OUbkDo9ANfevWPnhWYasMRCYiIluYL69nedIEkEY= 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 CO3PR13MB5782.namprd13.prod.outlook.com (2603:10b6:303:171::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.20; Wed, 19 Jun 2024 09:54:02 +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:54:02 +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 flow mask table entry problem Date: Wed, 19 Jun 2024 17:53:36 +0800 Message-Id: <20240619095336.3479640-1-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BY3PR03CA0026.namprd03.prod.outlook.com (2603:10b6:a03:39a::31) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|CO3PR13MB5782:EE_ X-MS-Office365-Filtering-Correlation-Id: ef39b615-0edf-4324-ab49-08dc9045bf6f 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?fpcdC+JizJe1GZHN5ymeB0SeoXfBjpNnU0J/UZC00XQ+3yJWJeGSYA3pe8Mp?= =?us-ascii?Q?FhdTzor9kZftCkMu9XbENFkICt6wSE5JkoL79kn5WVU56Wle36WTOEz5bja5?= =?us-ascii?Q?VNMDEO3uhMlIORGroqwZQpgoKI73yF/2DM4UwMskQoHxaYPqHV6WWLbjGcO5?= =?us-ascii?Q?wqfhdAguHdFWN7Sp1yPuBNy3axOZ1kBXmNnA3hKts3LCYcpRTlSLzyG/I9Mx?= =?us-ascii?Q?GoZN9jEha79aSG/qps0vt9cGPpF8P5XLecvcm1+824XGxD8sxOq0myVWSct6?= =?us-ascii?Q?SVCkhUf+y8nL9mO04am9eCuhHf5Mlcn9pLP6viooMh0R+3x7YorQSJJohMgP?= =?us-ascii?Q?c+yWwRDtHhr3RXFrcWbEpmJtnajvON2vUAMxrh7arvNuy3twOf/SSKdfcHqb?= =?us-ascii?Q?B25QUGOESzW/A2+1hYQ110m9EQiSqv0zJ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Oi6VUyLX8gvBa0zGz+1fhGGbtKPPNluBdQ71iAlZWuzZzrkxWn5pOMZDCG//?= =?us-ascii?Q?fBHgld0=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?CeqmGy+cgm2rjVeZvNNfztLadduFM1K2AK1k5tdjej721Lq7C2NefijCHvHg?= =?us-ascii?Q?gLiEdpgyV8DnasMFgd7yxuGfaIYNPzs+O3goagCIESE32wYKcH/mV9mVIVrq?= =?us-ascii?Q?4xLq0Nt1HZFiVnWHk0ZqzS3KZ5ZlFITuRn45Qrvsn/wgmybL4Q19tx61ymMv?= =?us-ascii?Q?tlSCrdxxxNJcn8mJteVi9rGYhIrahVBLXbtyZp7SBxSHl5XqoBE3TZgkY1++?= =?us-ascii?Q?LFcRRvXi+mzvNtWPCTiElZc8DmIIi1E6IWx6xsRoPgdEirVmFthgQJiCsu01?= =?us-ascii?Q?xGF/2kiwzW9ZXGhboh/ju/XaQYqmjsUBDBCWeHWARcmv2EHCMYlQxgQ8nHlY?= =?us-ascii?Q?v0p7+b/Fo8is33mwnynk/lNAVigNTIRzNBfgFY0oMcG0QYcUc53P53mjZ5k7?= =?us-ascii?Q?qihie1kKcb1S8b04g+9UXXyT7gCgSZhJtwt0zBAuDlut5Pc3zf5+dJlZY95Z?= =?us-ascii?Q?IUCnoSn3jy5OSdMDfNbr5r8xFU/rcYUsmrStH9XxZXRtfW/zfqdEi3UW0i62?= =?us-ascii?Q?z1JkjrtvmZsyh/qPn6mXYhCmy6KBos1gA7btJRSMDYqM073HE72VWCgM2tAx?= =?us-ascii?Q?jlkbtP0nfv4rWrBrUEysp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Bmvcp?= =?us-ascii?Q?7wy0QQLBAbZ1I6oEW5yRogteMs88adChsRxn6NjK5dLoOO6kkDSTMeUr/65K?= =?us-ascii?Q?oYH83ID25lzF5Khe/g35vjMFSsHRJM8SKBAZ1CwFS+svvQPLrs5OmNPgTNZI?= =?us-ascii?Q?KA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef39b615-0edf-4324-ab49-08dc9045bf6f 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:54:02.1535 (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: hMRUDB2rckkpVc26/dm0wTagK59kU+zscXNNcNXe+iGF6hI8jU6QR32GQ8em6ztRpi4xXTQLXCSJMkVRdSw3gyYQXIrnmkH1IYGzdNFfvZE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO3PR13MB5782 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 The mask table entry using reference count to manage the flow rules which have the same mask, and the new mask table entry will indicated by flag 'NFP_FL_META_FLAG_MANAGE_MASK'. The abuse of 'NFP_FL_META_FLAG_MANAGE_MASK' will cause the firmware abnormal and the flow offload will not work. Fixes: 7d18af7f6fdc ("net/nfp: support merged flows and conntrack stats") Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/flower/nfp_flower_flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower_flow.c b/drivers/net/nfp/flower/nfp_flower_flow.c index 9b144e41d0..fad65c1785 100644 --- a/drivers/net/nfp/flower/nfp_flower_flow.c +++ b/drivers/net/nfp/flower/nfp_flower_flow.c @@ -317,14 +317,14 @@ nfp_check_mask_add(struct nfp_flow_priv *priv, ret = nfp_mask_table_add(priv, mask_data, mask_len, mask_id); if (ret != 0) return false; + + *meta_flags |= NFP_FL_META_FLAG_MANAGE_MASK; } else { /* Mask entry already exist */ mask_entry->ref_cnt++; *mask_id = mask_entry->mask_id; } - *meta_flags |= NFP_FL_META_FLAG_MANAGE_MASK; - return true; } -- 2.39.1