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 6DD51431A0 for ; Thu, 19 Oct 2023 02:01:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6743840A7A; Thu, 19 Oct 2023 02:01:33 +0200 (CEST) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mails.dpdk.org (Postfix) with ESMTP id 3C5A24113D for ; Thu, 19 Oct 2023 02:01:30 +0200 (CEST) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-407c3adef8eso18930875e9.2 for ; Wed, 18 Oct 2023 17:01:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697673690; x=1698278490; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UickjFRCLJn0+KAbcna6651wq8XVbgUMApik+4NO/iA=; b=fZtnjok0eDsXmwcjuXOuOXLknxGnwY/Y+1lsa4vwQwHlWagUDNfdrQ1OWisIuSsjGq O3grx1KXsxAHHAEDEChMPVossm/XTHPgRQiexBRqekdZHRLGPXdmiNruHdj0RBbcAj+y bCuFRJxqTQfgvtyLh70pmh1wSD0/M19clygm6V4lPbZ6Pn3OMvN+JrMHtlVjCFurVyzi xBZ4SGN4/tpkWUXhhob+oLHxxblt5fRhpvIxAKU85VLw4Ewn0fqCLMitgOwcZOwHbHa8 eOBIyafYUKpflvIU+2JIJNXjogYlbv21jOAkSXbBtVJ3ftGsnFw7qKp0ozzL3VNUvq0H qNBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697673690; x=1698278490; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UickjFRCLJn0+KAbcna6651wq8XVbgUMApik+4NO/iA=; b=o08INMD286s6LtF3mQk6ajjdXM2oqq7VIFHmseQaFJ3RqvUnmLFk/DWwErWd02sAJS iH+myIRHDExlpDW0lwB9+4ndI4MGbQ3jlnMWi2agpOFl3jqrnx/JAhfbMDLPziI5Xg+c 7DLDgVEJe8zKBDHsoVu6pM4hDy/QNf5fULCBt3FoodY2Bbw//F/TlU/rQWIxcEZ7sTV+ JNLXxK5lgZ6GGY210CoXrqdTqzNXVuVQx0v1v+g5m7xVHb/p+zsPnwq2Sno3drAC5+1e At5krzIvoZCLDxqcqmnCWMSdDnzAsH+10Ovf3fqtJufjJqCd4X5icE1YdgW0DFvb2XZA VbDQ== X-Gm-Message-State: AOJu0Yy9d2Ihb0V3VNr2X2HAfOLNi/B9UtsaLSRUmvKoAYNlz2p3boky njZbFo9C9SX0Z4z+A7pp2lsaoBtecIWekBYd X-Google-Smtp-Source: AGHT+IHzB397rCTOcNXBI+L9+scftcSue2XJcrFU4TpAhHqZqgO5bA86xanyZ9c5bNNE+KyVIWluoQ== X-Received: by 2002:a05:600c:3788:b0:401:db82:3edf with SMTP id o8-20020a05600c378800b00401db823edfmr520135wmr.39.1697673689858; Wed, 18 Oct 2023 17:01:29 -0700 (PDT) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id v18-20020a05600c15d200b004063d8b43e7sm2901000wmf.48.2023.10.18.17.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 17:01:29 -0700 (PDT) From: luca.boccassi@gmail.com To: Vladimir Medvedkin Cc: dpdk stable Subject: patch 'fib: fix adding default route overwriting entire table' has been queued to stable release 20.11.10 Date: Thu, 19 Oct 2023 00:59:27 +0100 Message-Id: <20231018235930.3144-38-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231018235930.3144-1-luca.boccassi@gmail.com> References: <20231018235930.3144-1-luca.boccassi@gmail.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 20.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/21/23. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/a4698a6616f1f78d7d817c331f7d0239d04c9224 Thanks. Luca Boccassi --- >From a4698a6616f1f78d7d817c331f7d0239d04c9224 Mon Sep 17 00:00:00 2001 From: Vladimir Medvedkin Date: Mon, 2 Oct 2023 15:11:48 +0000 Subject: [PATCH] fib: fix adding default route overwriting entire table [ upstream commit ab1b927cd73e96643cfe93dc2493d03c737b59ae ] When FIB contains any route covering last IP address (255.255.255.255), upon adding a new default route the entire FIB table will be overwritten with corresponding default route next hop. Previous fix added check for ledge against 0 for case if default route is added as a first route, however this check was also erroneously triggered in case when ledge was wrapped around the address space (this would happen if FIB contains any route covering last possible address - 255.255.255.255). This fix prevents wrap around from happening. Fixes: 880bc2b5f3bd ("fib: fix adding default route") Signed-off-by: Vladimir Medvedkin --- lib/librte_fib/dir24_8.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_fib/dir24_8.c b/lib/librte_fib/dir24_8.c index 181ed03dee..49407ba638 100644 --- a/lib/librte_fib/dir24_8.c +++ b/lib/librte_fib/dir24_8.c @@ -392,6 +392,12 @@ modify_fib(struct dir24_8_tbl *dp, struct rte_rib *rib, uint32_t ip, return ret; ledge = redge + (uint32_t)(1ULL << (32 - tmp_depth)); + /* + * we got to the end of address space + * and wrapped around + */ + if (ledge == 0) + break; } else { redge = ip + (uint32_t)(1ULL << (32 - depth)); if (ledge == redge && ledge != 0) -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-10-19 00:28:58.154503944 +0100 +++ 0038-fib-fix-adding-default-route-overwriting-entire-tabl.patch 2023-10-19 00:28:56.305806847 +0100 @@ -1 +1 @@ -From ab1b927cd73e96643cfe93dc2493d03c737b59ae Mon Sep 17 00:00:00 2001 +From a4698a6616f1f78d7d817c331f7d0239d04c9224 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ab1b927cd73e96643cfe93dc2493d03c737b59ae ] + @@ -21 +22,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ - lib/fib/dir24_8.c | 6 ++++++ + lib/librte_fib/dir24_8.c | 6 ++++++ @@ -28,5 +29,5 @@ -diff --git a/lib/fib/dir24_8.c b/lib/fib/dir24_8.c -index a61897667b..c739e92304 100644 ---- a/lib/fib/dir24_8.c -+++ b/lib/fib/dir24_8.c -@@ -388,6 +388,12 @@ modify_fib(struct dir24_8_tbl *dp, struct rte_rib *rib, uint32_t ip, +diff --git a/lib/librte_fib/dir24_8.c b/lib/librte_fib/dir24_8.c +index 181ed03dee..49407ba638 100644 +--- a/lib/librte_fib/dir24_8.c ++++ b/lib/librte_fib/dir24_8.c +@@ -392,6 +392,12 @@ modify_fib(struct dir24_8_tbl *dp, struct rte_rib *rib, uint32_t ip,