]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/bnxt/tf_core/lookup3.h
common/mlx5: add Direct Verbs constants for Windows
[dpdk.git] / drivers / net / bnxt / tf_core / lookup3.h
index e5abcc2f2b82e12c8a9e175a1c2e199ce2ac4ba7..743c4d9c4f3ee8ab740c557fab75ed66242ad785 100644 (file)
@@ -122,7 +122,7 @@ static inline uint32_t hashword(const uint32_t *k,
                                size_t length,
                                uint32_t initval) {
        uint32_t a, b, c;
-       int index = 12;
+       int index = length - 1;
 
        /* Set up the internal state */
        a = 0xdeadbeef + (((uint32_t)length) << 2) + initval;
@@ -152,7 +152,6 @@ static inline uint32_t hashword(const uint32_t *k,
                final(a, b, c);
                /* Falls through. */
        case 0:     /* case 0: nothing left to add */
-               /* FALLTHROUGH */
                break;
        }
        /*------------------------------------------------- report the result */