DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] rib: fix the IPv6 depth mask
@ 2021-09-06 15:54 Vladimir Medvedkin
  2021-10-25 17:14 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Medvedkin @ 2021-09-06 15:54 UTC (permalink / raw)
  To: dev; +Cc: ohilyard, stable

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-25 17:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06 15:54 [dpdk-dev] [PATCH] rib: fix the IPv6 depth mask Vladimir Medvedkin
2021-10-25 17:14 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).