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 CDBDC43B7D for ; Tue, 5 Mar 2024 10:59:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C56334026B; Tue, 5 Mar 2024 10:59:13 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2083.outbound.protection.outlook.com [40.107.244.83]) by mails.dpdk.org (Postfix) with ESMTP id 813B44014F for ; Tue, 5 Mar 2024 10:59:10 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cg9AwVEUAfOUFjHAu8g3fq0VELny8PT11B1mWhLBdtRjWoHK9P00jS2qy4QA2fABaXI94JGVR/34Ivrx76iJ8EAQwWV9uyhDpUzp+7iiHNlzbHRDSnJbo4S4Ujrr1DXl5Yq5NFrVmwLz43mhaW+0YWI++1cTnDnUb7MfeVYGp2qpKS4NykPh005VKT7j3GkRCUTE9vhpHdFWVjcn5B+Vth4ekzacqcM+SpmS2j4sJXkGAH/cUXw1plEUZnnk+srijG798MhUSAGNWEeCNf8zKoBqX9X4QJbkgiJtpZCqoK5MGUwhWcQOZxNDWOnCMRVEUNoFTAhmFgHK3DL2P5piMQ== 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=WCkcFT8AxPyqTPNlxBhpK4PtoHQkmjsXpQKZni8WTVI=; b=aJEVgbsUs5eo8Ln2AkGyvlYtvoCEWVD/kWkwsgt3xcaObRLBG3hHqek0CNp84zLpSjOWjaC99cpTPujX60dA+fnEyTUN06fpppi33kZHGcf3iLwlrhF6Y30GpsQUuggCGOQITGcIC1l7oVBV9tvTuuLe3lfjHk5qe8M6fMNveot9EiwyOv51Qb0jI6RlMiY0Vd5SDpNbyVwog1SYYaq/SJQ3cx8E+28wJ8y6xiW/IEBQlQj9/JPZEoje2UMWqKW/WB8o2AsOUyVN/LRa2RIJ5xvpdGYGtlw4LU35LMBjqXDiIvUAw1/gSwTcHpwnZjXrTiJqGaiTkQoBAnbbQd+wVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=marvell.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WCkcFT8AxPyqTPNlxBhpK4PtoHQkmjsXpQKZni8WTVI=; b=kUJXbxUNmMBRKQePVsnmAMb2WotbMAickje6cN5d25InNAdPMroDydBkaXHjEVUV0v+jejynZuLhZzXjAcoaBV0Nqo4dSkbVUij/9BrPEp85eBMhqiwhMcOrUFzYfgE4bH7OROGKkLe3sqcllhxhZ7IfDwuxaIeWzLS7J67kFHOnr+Mq4C52JLDcU916S/6s3qg9cJNSJn/0mSd3mDuIZiiiBTc2cQLRz+o3Hiz+6fqZJCe21fycFeYbjN8q4q23Wg4TPgs2b6vGxcw2JTjekwV1THYadUqkO0xZJYTdXanOgL4h/UBpmf11a58aw2Z6smIwT4USR8ZVW6cxpDQt9Q== Received: from CY5PR14CA0028.namprd14.prod.outlook.com (2603:10b6:930:2::29) by SA1PR12MB6824.namprd12.prod.outlook.com (2603:10b6:806:25f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Tue, 5 Mar 2024 09:59:07 +0000 Received: from CY4PEPF0000EDD4.namprd03.prod.outlook.com (2603:10b6:930:2:cafe::b) by CY5PR14CA0028.outlook.office365.com (2603:10b6:930:2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39 via Frontend Transport; Tue, 5 Mar 2024 09:59:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000EDD4.mail.protection.outlook.com (10.167.241.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 09:59:07 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 5 Mar 2024 01:58:57 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Tue, 5 Mar 2024 01:58:56 -0800 From: Xueming Li To: Satheesh Paul CC: Kiran Kumar K , dpdk stable Subject: patch 'net/cnxk: fix aged flow query' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:47:45 +0800 Message-ID: <20240305094757.439387-125-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305094757.439387-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD4:EE_|SA1PR12MB6824:EE_ X-MS-Office365-Filtering-Correlation-Id: e1226246-0491-47f3-bdc1-08dc3cfae5ea X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nk+8txj/8H1I50JjVzc/KcM/IkdvNKY7uh9XFVmprHLyroLJ5Sp0poLmxDoAAboG4euP2HVqhANo+QJh2QbSe4MmPsqSlLWbp8Hz+KXs4s5VJ9aDZsvrcTUMJgCNYI04lls69Xw+c/oM4WYFAMHuJy3YWcT7x5Z6BbIoNTyp0iSBxZCHaBnvO8pGQ/cEkIkbwcvr/EVhYotkX9epsdwLPyyWdXAOfLxFuCEr2ENuthsiROcKHWslUnU8s58pVe8JAAmGgjP8qitTe+H3kxvGQa5BvKHH8XVEZAyhe6oUV2do8GZtLGfgX5ljmxJ2lTGUA0TpvlJcZiqXOwcoEj9yjyRuCCwGR83y8xIXciw+171hv/LwbnRDEzODsT8QZUODXxWmSDsqeVTYnBA0uoKn8dTxHMgaGq1C5E6umhxC7UAnuyztFNrd0bMavSyim3qGU1wlCkeRJtuubGlsAXeYMrZ6XGprniF+vjb968EbIH3pbu3f9oGkjNeSxDDGvCrbN+6INH7okOe+KKERE7Dk5mUwjK1teVdLvPI2reGtjTUpun66zS3ArQV/+IYVxMOXPYHcu+G81fGUEP57GGhSPFSgv/5TdyYShxRn7s1X4yxvU/6bkNseXinL3jWDggfIqxWJCQoXm9v6LD82XEZvPXoZ6+dkCO5nm4RWbv0ALl9Zf9o3+8T75mVfgn2W6Ecy1fdtY1nI6UW4oVx9vLkADiJw/aZXsHzg+Uh0gfH1BJYp6Tsk5wtzrSjmfL95IipJ X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(376005)(82310400014)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:59:07.5531 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e1226246-0491-47f3-bdc1-08dc3cfae5ea X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EDD4.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6824 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 Hi, FYI, your patch has been queued to stable release 23.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/31/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=01c5db8d99fd3dc101cf9e6ebacbb6c150467529 Thanks. Xueming Li --- >From 01c5db8d99fd3dc101cf9e6ebacbb6c150467529 Mon Sep 17 00:00:00 2001 From: Satheesh Paul Date: Fri, 2 Feb 2024 10:51:37 +0530 Subject: [PATCH] net/cnxk: fix aged flow query Cc: Xueming Li [ upstream commit 4ebef525d40d74ca66b8d444ff154739ecc0908d ] After all aged flows are destroyed, the aged_flows bitmap is free-ed. Querying aged flows tries to access this bitmap resulting in a segmentation fault. Fixing this by not accessing the bitmap if no aged flows are present. Fixes: 357f5ebc8a24 ("common/cnxk: support flow aging") Signed-off-by: Satheesh Paul Reviewed-by: Kiran Kumar K --- drivers/common/cnxk/roc_npc_aging.c | 4 ++++ drivers/net/cnxk/cnxk_flow.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/drivers/common/cnxk/roc_npc_aging.c b/drivers/common/cnxk/roc_npc_aging.c index 254dd2139b..e0f2dc2291 100644 --- a/drivers/common/cnxk/roc_npc_aging.c +++ b/drivers/common/cnxk/roc_npc_aging.c @@ -234,8 +234,11 @@ npc_age_flow_list_entry_delete(struct roc_npc *roc_npc, { struct npc *npc = roc_npc_to_npc_priv(roc_npc); struct npc_age_flow_list_head *list; + struct roc_npc_flow_age *flow_age; struct npc_age_flow_entry *curr; + flow_age = &roc_npc->flow_age; + list = &npc->age_flow_list; curr = TAILQ_FIRST(list); @@ -244,6 +247,7 @@ npc_age_flow_list_entry_delete(struct roc_npc *roc_npc, while (curr) { if (flow->mcam_id == curr->flow->mcam_id) { + plt_bitmap_clear(flow_age->aged_flows, flow->mcam_id); TAILQ_REMOVE(list, curr, next); plt_free(curr); break; diff --git a/drivers/net/cnxk/cnxk_flow.c b/drivers/net/cnxk/cnxk_flow.c index 800ae5d1df..be0330fa04 100644 --- a/drivers/net/cnxk/cnxk_flow.c +++ b/drivers/net/cnxk/cnxk_flow.c @@ -508,6 +508,9 @@ cnxk_flow_get_aged_flows(struct rte_eth_dev *eth_dev, void **context, flow_age = &roc_npc->flow_age; + if (!flow_age->age_flow_refcnt) + return 0; + do { sn = plt_seqcount_read_begin(&flow_age->seq_cnt); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:34.689993023 +0800 +++ 0124-net-cnxk-fix-aged-flow-query.patch 2024-03-05 17:39:30.963566499 +0800 @@ -1 +1 @@ -From 4ebef525d40d74ca66b8d444ff154739ecc0908d Mon Sep 17 00:00:00 2001 +From 01c5db8d99fd3dc101cf9e6ebacbb6c150467529 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 4ebef525d40d74ca66b8d444ff154739ecc0908d ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -46 +48 @@ -index a92b61c332..4deccd1a67 100644 +index 800ae5d1df..be0330fa04 100644 @@ -49 +51 @@ -@@ -616,6 +616,9 @@ cnxk_flow_get_aged_flows(struct rte_eth_dev *eth_dev, void **context, +@@ -508,6 +508,9 @@ cnxk_flow_get_aged_flows(struct rte_eth_dev *eth_dev, void **context,