ip_frag: replace hardcoded value with a macro
authorAnatoly Burakov <anatoly.burakov@intel.com>
Wed, 18 Jun 2014 14:50:32 +0000 (15:50 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 26 Jun 2014 20:50:39 +0000 (22:50 +0200)
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
lib/librte_ip_frag/ip_frag_internal.c

index 219221f..6203740 100644 (file)
@@ -350,7 +350,7 @@ ip_frag_lookup(struct rte_ip_frag_tbl *tbl,
                return (tbl->last);
 
        /* different hashing methods for IPv4 and IPv6 */
-       if (key->key_len == 1)
+       if (key->key_len == IPV4_KEYLEN)
                ipv4_frag_hash(key, &sig1, &sig2);
        else
                ipv6_frag_hash(key, &sig1, &sig2);