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 DFD9545CE3 for ; Mon, 11 Nov 2024 07:34:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D491340685; Mon, 11 Nov 2024 07:34:37 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2082.outbound.protection.outlook.com [40.107.95.82]) by mails.dpdk.org (Postfix) with ESMTP id 9395140685 for ; Mon, 11 Nov 2024 07:34:35 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uqmm6XAUeqq0R3zq0NHgHrQpg384f9MBR6QYAlK1Ve8TbcWZnBSEdgbhy+JuEwBw6pcZDkHE4AfHkeRr2+cuvgA+Eb9fj3jDVD+c0dz3gXxRlUibDs2iUhHxtqEx9sa4B9w7ZsDTpV0GqHbZezbbCNNy6FaT5W7sLVgBNNx+xB5EnSrMEWzXt6FX9q/fG8zwNi4BpuuQQDbXdQaHsd8aSYTbFVRmx4p9VDSwhfgdWt1wk2mUItROQmPpyuqjzlbOZ1CpYmfbEU4GjyGIbwlddrCRDptIj9fCdLA/Vj22NK0uA1dhSrPMbZdHS6OafJ3VdK45Lycta5TZ7dAqHugQYA== 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=GwjFfFel7tB3BbDDI4JpF8Xd0KEeJEm6pG7QCIt1B7k=; b=p+N77F+lGzx+6ElIVzjTEWqBlc02+V/BbDEnhMeI5y/SR8e+m5C5uQFllTDec1cUFFu7UuYnuiftPFVOf2wzijnuYj9dxd2TaB1AKob1u6NXpJ3bKE/sGiCcr3NzdroMwrURU/UyXXjim6m4c5XuKOu10KsaX+a7PUG1MVNsSOtUDkJrtSOriMquP7Y9puWJ6gPtcOxFtKYuLfJEoI3CAS5Fr5hjWfPBTzrBswiDqai25bG3d4Ea0Qq3YLiHjeuGkYNS3+41bKv9oKbATXb/sFW8ESYBUnsf9VkMSdzYQFm+Gq+KugG73WvSVM0SdrH6t634qXka5IfUGZk5ZL23ZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=GwjFfFel7tB3BbDDI4JpF8Xd0KEeJEm6pG7QCIt1B7k=; b=O8m0cpk6yfW0pchtJkY9nHkLCHkucsudg46j/S3VrwXrgZnsNOY7BTaFxCySPv8VKef5yopqjAPt74mnxlCj7J1huLGGowXp4Vcj8msP2dV1Yqt3nNUyVomSbbFyeSdNAmv6uhUEQlBmZtwFl7wApuI5bFfNwvGh5fGmNO+fCpOlVIz2XTh/W3Duw1m4VQWRpvWYSVaPHAIg7/BQPbpZtF1fZbziq3rca5gNLLrY1T+xhGD0h+P0CVPQ2JLqXdQ4A248ILlB/z6/4DHNoq+zBUs23pAaWDBmQm741dpHWx2/M3kaP7V5lng0C92PmuRJtEb3qzjH8A5qEc6flYGhKw== Received: from MN0P223CA0013.NAMP223.PROD.OUTLOOK.COM (2603:10b6:208:52b::15) by CH3PR12MB8512.namprd12.prod.outlook.com (2603:10b6:610:158::19) 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:34:33 +0000 Received: from BN2PEPF000044AA.namprd04.prod.outlook.com (2603:10b6:208:52b:cafe::b5) by MN0P223CA0013.outlook.office365.com (2603:10b6:208:52b::15) 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:34:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN2PEPF000044AA.mail.protection.outlook.com (10.167.243.105) 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:34:32 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) 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:23 -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:21 -0800 From: Xueming Li To: Vladimir Medvedkin CC: , dpdk stable Subject: patch 'fib: fix AVX512 lookup' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:27:38 +0800 Message-ID: <20241111062847.216344-53-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: BN2PEPF000044AA:EE_|CH3PR12MB8512:EE_ X-MS-Office365-Filtering-Correlation-Id: 6ab9bf37-3068-4234-23a8-08dd021ae757 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?+MERTApaHZP/8YtkHuwzDOGpprb6/ghuygf/cVMME5uP+Bj60FuQbmujy0Dn?= =?us-ascii?Q?JbuLy8iLM1j9yFEeI4RiUHM2KPZTIZ085IIeIMAcZWnGj+m2Q8GlDc02Z5rW?= =?us-ascii?Q?mkfxaLr6GI6S6zbSIuT+iBcTu3P+00LdeXCvYK79UsqdhgTj3yhkQI8G+egr?= =?us-ascii?Q?MDDw5/qK3PAtzlUDS5a5z7lLvGShWxhjJ1ZBBlAfp228Cvpxt9gRn/KDj6NT?= =?us-ascii?Q?iFyBqQ4MFOu85gQGXOqjVHgjQzg2H07j209prXyUfBppaLlXsd2RqjBev6AN?= =?us-ascii?Q?5Wb10Qh71NgmUbKLqoiVonMDabpHL/Be5YYf7EDKh1wzN6zZaOL3xQaOq8/6?= =?us-ascii?Q?djg1Ky79zqhbPO1XJ7KLdQwUz/Gzxc16laskC+Mnh28oo8yjCm1HvU7DCe07?= =?us-ascii?Q?LTzgHaKje/lXBfQrvfoxzHyaGbRDoypFhqyo5hUpYa1wUUH9O1h7ywx3H35O?= =?us-ascii?Q?0PfmS79p1XyTpJXlwNEb97a0XSsY/aX7+DwgNGpairkYThuGfN2vf7iD5e4U?= =?us-ascii?Q?M2fXk0rm17FwvyGrOs7TfNJSa9te1boDvZIHUB9BXCHS21Za2ivAM02QzBKK?= =?us-ascii?Q?A7NVVtrpoZIZh4ATF/6pO4rpXmp3ciF52VMf8t5BBbfrGeadfPa0Xm0A2/pX?= =?us-ascii?Q?8yTJCUgtnU2TjiKpHARLM/8hAtaKgGSt4ZxXgqCMgj7z40KJ2qwfRnxj6Uew?= =?us-ascii?Q?xy6Mv4VHhvtJHSBl2iBayOm2MNz1XMFPPyBXOt4SrU5YccVI2BsRsNLFx0Q7?= =?us-ascii?Q?XlcLyHES5ji1iNd2N1KEx33bdx4wOwl7xMgSphc570/wrWMN8XJBHfcGdZbC?= =?us-ascii?Q?0eZPobkZ5PJjzurKQ8DfqYIYE22Y9B+Bi1oqfywVweDTS+fc9HzZNJWBdgwD?= =?us-ascii?Q?8xGNZJkSXGpqO5MNAHW3QJmJIoHecp3AoSIq6QoiblPqnJ8PaMFHF2i3mzE0?= =?us-ascii?Q?8dPi7QrEIWddavdtp1wFw6JjmgvJL1bGlPrIZo0aKvvMao+AYSRcc/ptMTva?= =?us-ascii?Q?nFY3nm60NOpAs0stnzT0MD7f5Z/sqZw9PiPkBIVcmS45+0UgJZr4oete0qzV?= =?us-ascii?Q?iLAD7PEJXB8WtHhB1GA4dCtHQGDoVELSUlcl3eJATodv6y8LI+JMc0bBJszK?= =?us-ascii?Q?BxqbVT/FPtEBiKu6ccjX0/7so28Sxpjijtci45nYljsbLJzFDcsMlMg3dWHJ?= =?us-ascii?Q?YE6FYEaIIwVtsY4mQX6oE+EtFh8f+W1hZNOkHLggXXl48kUcEA3C2TOKijTU?= =?us-ascii?Q?1RiwLCYqHoaBGYW48wQLDpwzuYOwLLIO8mvSsJ0J3cJ7cc9oKqSci/o8ARZU?= =?us-ascii?Q?L34y2n51ribPLbubzni0jh+lOoBvDRT9o7yaCeu1rQu8aTAv+peXw9stNODb?= =?us-ascii?Q?j+2JQVuedkf6AFqQWcDfttkO2g56eOkI8xxRjRN/vWK4XL+Sug=3D=3D?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(36860700013)(376014)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:34:32.8100 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6ab9bf37-3068-4234-23a8-08dd021ae757 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN2PEPF000044AA.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8512 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=c098add6c3bd7d23d304d79c1ce8c3e76368c622 Thanks. Xueming Li --- >From c098add6c3bd7d23d304d79c1ce8c3e76368c622 Mon Sep 17 00:00:00 2001 From: Vladimir Medvedkin Date: Fri, 6 Sep 2024 17:04:36 +0000 Subject: [PATCH] fib: fix AVX512 lookup Cc: Xueming Li [ upstream commit 66ed1786ad067198814e9b2ab54f0cad68a58f1e ] Vector lookup uses gather instructions which loads data in 4byte chunks. This could lead to out of bounds access at the end of the tbl24 in case of 1 or 2 byte entries if e.g. lookup is attempted for 255.255.255.255 in IPv4 case. This patch fixes potential out of bound access by gather instruction allocating an extra 4 byte in the end of the tbl24. Fixes: b3509fa3653e ("fib: add AVX512 lookup") Fixes: 1e5630e40d95 ("fib6: add AVX512 lookup") Signed-off-by: Vladimir Medvedkin --- lib/fib/dir24_8.c | 4 ++-- lib/fib/trie.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/fib/dir24_8.c b/lib/fib/dir24_8.c index c739e92304..07c324743b 100644 --- a/lib/fib/dir24_8.c +++ b/lib/fib/dir24_8.c @@ -526,8 +526,8 @@ dir24_8_create(const char *name, int socket_id, struct rte_fib_conf *fib_conf) snprintf(mem_name, sizeof(mem_name), "DP_%s", name); dp = rte_zmalloc_socket(name, sizeof(struct dir24_8_tbl) + - DIR24_8_TBL24_NUM_ENT * (1 << nh_sz), RTE_CACHE_LINE_SIZE, - socket_id); + DIR24_8_TBL24_NUM_ENT * (1 << nh_sz) + sizeof(uint32_t), + RTE_CACHE_LINE_SIZE, socket_id); if (dp == NULL) { rte_errno = ENOMEM; return NULL; diff --git a/lib/fib/trie.c b/lib/fib/trie.c index 7b33cdaa7b..ca1c2fe3bc 100644 --- a/lib/fib/trie.c +++ b/lib/fib/trie.c @@ -647,8 +647,8 @@ trie_create(const char *name, int socket_id, snprintf(mem_name, sizeof(mem_name), "DP_%s", name); dp = rte_zmalloc_socket(name, sizeof(struct rte_trie_tbl) + - TRIE_TBL24_NUM_ENT * (1 << nh_sz), RTE_CACHE_LINE_SIZE, - socket_id); + TRIE_TBL24_NUM_ENT * (1 << nh_sz) + sizeof(uint32_t), + RTE_CACHE_LINE_SIZE, socket_id); if (dp == NULL) { rte_errno = ENOMEM; return dp; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:07.607431989 +0800 +++ 0052-fib-fix-AVX512-lookup.patch 2024-11-11 14:23:05.122192840 +0800 @@ -1 +1 @@ -From 66ed1786ad067198814e9b2ab54f0cad68a58f1e Mon Sep 17 00:00:00 2001 +From c098add6c3bd7d23d304d79c1ce8c3e76368c622 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 66ed1786ad067198814e9b2ab54f0cad68a58f1e ] @@ -15 +17,0 @@ -Cc: stable@dpdk.org