All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
To: dev@dpdk.org
Cc: ohilyard@iol.unh.edu, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] rib: fix the IPv6 depth mask
Date: Mon,  6 Sep 2021 16:54:32 +0100	[thread overview]
Message-ID: <1630943672-362916-1-git-send-email-vladimir.medvedkin@intel.com> (raw)

Fixes: 03b8372a9a73 ("rib: fix max depth IPv6 lookup")
Cc: ohilyard@iol.unh.edu
Cc: stable@dpdk.org

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 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


             reply	other threads:[~2021-09-06 15:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-06 15:54 Vladimir Medvedkin [this message]
2021-10-25 17:14 ` [dpdk-dev] [PATCH] rib: fix the IPv6 depth mask Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1630943672-362916-1-git-send-email-vladimir.medvedkin@intel.com \
    --to=vladimir.medvedkin@intel.com \
    --cc=dev@dpdk.org \
    --cc=ohilyard@iol.unh.edu \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.