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 BC4D0431D5 for ; Sun, 22 Oct 2023 16:32:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AFACD4069F; Sun, 22 Oct 2023 16:32:15 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2077.outbound.protection.outlook.com [40.107.220.77]) by mails.dpdk.org (Postfix) with ESMTP id 3EAA0402EA for ; Sun, 22 Oct 2023 16:32:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E6Os5czpXQGz8yUCLBr37RqZthNrA8XxlsutGDNgro2f3B2jqX0OENlWfin5tqKSl5VCVVDnBf1slzcsu8CwFHtub4ZTLxzJBFzit8aC5XXF6KmuiI2hJik26VCi8q1l6nKilBimnqxBS6Bxm4ugwLe/pF50ocSsQK1QHv0O4yxm0+++GM1zgQnFwFp1Fpg8BY4c70h7UYI7xyKAg+chnaHiWL/JA/xo874TSy/4QSctEBjyuybvWubsYdifqmL8VGErLx+4rnYWxFXJOMKRq+vXSRgPsS7S0t5G+0ybNxLvwnoegxSqGbGxfiw9aqJueNwc5T+PC6rTQ2Z9WjlN7Q== 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=e0XYM5yE8z0XQGzNCjq1fD8+vWEFjlzzt8mDlrlgqmk=; b=AZnCT4cETI/qZioGyeslhOlKxUticrwYAcwkxBv6HL+NNDSstEYLq116Ox0vRWCBEwrZbp7Vj5veb/pYWdcJ/K20GWbVBO3Xto2TKyH7u3yhIJXH/iwKtvMwJisVZQlkIZDxAwpgrmYqJxZ9Zu83iYFveyyzol6qoGTdhkYRR0pflgQzROyFy/9Hmnx3Cg2fvnnqjNmPFvcFVa7I6ghYHhG0FwkplepjouUOBp5Z/aifsoPljjX1RmeHTijBKJJbNJkfj+UqiuRxmubI2+VYKzDuQ2riHETD2gCEOrK6EeHEgZ6Y6xf1BZBEhNUFxHyickZwbtpgWycMfCvbZ40TBQ== 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 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=e0XYM5yE8z0XQGzNCjq1fD8+vWEFjlzzt8mDlrlgqmk=; b=fHPlXolFRvNbLI90hTm7M3YjXMm4+ol9WfLKyfC52ASwO6NHz/F9MHM93+iZnmeXLsWzcwrtXmUFU/IEJd0iDKlS8OkPhIa/VSuysNQMoML0E8N4GtgXTzYLKifp5whExQcpPcfHJNbZGH+5ebka8mbKJig1lvuTQZVQe3Xsdzr5GodPk9hePueVXTBO+iZ0sAcZ+KZxFAAKv9V1Z8QXu/UfwmFlG7kGPNz6cfc7MKnTIsYUXf1pkJFAgJW0927mxiEiUTWr+3z1fCCoFGRKNVOf1DDmAVl7+ibIJ6n+lb/O70lnRb1PJ6DK4v8GU18GfSeSbjEM80YB9Qq9AMWRkw== Received: from BLAPR05CA0028.namprd05.prod.outlook.com (2603:10b6:208:335::9) by PH7PR12MB7456.namprd12.prod.outlook.com (2603:10b6:510:20f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.26; Sun, 22 Oct 2023 14:32:10 +0000 Received: from BL02EPF0001A0FF.namprd03.prod.outlook.com (2603:10b6:208:335:cafe::3a) by BLAPR05CA0028.outlook.office365.com (2603:10b6:208:335::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.15 via Frontend Transport; Sun, 22 Oct 2023 14:32:10 +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 BL02EPF0001A0FF.mail.protection.outlook.com (10.167.242.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.15 via Frontend Transport; Sun, 22 Oct 2023 14:32:10 +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.986.41; Sun, 22 Oct 2023 07:31:55 -0700 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.41; Sun, 22 Oct 2023 07:31:54 -0700 From: Xueming Li To: Vladimir Medvedkin CC: dpdk stable Subject: patch 'fib6: fix adding default route as first route' has been queued to stable release 22.11.4 Date: Sun, 22 Oct 2023 22:22:13 +0800 Message-ID: <20231022142250.10324-105-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231022142250.10324-1-xuemingl@nvidia.com> References: <20231022142250.10324-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: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0001A0FF:EE_|PH7PR12MB7456:EE_ X-MS-Office365-Filtering-Correlation-Id: a9e89f02-0cfe-4675-da9a-08dbd30bad21 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0PtWkb5a0CcW0Nkk9kgHupVVFLoLQRoHu3WKPoUDGd/lZg1g3nYjpDqMCl+IVQ0pEVjA5QY9ugtEo9XUx6aG5lkjYP8PyFWFfBxAzb3++CAC8NCFzzA8aD37uVg+HFc6kn3MfcQxil9JjNqJpzax1jXxl/yehKmI6HnYTshZxA77BmZDw+q9hmHEEvuaozv3WiaE/IW8RNj4reqtmpUv/korK8DCiTOfXD1p8ConS5qu0ksq5IhXWCMbNHyiJlt7Hsi63RcIA4mqviUFP8doi4PqeUAHu5JRnV2bpxQb+1rgMHzLAG3qp3PjsxyY2ysfSZyO0clTXYOWuDzk08DAGusnT992gpLyhyk8detIxut5Cqyu/pXSJxcvm440qSLU7+HD6vMnA0KJ+Fmhx3q6WEL8vH4pIU5JldJxzhg9b9gdsDn45C7+H+QV71M9Twb7GzyA0Z343NaniYaD0bRBY+kGhhyg+yP/YnaflkYUTcxn0GmJ58PhZf3DdQebCwVwpG5hkX5fB99Kp6A+ibOk8ZhI1dAyBojijBwsuJ4Z9o3RLASO33uZovIQ0RY3JqE7E9Mjtmg2HHaLghzuHcw7SW7GV6nPkRR9e4S/go471I5Yk1Zs5kWNlhDXd+BnHyJWWyp0tSOHkATsMlF7zsGfd3zuODoPCUoCAJfIgHxiMr8JTIfq77uREKpwu6Ij+VmEb9lPvZDFBsdAKMgRcJqyXeiWUI2EGY7twfCuD4XTq/ixJMhUvn+9uNC4Y+JHUP4w7V8THE8luKB46SyfWdoRoJ+IueYNV0gf1P00r90hEww= 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:(13230031)(4636009)(396003)(346002)(136003)(376002)(39860400002)(230922051799003)(451199024)(1800799009)(186009)(82310400011)(64100799003)(36840700001)(46966006)(40470700004)(40480700001)(36860700001)(55016003)(36756003)(40460700003)(426003)(41300700001)(26005)(6286002)(2616005)(4001150100001)(2906002)(1076003)(8676002)(4326008)(86362001)(8936002)(16526019)(336012)(7636003)(82740400003)(356005)(83380400001)(47076005)(6666004)(7696005)(53546011)(5660300002)(6916009)(316002)(70206006)(478600001)(966005)(70586007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2023 14:32:10.3803 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a9e89f02-0cfe-4675-da9a-08dbd30bad21 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: BL02EPF0001A0FF.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7456 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 22.11.4 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/15/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=c6b2c85ca46d331f2eb448ab58b212d233726086 Thanks. Xueming Li --- >From c6b2c85ca46d331f2eb448ab58b212d233726086 Mon Sep 17 00:00:00 2001 From: Vladimir Medvedkin Date: Mon, 2 Oct 2023 15:12:01 +0000 Subject: [PATCH] fib6: fix adding default route as first route Cc: Xueming Li [ upstream commit fd66617c5774a2869cbb69f86494d1b4803890fc ] Currently when adding default route as first route it is not added and no error is reported. When we enter the loop over an address range in the general case we will eventually reach the check for when the range has ended, and exit the loop. However when adding default route as first route, since address range covered begins and ends at zero this also triggers loop exit without writing to the table. Fixed by adding check for default route, i.e. both ledge and redge are equal to 0::0. Bugzilla ID: 1272 Fixes: c3e12e0f0354 ("fib: add dataplane algorithm for IPv6") Signed-off-by: Vladimir Medvedkin --- lib/fib/trie.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/fib/trie.c b/lib/fib/trie.c index 3e780afdaf..09470e7287 100644 --- a/lib/fib/trie.c +++ b/lib/fib/trie.c @@ -451,6 +451,14 @@ get_nxt_net(uint8_t *ip, uint8_t depth) } } +static int +v6_addr_is_zero(const uint8_t ip[RTE_FIB6_IPV6_ADDR_SIZE]) +{ + uint8_t ip_addr[RTE_FIB6_IPV6_ADDR_SIZE] = {0}; + + return rte_rib6_is_equal(ip, ip_addr); +} + static int modify_dp(struct rte_trie_tbl *dp, struct rte_rib6 *rib, const uint8_t ip[RTE_FIB6_IPV6_ADDR_SIZE], @@ -484,11 +492,19 @@ modify_dp(struct rte_trie_tbl *dp, struct rte_rib6 *rib, return ret; get_nxt_net(redge, tmp_depth); rte_rib6_copy_addr(ledge, redge); + /* + * we got to the end of address space + * and wrapped around + */ + if (v6_addr_is_zero(ledge)) + break; } else { rte_rib6_copy_addr(redge, ip); get_nxt_net(redge, depth); - if (rte_rib6_is_equal(ledge, redge)) + if (rte_rib6_is_equal(ledge, redge) && + !v6_addr_is_zero(ledge)) break; + ret = install_to_dp(dp, ledge, redge, next_hop); if (ret != 0) -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-10-22 22:17:38.157739900 +0800 +++ 0104-fib6-fix-adding-default-route-as-first-route.patch 2023-10-22 22:17:34.376723700 +0800 @@ -1 +1 @@ -From fd66617c5774a2869cbb69f86494d1b4803890fc Mon Sep 17 00:00:00 2001 +From c6b2c85ca46d331f2eb448ab58b212d233726086 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit fd66617c5774a2869cbb69f86494d1b4803890fc ] @@ -20 +22,0 @@ -Cc: stable@dpdk.org