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 5A44AA034C for ; Wed, 20 Jul 2022 10:24:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 511DB40697; Wed, 20 Jul 2022 10:24:45 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id 6E0854003C for ; Wed, 20 Jul 2022 10:24:43 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AMCg5cGUQTuuhY5mQS3fQTQws8yYcPjSqXzAHgQqjnBEQMfdvZ46ib30ALPmk+dL+lljQ0IEC+srCLZ2Z46zjS78M/Ly5Dz/bDIkpv4+fRHjkCVer7mA/EVn3MxG+M+QsgsLacX8hU9svBm+Dqs1BFu8FHvU3knDU6zFsWRrNLPhUlEGNYeb7+G6vKFxTphSuNWeydfkSD79tPOmxIbHbMmiCBLTKOXYLSif6l7W3FdJh7i/iRBSdBmIF9efg/q0NfhCYWE2oO/jPfOJszTwcnK+lyHWHxTbO7rWfggQq4OeoilqfKr06H9/zRZsE5RLOkpqmeQWPxljgNR6yFm4MQ== 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=zGrE4mDwk+U6NT0Ec3T6rcfN/t95vy2Wtr7uDR4N3lE=; b=Yb3CemJfB+RfB2LDUAG5U1L7+J+New3oqIeZZztqumEVbLCkQFJFmYyahgorypmwJiwiVWPuRczlmIHxy3S38SCRCj9XdUX6VQR+izqe3YdOU1AdzfTeG8XwCOnQEZpga+BZXHY+cejNeTYb9WuOMqEswt9QqqxavMa5m+O9iyl+Me/7IhR7LyvL8HxIivuSsSjpd58FPr1RGeq7zBRq5UEmV4OE6ywJthMfoOUAD+ZTmgyY6yyqtVl8QJ+2mIC+Wut1K/So76V4KproKzqYfj9WOG8lQeWXPO2Ob7eQXDRXDW3cMZhL4YLmFulCL6qvAqNW0+EEiS8hi3dyNb4MNw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=dpdk.org 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 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=zGrE4mDwk+U6NT0Ec3T6rcfN/t95vy2Wtr7uDR4N3lE=; b=uTmYT6qUKjNk45kDYxT+ZPW/ca9IfEWXBOLJ9gKQPK/oX1sCP63WF1CpMRHtz0vKAFaWdOX4u7iMct/Nbhpm7VjlqAimoOGWvpVYctKie6BE0dl5D8jWxlr2ZwSonyi9KF7+Q8kX2zBb2m0xO5tKWxvLxFuCoyYUfHhCBepw5PDxPEc4glp0pT1pSOSYkI1bWb5wzcURQ6CnjgxLfTsiEmxxvjKWkQbL8Vlsi2YKgpntKF6WcWsD6xl5JhtaBWX1FKSc7UqZ8A33lpMPKcbH8Rbe+5JUWsJDTU/D/Oai/AXGVIh2tk4+2CmfjFi1rc56xV2hKs1vJ7vUrPbvLVACEw== Received: from DM6PR01CA0027.prod.exchangelabs.com (2603:10b6:5:296::32) by BY5PR12MB4274.namprd12.prod.outlook.com (2603:10b6:a03:206::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.12; Wed, 20 Jul 2022 08:24:41 +0000 Received: from DM6NAM11FT044.eop-nam11.prod.protection.outlook.com (2603:10b6:5:296:cafe::c0) by DM6PR01CA0027.outlook.office365.com (2603:10b6:5:296::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.21 via Frontend Transport; Wed, 20 Jul 2022 08:24:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) 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 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.236) by DM6NAM11FT044.mail.protection.outlook.com (10.13.173.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5458.17 via Frontend Transport; Wed, 20 Jul 2022 08:24:41 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Wed, 20 Jul 2022 08:24:40 +0000 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.986.26; Wed, 20 Jul 2022 01:24:39 -0700 From: Xueming Li To: Ali Alnubani CC: , Thomas Monjalon , "Viacheslav Ovsiienko" , dpdk stable Subject: patch 'net/mlx5: fix build with clang 14' has been queued to stable release 20.11.6 Date: Wed, 20 Jul 2022 11:21:01 +0300 Message-ID: <20220720082132.3954126-32-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220720082132.3954126-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> <20220720082132.3954126-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-Office365-Filtering-Correlation-Id: 54057891-5aaa-4abe-5420-08da6a294b52 X-MS-TrafficTypeDiagnostic: BY5PR12MB4274:EE_ X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Sj7gpdvPW40zSE30G64s37dGE0n0QV+rNmaTKpD2eCuzu3o1Do2yQUG10Fgd?= =?us-ascii?Q?+9hknqJVZ6SbNzhIdJZE8NG3K8CZZDIvXrLOqfB0Sosm57+jgKAtUFRU8mWJ?= =?us-ascii?Q?ZIfQt+2A2RnU7fgNKGpmSOUfxSDEnBWW0J8ZbXU94FOjrfX/u1QmGnRjNDOC?= =?us-ascii?Q?WcDee1dBIC6WDEv5P6WYT+uRshOdoU5mLSnlIcerx/3akGDdw8OJFeel8ozy?= =?us-ascii?Q?KrXwZFiT9PHppRBgN9JEB3zdPWpOCRDrSzWpoLto61wBYwNzhi6dlzTn+chu?= =?us-ascii?Q?oesgU0CEuW1dD77ISdaF2Mp60NyotvchmsTIdqPcAIKWh8AmvxldBaOHJlql?= =?us-ascii?Q?HPJRElxkpqiHRrXpPXERCM8CPMJMXsQc1ZA8FXxMB1VxOZTvfydtWyxtMqVt?= =?us-ascii?Q?CHVWvYLGeTgHS9rzd2PgHUDhya6bFzM6iXLSJpF50qnOiertV+5zkEbE1IZd?= =?us-ascii?Q?MwV+SY3QfaX3lC+49KimkdIgDh+OBDUkgTL5aQkBzA6HLvaTPi4+LsRI0Mbt?= =?us-ascii?Q?q7GAi3KHrUaPt93letzdSsjjrmHtav0EAzHxTdhxHuz5mf8YunOL/4J4SbAU?= =?us-ascii?Q?kELU60bJbNOva+18Z1UNBr7H/r8uu9oAMO33G8z6BWOZ85LuFLtDEXxKgHsz?= =?us-ascii?Q?I2yfay77Na7ipmX9EGhhmkon27VAK27GKDtT0wCl0pluawu1ibPwD5L/HCLm?= =?us-ascii?Q?MXojh/gna1rwPEqOv0G42A3f3zpk4EkG7xFuUhXhhzwx9T05eDpj68pHUHUe?= =?us-ascii?Q?W8mJwYZQrNsNLyrm5eh96UQPxDDqHkD1j1PDvmtl+NyltjR8P0bglYjLTBvj?= =?us-ascii?Q?yCCbk8/EPAa7eyn8qE6OtwvsCs9BBviIAJmrdjEnAevP7u9So7t5ArlHRRdf?= =?us-ascii?Q?zleMUAk3GjS0Xu4m0vFDS7Ie0jH1xp+j+to+OCoiDMavI1RVkkrRK7UNJbC+?= =?us-ascii?Q?ybywXejVnebrvcO/WYA99g=3D=3D?= X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(136003)(39860400002)(396003)(346002)(376002)(46966006)(40470700004)(36840700001)(316002)(54906003)(2616005)(6636002)(82310400005)(8676002)(70206006)(70586007)(81166007)(37006003)(55016003)(478600001)(36756003)(40480700001)(82740400003)(2906002)(356005)(4326008)(86362001)(6666004)(36860700001)(7696005)(53546011)(336012)(966005)(41300700001)(426003)(6286002)(83380400001)(16526019)(5660300002)(47076005)(26005)(1076003)(40460700003)(6862004)(8936002)(186003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2022 08:24:41.4986 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 54057891-5aaa-4abe-5420-08da6a294b52 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT044.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4274 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 20.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/22/22. 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://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/06375d5c71ad0349621ad3f711d0f9368e7b083a Thanks. Xueming Li --- >From 06375d5c71ad0349621ad3f711d0f9368e7b083a Mon Sep 17 00:00:00 2001 From: Ali Alnubani Date: Wed, 11 May 2022 19:41:09 +0300 Subject: [PATCH] net/mlx5: fix build with clang 14 Cc: Xueming Li [ upstream commit bae645a23a41c7656928b742e0418fbf41095202 ] Use fgets instead of fscanf to resolve the following warning reported by clang 14.0.0 in Fedora 37 (Rawhide): drivers/net/mlx5/linux/mlx5_ethdev_os.c:1137:52: error: 'fscanf' may overflow; destination buffer in argument 3 has size 16, but the corresponding specifier may require size 17 [-Werror,-Wfortify-source] ret = fscanf(file, "%" RTE_STR(IF_NAMESIZE) "s", port_name); Fixes: 63d1db710fbc ("net/mlx5: fix unlimited parsing of switch info") Signed-off-by: Ali Alnubani Acked-by: Thomas Monjalon Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c index e89d16aace..b15fc7e5e0 100644 --- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c @@ -1087,7 +1087,6 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info) bool port_switch_id_set = false; bool device_dir = false; char c; - int ret; if (!if_indextoname(ifindex, ifname)) { rte_errno = errno; @@ -1103,10 +1102,9 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info) file = fopen(phys_port_name, "rb"); if (file != NULL) { - ret = fscanf(file, "%" RTE_STR(IF_NAMESIZE) "s", port_name); - fclose(file); - if (ret == 1) + if (fgets(port_name, IF_NAMESIZE, file) != NULL) mlx5_translate_port_name(port_name, &data); + fclose(file); } file = fopen(phys_switch_id, "rb"); if (file == NULL) { -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-20 15:01:00.300084372 +0800 +++ 0032-net-mlx5-fix-build-with-clang-14.patch 2022-07-20 15:00:58.731000464 +0800 @@ -1 +1 @@ -From bae645a23a41c7656928b742e0418fbf41095202 Mon Sep 17 00:00:00 2001 +From 06375d5c71ad0349621ad3f711d0f9368e7b083a Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit bae645a23a41c7656928b742e0418fbf41095202 ] @@ -16 +18,0 @@ -Cc: stable@dpdk.org @@ -26 +28 @@ -index 8d30ad0994..2a1cf04431 100644 +index e89d16aace..b15fc7e5e0 100644 @@ -29 +31 @@ -@@ -1118,7 +1118,6 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info) +@@ -1087,7 +1087,6 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info) @@ -37 +39 @@ -@@ -1134,10 +1133,9 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info) +@@ -1103,10 +1102,9 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)