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 3B54642D98; Fri, 30 Jun 2023 19:10:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2CFC842BDA; Fri, 30 Jun 2023 19:10:49 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 8FCD040EDB; Fri, 30 Jun 2023 19:10:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688145046; x=1719681046; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=OG8qnCAQcaTXETqPbEdDGTW5ZspETKQbtR/zfP80+f4=; b=UOVFPS4HtpKgvMmpcpwWJhhsCKlqcUi54PTgpc6SHxeJR1CcNNuWNvXX lgLh3BXusF8GOtAOLfXv6H3grXy9YqxnuCmqDEAPDQ3ZKHRlNxx2wZ62z ZDMp+Xhsaub2nDDYYXMVNPCokaWweUiFLXlhxYHdf3kkefq+Vr8K35yF+ PVkIWNovhbfDhglIW7ueUqlk1ucHbeHT1742a0xoQ5hhGjQaB5cusiAxz p8nsPIHtQaaCNV6pSKifGMn4wNAoOnU5TOllmhOnwyGXX6DujGfBdpWcr kVrOYqK39bsnxfwOZhE6y6FO2Pbfnm27KgXuamUaGy5fnifZeE89JHdj+ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10757"; a="361295733" X-IronPort-AV: E=Sophos;i="6.01,171,1684825200"; d="scan'208";a="361295733" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2023 10:10:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10757"; a="668021666" X-IronPort-AV: E=Sophos;i="6.01,171,1684825200"; d="scan'208";a="668021666" Received: from silpixa00401176.ir.intel.com (HELO silpixa00401176.ger.corp.intel.com) ([10.237.222.204]) by orsmga003.jf.intel.com with ESMTP; 30 Jun 2023 10:10:44 -0700 From: Vladimir Medvedkin To: dev@dpdk.org Cc: stable@dpdk.org Subject: [PATCH] fib: fix adding a default route Date: Fri, 30 Jun 2023 17:10:35 +0000 Message-Id: <20230630171035.32984-1-vladimir.medvedkin@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Fixed an issue that occurs when adding a default route as the first route. Bugzilla ID: 1160 Fixes: 7dc7868b200d ("fib: add DIR24-8 dataplane algorithm") Cc: stable@dpdk.org Signed-off-by: Vladimir Medvedkin --- lib/fib/dir24_8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fib/dir24_8.c b/lib/fib/dir24_8.c index a8ba4f64ca..e77575d62c 100644 --- a/lib/fib/dir24_8.c +++ b/lib/fib/dir24_8.c @@ -390,7 +390,7 @@ modify_fib(struct dir24_8_tbl *dp, struct rte_rib *rib, uint32_t ip, (uint32_t)(1ULL << (32 - tmp_depth)); } else { redge = ip + (uint32_t)(1ULL << (32 - depth)); - if (ledge == redge) + if ((ledge == redge) && (ledge != 0)) break; ret = install_to_fib(dp, ledge, redge, next_hop); -- 2.25.1