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 3CBF5A0543 for ; Tue, 21 Jun 2022 10:08:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3868D4281C; Tue, 21 Jun 2022 10:08:14 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2072.outbound.protection.outlook.com [40.107.243.72]) by mails.dpdk.org (Postfix) with ESMTP id 2463842B70 for ; Tue, 21 Jun 2022 10:08:11 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jSpUdvQlGKBJUHaIozVj3p5R6tQhQce91lEjvRXuYAN7r/25ANWPKpHn2CfKSOiMiHTKeI4yZww5mB106JriDBi+CHeLF/NDyBKfIyKRrs3PG7nVFhovBw71t41Qh13spazSSYdvDzZrX2O1BkLuxAEUuK7Q0qY8w6A15E9hP95yLWZhxMGMHDysKjzPo5LDn0jKc19b8epuvMdAhQDLMz2MCYs4DGyi0Q0PoDYadyAcVik4syI7mgqjSvCbXwsRnejarhDqmDpy+5T07MNma0iWGs4hd/G2TU6op4fU0hmWUre1lQ+WxM4hv4/ovmWjmhGdbf5hsWbFrRcRpco7Iw== 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=3kvk7L5pD7LPP5jx+XyX5A8RD5CJ43kWFys62ssW+xE=; b=dzpbE0nHTJ++sEGiLlCAitKe88zJg8s1ExMDQ5FZDITjFgKxROXD12d3uhNpI9HtOHC0ANf/0YSmfiTIui1dMrmFMbP09Buf/jHjD927MXrjHhnQi5M2ufQIreY6YSnSeLkzDGngzMgWjc6sE9ZfBVgf1RNMt0EvzCMpHK6j6PW8ml3/U96Nfy+MK8j13l9CA3syL3if3iTPDc0IWGH+ZGqShsB93YH5Dz0w7BxP3BA4/aOFW2umoeCJJKbbU7BSGgN9uCvcVvWgBwjBG7JD+tQH4Bzom8ieVpZgAOKE+3NmUcQoRqONn3JQgZ5IUayUJBdtTViVaPuUTUqFilLtFg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.235) 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=3kvk7L5pD7LPP5jx+XyX5A8RD5CJ43kWFys62ssW+xE=; b=hmU3NwzMMzgUNrEfuVyBFEhp+hlJzBPKZmy8faXptbu9TwJGS6RVfsyHkYyZ9g3PHf3dxSI0BlUblsR21ZpjOiR6Fa6m+rfWTLMn7IPDsYS+VkgnDxpXaR5jlDkVLW+syZy/Zxvnl+NrRwEeB3fMZDAWVg/+Yl6D/PoqaxFwff4xx+SgmhemQYkQ7Ah6dtvac6JSZjShv1Tizzjhnp7BKn/8eXaBLTuWclS6QBH3t+7dQnIn+kBi4kj4eLPR5FP1/EKzlwKmjLwwZgZoWuPAdKtBB7KwIA+ACy4fRyV0y2Fgt11wZd2RI4+vgaSFpMk45QRm7GX0SUHOaN+RAwatog== Received: from MWHPR13CA0005.namprd13.prod.outlook.com (2603:10b6:300:16::15) by MN2PR12MB3199.namprd12.prod.outlook.com (2603:10b6:208:ae::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.20; Tue, 21 Jun 2022 08:08:09 +0000 Received: from CO1NAM11FT034.eop-nam11.prod.protection.outlook.com (2603:10b6:300:16:cafe::88) by MWHPR13CA0005.outlook.office365.com (2603:10b6:300:16::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.9 via Frontend Transport; Tue, 21 Jun 2022 08:08:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.235) 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.235 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.235; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.235) by CO1NAM11FT034.mail.protection.outlook.com (10.13.174.248) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:08:08 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:08:08 +0000 Received: from nvidia.com (10.126.230.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.22; Tue, 21 Jun 2022 01:08:06 -0700 From: Xueming Li To: Stephen Hemminger CC: Vladimir Medvedkin , dpdk stable Subject: patch 'rib: fix traversal with /32 route' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:02:05 +0300 Message-ID: <20220621080301.2315720-60-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.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: c01ccb79-0304-40e2-1f68-08da535d2db3 X-MS-TrafficTypeDiagnostic: MN2PR12MB3199:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7310vMqNL+wZnHzdEhgeSseipB04FCBNnapLCyeOdfSrgaoCzjOLfJ+uW+xMdRybnrCh37Nkm+E0AazrEl0w2wnMWvGZ2fa+1CfJxAfermyVyvdKjxL0//bUAOLrbF8pIc4Zs+GCtTwuu+3C2M/JFIK9mK5DVuc3f3eZQuUYwMda2SKtc2ZXJOsyUK1HN5VV8Ug0djx7zPZjuOYLYWlHJghg7KBdkcoLh3ycmo/njoo7yyTMaEk33kGfO4VBtr5nPc1FTsIptksuzaTTWomJxddz/3X5fetarUHWnFrzDKB0l0DQ/JlhXcqrBiLhb/mfzYCs6zzmqjPdOBxYTOYBIMiCWKWpAOO1ms7P3VXF5PgzUluKRhKkbQcvY8AkUKMYtruGMkRSvRYLn3cnMuh50inZYDca46aKsm8vqjC5a6oHTIICiaWMaKAqhsRq4Gw/IA2NJjHK4R6oYR2TyUyokVrA1pop4r5E4MsXDFiRCKCTJIn/27nDMdIgdNSbYkwdhwx2x2lrYpoNq6Ku3KJmDwgigAe7t9sJNEO4G0HWbJh+T0Hfq1NSEIDB1kWHUpHImkz+MnfUQztk3MPom/hwtPw4OR+DznAzpkIsty7OnIChM7JdFC4/BQlfDdyk93qj9pQX5IcIqZeXhnC43xQuam7ydOqQIiKCS0ZWR/9fmCwzJcLJdTNnK9/mt/TS8sPC/ffRZTO6YowApZf0daqQqx5XgZ94vR6JwvphK5MtNgyGXpHxN2R6SzzMZK98E5WmOakb+pff99/ncFbKKwDUE7CMQJJcRNNS12bALzGLXKoPrsKx4WCkxoYFM9v38dq3iQBHHGJCT8PR+CA7ivCrJddENUKJLZpiN6G2US+r864= X-Forefront-Antispam-Report: CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(346002)(376002)(136003)(396003)(39860400002)(36840700001)(46966006)(40470700004)(40460700003)(36860700001)(82310400005)(86362001)(81166007)(478600001)(966005)(316002)(5660300002)(2906002)(41300700001)(82740400003)(8936002)(40480700001)(70206006)(186003)(426003)(16526019)(70586007)(356005)(6916009)(36756003)(54906003)(1076003)(47076005)(8676002)(336012)(4326008)(55016003)(26005)(6286002)(7696005)(53546011)(2616005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:08:08.9030 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c01ccb79-0304-40e2-1f68-08da535d2db3 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.235]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT034.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3199 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 06/23/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/52822a9dd80a3d9bfb1fbc7103a0661d6b1dde6d Thanks. Xueming Li --- >From 52822a9dd80a3d9bfb1fbc7103a0661d6b1dde6d Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 14 Apr 2022 13:01:04 -0700 Subject: [PATCH] rib: fix traversal with /32 route Cc: Xueming Li [ upstream commit 1b984e98a3fd00e607ec14b8b9299a2f14698dc3 ] If a /32 route is entered in the RIB the code to traverse will not see end of the tree. This is due to trying to do a negative shift which is an undefined in C. Fix by checking for max depth as is already done in rib6. Fixes: 5a5793a5ffa2 ("rib: add RIB library") Signed-off-by: Stephen Hemminger Acked-by: Vladimir Medvedkin --- lib/librte_rib/rte_rib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/librte_rib/rte_rib.c b/lib/librte_rib/rte_rib.c index 6c29e1c49a..1a4b10d728 100644 --- a/lib/librte_rib/rte_rib.c +++ b/lib/librte_rib/rte_rib.c @@ -73,6 +73,8 @@ is_covered(uint32_t ip1, uint32_t ip2, uint8_t depth) static inline struct rte_rib_node * get_nxt_node(struct rte_rib_node *node, uint32_t ip) { + if (node->depth == RIB_MAXDEPTH) + return NULL; return (ip & (1 << (31 - node->depth))) ? node->right : node->left; } -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:51.994924532 +0800 +++ 0059-rib-fix-traversal-with-32-route.patch 2022-06-21 15:37:49.077784727 +0800 @@ -1 +1 @@ -From 1b984e98a3fd00e607ec14b8b9299a2f14698dc3 Mon Sep 17 00:00:00 2001 +From 52822a9dd80a3d9bfb1fbc7103a0661d6b1dde6d Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 1b984e98a3fd00e607ec14b8b9299a2f14698dc3 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org @@ -18 +20 @@ - lib/rib/rte_rib.c | 2 ++ + lib/librte_rib/rte_rib.c | 2 ++ @@ -21,5 +23,5 @@ -diff --git a/lib/rib/rte_rib.c b/lib/rib/rte_rib.c -index cd9e823068..0603980cab 100644 ---- a/lib/rib/rte_rib.c -+++ b/lib/rib/rte_rib.c -@@ -71,6 +71,8 @@ is_covered(uint32_t ip1, uint32_t ip2, uint8_t depth) +diff --git a/lib/librte_rib/rte_rib.c b/lib/librte_rib/rte_rib.c +index 6c29e1c49a..1a4b10d728 100644 +--- a/lib/librte_rib/rte_rib.c ++++ b/lib/librte_rib/rte_rib.c +@@ -73,6 +73,8 @@ is_covered(uint32_t ip1, uint32_t ip2, uint8_t depth)