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 BF8B7A0C55 for ; Mon, 6 Sep 2021 17:54:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B2684410FC; Mon, 6 Sep 2021 17:54:42 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 53304410E9; Mon, 6 Sep 2021 17:54:38 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10099"; a="305558092" X-IronPort-AV: E=Sophos;i="5.85,272,1624345200"; d="scan'208";a="305558092" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2021 08:54:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,272,1624345200"; d="scan'208";a="464087234" Received: from silpixa00400072.ir.intel.com ([10.237.222.213]) by fmsmga007.fm.intel.com with ESMTP; 06 Sep 2021 08:54:36 -0700 From: Vladimir Medvedkin To: dev@dpdk.org Cc: ohilyard@iol.unh.edu, stable@dpdk.org Date: Mon, 6 Sep 2021 16:54:32 +0100 Message-Id: <1630943672-362916-1-git-send-email-vladimir.medvedkin@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-stable] [PATCH] rib: fix the IPv6 depth mask 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 Sender: "stable" Fixes: 03b8372a9a73 ("rib: fix max depth IPv6 lookup") Cc: ohilyard@iol.unh.edu Cc: stable@dpdk.org Signed-off-by: Vladimir Medvedkin --- lib/rib/rte_rib6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rib/rte_rib6.c b/lib/rib/rte_rib6.c index 96424e9..b00c7fb 100644 --- a/lib/rib/rte_rib6.c +++ b/lib/rib/rte_rib6.c @@ -88,7 +88,7 @@ get_dir(const uint8_t ip[RTE_RIB6_IPV6_ADDR_SIZE], uint8_t depth) * is incremented in blocks of 8 (1 byte). This means the last * 3 bits are irrelevant to what the index of ip should be. */ - index = (depth & (UINT8_MAX - 1)) / CHAR_BIT; + index = (depth & INT8_MAX) / CHAR_BIT; /* * msk is the bitmask used to extract the bit used to decide the -- 2.7.4