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 0BE9645CE3 for ; Mon, 11 Nov 2024 07:35:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EEC3A40E1C; Mon, 11 Nov 2024 07:35:07 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2069.outbound.protection.outlook.com [40.107.93.69]) by mails.dpdk.org (Postfix) with ESMTP id 99AC640E09 for ; Mon, 11 Nov 2024 07:35:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=g172sTtOaie1AJs2ktOB2MfDbC+BdMZ5Q1/JhPE3bkmcwLv9jnGUc3dTkKIBWnEeeZD+yWBCTECHzRA0kdjJ1PkXGLGCF7LcGTyn1L/Pe0Nhnuzmgs4pc0lVCa5A7I7CLQ9SfjxK6x692b8Qwtumk46A7lIF7z6OftKjbDAG1wJLghVIYH7UucoodScNQnTz+kFnD5W2V+LnJWBRxm+jDBPYTmCtWCqRX/VQJJEwLp/A2pxLQzsDxN3xARmj7jWBBM28LZBs1x+6/TaJMhcp+LZAjoi0CoCWoVSk1xZagk9DlmU5oj7yulEPFgMDMn0akyhoQA3HVPsRATx+erayfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=V5olp7KQJnGjVleRYe0O4+exP82B/waL9yrbuBpsG6E=; b=SEnXNu/bHt8/UlAy5jjKd3VCHOnbYLyyQoVeuoNkZy1NEtSZ4iFyuXMJkpeGbOKHQeH/ZcXYtepzlEdi0q7TwPnNvw6lzgGcuCab0xCWFikDoWSgQ46sbvsvCQFcVSOzIf7juK/MrREfgCNSUk84wkM6y2B2RuFfKZMpnNg01yDLBnPrxsnRPgLpxjYR4thGVHUh3x0ZNJcB7zD1ddCtcx2DTw7zh4/BQvV6AMIeeM9cMtg/DPEDplbbv41MeGUGBUsLhUc+fdwZRiE05JxyThuZ4pLF4taG2cpfgWDe/GZ8+DoSQR4vSseZYHXucuc2gxu3WEI8tJBXjWTqa81saw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=intel.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=V5olp7KQJnGjVleRYe0O4+exP82B/waL9yrbuBpsG6E=; b=Oe25MYJUQwrJswvkn7oD9XkDRhmp1ngA4sim9lDv9IQanI+zDEQHnUZ3UROVKzZUfnNQOOfXN64l40s40DrB7aUsEZcCuGyoILFj9jNcUWL4VnwC2BteWre5wzitfVdO9bWeUx2LyLb8zW2PtwqS3zSAJ22eApo1nE2vlNzlXK/tFtytpne/oIQrziAzh0mSMwaqhYS28vNL1J1SPw9l0EzBnPhpOXxybZss17cGik8Qzg/hKtn1E8YKzt1rk3KRiYQHmk72uVTd4f6UK71hiyMe4jFp6v7nyAIkokJTUCm7rTXid1OjHo5C39BHKUSj8PmW51ZbsYMfCIdmOGS6cw== Received: from BN8PR15CA0039.namprd15.prod.outlook.com (2603:10b6:408:80::16) by MN2PR12MB4128.namprd12.prod.outlook.com (2603:10b6:208:1dd::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28; Mon, 11 Nov 2024 06:35:04 +0000 Received: from BL02EPF00021F68.namprd02.prod.outlook.com (2603:10b6:408:80:cafe::13) by BN8PR15CA0039.outlook.office365.com (2603:10b6:408:80::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28 via Frontend Transport; Mon, 11 Nov 2024 06:35:04 +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 BL02EPF00021F68.mail.protection.outlook.com (10.167.249.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.14 via Frontend Transport; Mon, 11 Nov 2024 06:35:03 +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.1544.4; Sun, 10 Nov 2024 22:34:50 -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.1544.4; Sun, 10 Nov 2024 22:34:48 -0800 From: Xueming Li To: Praveen Shetty CC: , Bruce Richardson , "dpdk stable" Subject: patch 'net/cpfl: fix parsing protocol ID mask field' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:27:42 +0800 Message-ID: <20241111062847.216344-57-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241111062847.216344-1-xuemingl@nvidia.com> References: <20241111062847.216344-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: BL02EPF00021F68:EE_|MN2PR12MB4128:EE_ X-MS-Office365-Filtering-Correlation-Id: 92c479f4-0123-4a71-f76d-08dd021af9ad X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?tzLlby/0imC83xNIzCjRrG0PInB1/sNTaGytxtwUDbhoSOyhbIVy204m2Bzu?= =?us-ascii?Q?rH7m7lYszuE9Oc+WhtIG0L3PxdFKin7qXtc6QwxpXvO9IM1WQjPYPQtKPW0z?= =?us-ascii?Q?R3zsrp2SVGMikHdxQmPKOdosjW3eVHNE6ViPCzLXKQwx0awjk+YR0iqTWneQ?= =?us-ascii?Q?YWoosm8KdwtnjSYuo3tEkPSVnjhjQ4GRGalwokZH+NdCZNy54+H+JMPBuiFa?= =?us-ascii?Q?ef4WTH4Ocsc1ITxO+AYub1qYp0cmF/qqoSm7S78Wftsz+IebOqbTlPDK2PWM?= =?us-ascii?Q?/of2TgEcPOKwYPPw91LxjCqSpK4k+N6toXitPtUekjhNi5wdYGDciKjHUBRx?= =?us-ascii?Q?rbU38oeJr+HuBQhuzqtl1zDn4bc0zNWuyUo+1QhpjSmVFjTxYf65A04Y7FPK?= =?us-ascii?Q?7JloCbjHJ/1vN2+hfj85G1nbQbKhcW0fJ/sqdDshRwdyXBPKdi2j2ene4YU9?= =?us-ascii?Q?T0ndIXwJFW1E10FtrwK5T9xnqFk8kTm2rBg16shB76GNqWHLB28pkY+12mn/?= =?us-ascii?Q?Mm3Q+kpXxSYNHKCTH4HWzb49rPX8QO2eBUnOs6NW1egiklMriU15gA1BTZyA?= =?us-ascii?Q?jJCsrClH954jNp/r/5oErQOwGcxuQWoYqwmofj4bgMs23HrvQyv9mqpoMS2H?= =?us-ascii?Q?DhJer/8TfZ9C4tx0rni2kQRKxjcKWGxGi2X8JI+x2aiAS7ZgkVeD/qjNv7j2?= =?us-ascii?Q?94nY8S5migMp6jMJLSdMNsg8ouwwMAwY783FPkeTau5dKpv+9EhUIZGze3SM?= =?us-ascii?Q?SsZ3tqgOo+GwV/kwRRFXafnkpEIYJ3sbBF7OB4KYAryzWNarnGV0YrEq0MhH?= =?us-ascii?Q?qnq1zRYEMVW9LrVaOppK40nBsMGFaoMo757NkSGH6usql/H6y2XCJC5qaR5B?= =?us-ascii?Q?PLMeoC8/GXA0Rdr1uPK4XOBa1JerpAt7lJpr7DBzhe53WIUbPvym1e/7ZFAS?= =?us-ascii?Q?dihHrQ/waAiN3GfAln8mbFzSKdExQZaZ9YExFyL0ytaFkyWHMQPlKyTqWmkQ?= =?us-ascii?Q?yNW0sDgzJQZsyTSRNCoxEou4wnbN+URyubs6bt8ie4ljlTVo+WI89Z0Daz1z?= =?us-ascii?Q?fSCkrXdgU23dU5EfOLZeE2fmOclPizTrANzBT58MKW47c9IkdIB0g6cW8sEU?= =?us-ascii?Q?vqQfqbahlRmjY2JCca/nLjUE2qwWIDLeqcxa4Yef3YJTlIeyA+jSbsYMOh+w?= =?us-ascii?Q?4SYhELekcgOKcmckNeHPivMBVYwdrADT0ghozZiIQNBqgGa3cfMOdBrsRd4I?= =?us-ascii?Q?lnOGchlIfn0CjzY5zE8MU+wA5KrZqIRUhlur1aVCYR2ecqOOenhg+eiRHb6i?= =?us-ascii?Q?SWnq/pBd2A8gwuURJUlcik7gcYM5ZVcfosLh2tuG0mpeDACWsdRP1ONjIpZQ?= =?us-ascii?Q?sOk+nl3DAI2yKu3IMtMc1IbypFrUn8iycG4hcz6xy/EMvxRqwQ=3D=3D?= 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:(13230040)(1800799024)(376014)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:35:03.5780 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 92c479f4-0123-4a71-f76d-08dd021af9ad 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: BL02EPF00021F68.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4128 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/30/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=f2cb061aa1b15f690a56ead9334aab21480c7cf6 Thanks. Xueming Li --- >From f2cb061aa1b15f690a56ead9334aab21480c7cf6 Mon Sep 17 00:00:00 2001 From: Praveen Shetty Date: Fri, 23 Aug 2024 11:14:50 +0000 Subject: [PATCH] net/cpfl: fix parsing protocol ID mask field Cc: Xueming Li [ upstream commit 8125fea74b860a71605dfe94dc03ef73c912813e ] CPFL parser was incorrectly parsing the mask value of the next_proto_id field from recipe.json file as a string instead of unsigned integer. Fixes: 41f20298ee8c ("net/cpfl: parse flow offloading hint from JSON") Signed-off-by: Praveen Shetty Acked-by: Bruce Richardson --- drivers/net/cpfl/cpfl_flow_parser.c | 34 +++++++++++++++++++---------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/drivers/net/cpfl/cpfl_flow_parser.c b/drivers/net/cpfl/cpfl_flow_parser.c index 303e979015..a67c773d18 100644 --- a/drivers/net/cpfl/cpfl_flow_parser.c +++ b/drivers/net/cpfl/cpfl_flow_parser.c @@ -198,6 +198,8 @@ cpfl_flow_js_pattern_key_proto_field(json_t *ob_fields, for (i = 0; i < len; i++) { json_t *object; const char *name, *mask; + uint32_t mask_32b = 0; + int ret; object = json_array_get(ob_fields, i); name = cpfl_json_t_to_string(object, "name"); @@ -213,20 +215,28 @@ cpfl_flow_js_pattern_key_proto_field(json_t *ob_fields, if (js_field->type == RTE_FLOW_ITEM_TYPE_ETH || js_field->type == RTE_FLOW_ITEM_TYPE_IPV4) { - mask = cpfl_json_t_to_string(object, "mask"); - if (!mask) { - PMD_DRV_LOG(ERR, "Can not parse string 'mask'."); - goto err; - } - if (strlen(mask) > CPFL_JS_STR_SIZE - 1) { - PMD_DRV_LOG(ERR, "The 'mask' is too long."); - goto err; + /* Added a check for parsing mask value of the next_proto_id field. */ + if (strcmp(name, "next_proto_id") == 0) { + ret = cpfl_json_t_to_uint32(object, "mask", &mask_32b); + if (ret < 0) { + PMD_DRV_LOG(ERR, "Cannot parse uint32 'mask'."); + goto err; + } + js_field->fields[i].mask_32b = mask_32b; + } else { + mask = cpfl_json_t_to_string(object, "mask"); + if (!mask) { + PMD_DRV_LOG(ERR, "Can not parse string 'mask'."); + goto err; + } + if (rte_strscpy(js_field->fields[i].mask, + mask, CPFL_JS_STR_SIZE) < 0) { + PMD_DRV_LOG(ERR, "The 'mask' is too long."); + goto err; + } } - strncpy(js_field->fields[i].mask, mask, CPFL_JS_STR_SIZE - 1); - } else { - uint32_t mask_32b; - int ret; + } else { ret = cpfl_json_t_to_uint32(object, "mask", &mask_32b); if (ret < 0) { PMD_DRV_LOG(ERR, "Can not parse uint32 'mask'."); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:07.841481184 +0800 +++ 0056-net-cpfl-fix-parsing-protocol-ID-mask-field.patch 2024-11-11 14:23:05.132192839 +0800 @@ -1 +1 @@ -From 8125fea74b860a71605dfe94dc03ef73c912813e Mon Sep 17 00:00:00 2001 +From f2cb061aa1b15f690a56ead9334aab21480c7cf6 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 8125fea74b860a71605dfe94dc03ef73c912813e ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org