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 245CB42DC3 for ; Mon, 3 Jul 2023 17:43:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1D6F042BFE; Mon, 3 Jul 2023 17:43:43 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id A5C6340ED5; Mon, 3 Jul 2023 17:43:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688399021; x=1719935021; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4jyBSydEKR0SVpchiCl6XmKr1t5+9E6jpUurWSDJTq0=; b=bFVYmXdvFDjqJSFxNcZPwysH1Sp5QBUqpS02FctgMb5dTSqcXX+ViiiS 14BraXiNX/q8zJJa30fd4kA8eKVRvHSI51oTg32Ed5ZGFa5Yj9CByZliX Yp6rB3FQkv6aas/vjfaUlhlvdgdRnmMDAMBm76EpBpzYIZB9kr2BOnFgb zhVfOBc+t0X8YvHW0OljHYztjnRfKwwQJO9qXJSbd/qRFNMc2DLEP3lM/ R5rp/p0g7KykQRMM/mPOcSzGdvs8RLDDzdGRLtc8VRMOlasZirEZuZ0VA U+u9ZJFXy59Q6X5eKnOKbESvHWHX58+ZFt+y1mgmS+5yFPhuZ7VW0F1wd Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10760"; a="449286645" X-IronPort-AV: E=Sophos;i="6.01,178,1684825200"; d="scan'208";a="449286645" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2023 08:43:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10760"; a="831864502" X-IronPort-AV: E=Sophos;i="6.01,178,1684825200"; d="scan'208";a="831864502" Received: from silpixa00401176.ir.intel.com (HELO silpixa00401176.ger.corp.intel.com) ([10.237.222.204]) by fmsmga002.fm.intel.com with ESMTP; 03 Jul 2023 08:43:38 -0700 From: Vladimir Medvedkin To: dev@dpdk.org Cc: stephen@networkplumber.org, stable@dpdk.org Subject: [PATCH] fib: fix adding a default route Date: Mon, 3 Jul 2023 15:43:35 +0000 Message-Id: <20230703154335.69883-1-vladimir.medvedkin@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230630171035.32984-1-vladimir.medvedkin@intel.com> References: <20230630171035.32984-1-vladimir.medvedkin@intel.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 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 --- v2: - remove unnecessary parenthesis --- 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..3efdcb533c 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