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 E3B08A0540 for ; Thu, 7 Jul 2022 09:56:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE63040DDE; Thu, 7 Jul 2022 09:56:51 +0200 (CEST) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 46E2040A7B for ; Thu, 7 Jul 2022 09:56:50 +0200 (CEST) Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 1FB9E40A90 for ; Thu, 7 Jul 2022 07:56:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180610; bh=lcLCLJhuRkrf5iVbnUJagCuyl4yApnY59ckJEaMfa1M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=q0XX7eYMpHVlguIBuSv48xASRnQsmJSE/Ie7BK5pVltyAC+ktxYCxfibNWN7ntmWa HtDqPRWS5ajaGfOTqZvdtYLffO7juqjpC+wvXkx9dCsmNAmrLKvtzBaPLLuUA8MVh5 PRKLoYtV48XKSwe6v+T4rklFTPqcP6O5Qozha5+mCHg9Pe5RfI+2nwpFvWEIVxqKnw oaujy6GbBcF5z+XFFyqLhc5HRNqprlEPgdQx4BArr2d97Hh7yhwCx/V7pAa0CAp/nD /QXCZaRyCAk2a4he+GYyCwZZQvpwJT76HdRMRRoh4z7QNuRQSjeOXA1t0YSOQ6hVFp Zxb4JUGfW607g== Received: by mail-ej1-f69.google.com with SMTP id gr1-20020a170906e2c100b006fefea3ec0aso4432399ejb.14 for ; Thu, 07 Jul 2022 00:56:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lcLCLJhuRkrf5iVbnUJagCuyl4yApnY59ckJEaMfa1M=; b=PiwMztZD9c5nVLGYe7TdSNqJ2cBEgKILqAXjOn/pEIeBg3FkxQcocHdzDCtpoCGZSD zhvYj67dm1WS1jQWrkmoBbfjm8sPub14XXEIPa8XsBkdTOg29/CYguYVX29AQKLqq0GN aThFA9Mrv9aVxM/VCgZVZ6PkXwMGl6juPjr3gsgHqTaAI7RJ5trFjNS1rr0NL2Jtj82m kwtjsAhRXAlLkfMBGOSQlCbHekbOQfQXtTdgqM862inQfCd797sNpJFHsS/JnI6+1TTe J/YZ763l9yf8sCV7jHsVztWzfWlLNDD/fONU8W/uvia55is2bgl1SufYmGjbxCtZH8rT ZHxQ== X-Gm-Message-State: AJIora9U7nC96CL82YRMxzMGnlytrxhdTclWmCtJNdlBJbDWqBh9ILgi dLmwMxKuduYum5gSCk0TD29qQW1w/RhYb0C7955Htg0zGp84TL4G9cuZCbCBwB9/kDSbtUILqni 7k/Np5BL1fzh5LviWUsOByMGL X-Received: by 2002:a17:906:519b:b0:722:e854:dfc2 with SMTP id y27-20020a170906519b00b00722e854dfc2mr43593624ejk.331.1657180609276; Thu, 07 Jul 2022 00:56:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uXh3PnrIHcezdoSs5vRtT/U+3jTVxu2rmj+J3oUd6Y+J+qydIFCOXI27kZY1WO91L3JcgIQA== X-Received: by 2002:a17:906:519b:b0:722:e854:dfc2 with SMTP id y27-20020a170906519b00b00722e854dfc2mr43593610ejk.331.1657180609024; Thu, 07 Jul 2022 00:56:49 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id eq26-20020a056402299a00b0043a26e3db72sm9957123edb.54.2022.07.07.00.56.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:56:48 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Stephen Hemminger Cc: Vladimir Medvedkin , dpdk stable Subject: patch 'rib: fix traversal with /32 route' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:54:23 +0200 Message-Id: <20220707075522.194223-28-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 19.11.13 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/09/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/ec69d489241a77d433218fb0c0692fe19b8899d3 Thanks. Christian Ehrhardt --- >From ec69d489241a77d433218fb0c0692fe19b8899d3 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 [ 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 07b3c068ed..b502317f93 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.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:12.401403657 +0200 +++ 0028-rib-fix-traversal-with-32-route.patch 2022-07-07 09:54:10.841823851 +0200 @@ -1 +1 @@ -From 1b984e98a3fd00e607ec14b8b9299a2f14698dc3 Mon Sep 17 00:00:00 2001 +From ec69d489241a77d433218fb0c0692fe19b8899d3 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 1b984e98a3fd00e607ec14b8b9299a2f14698dc3 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -18 +19 @@ - lib/rib/rte_rib.c | 2 ++ + lib/librte_rib/rte_rib.c | 2 ++ @@ -21,5 +22,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 07b3c068ed..b502317f93 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)