diff mbox series

rib: fix the IPv6 depth mask

Message ID 1630943672-362916-1-git-send-email-vladimir.medvedkin@intel.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers show
Series rib: fix the IPv6 depth mask | expand


Context Check Description
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/checkpatch success coding style OK

Commit Message

Medvedkin, Vladimir Sept. 6, 2021, 3:54 p.m. UTC
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 mbox series


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