summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorsephe <sephe@FreeBSD.org>2016-06-07 04:51:50 +0000
committersephe <sephe@FreeBSD.org>2016-06-07 04:51:50 +0000
commit7acd138965d96ffd22d5af9e51a5cc261951eb6a (patch)
tree8816b0f75c831a8e5070bc0b18af1929b457914e /sys/net
parentbe6cf145bec7e3658cd25477592f21b906de159e (diff)
downloadFreeBSD-src-7acd138965d96ffd22d5af9e51a5cc261951eb6a.zip
FreeBSD-src-7acd138965d96ffd22d5af9e51a5cc261951eb6a.tar.gz
net: Use M_HASHTYPE_OPAQUE_HASH if the mbuf flowid has hash properties
Reviewed by: hps, erj, tuexen Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6688
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/flowtable.c2
-rw-r--r--sys/net/if_vxlan.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/flowtable.c b/sys/net/flowtable.c
index 35aff00..b837a8e 100644
--- a/sys/net/flowtable.c
+++ b/sys/net/flowtable.c
@@ -689,7 +689,7 @@ flowtable_lookup(sa_family_t sa, struct mbuf *m, struct route *ro)
return (EHOSTUNREACH);
if (M_HASHTYPE_GET(m) == M_HASHTYPE_NONE) {
- M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE);
+ M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE_HASH);
m->m_pkthdr.flowid = fle->f_hash;
}
diff --git a/sys/net/if_vxlan.c b/sys/net/if_vxlan.c
index a5631fc..f830b06 100644
--- a/sys/net/if_vxlan.c
+++ b/sys/net/if_vxlan.c
@@ -2237,8 +2237,7 @@ vxlan_pick_source_port(struct vxlan_softc *sc, struct mbuf *m)
range = sc->vxl_max_port - sc->vxl_min_port + 1;
/* check if flowid is set and not opaque */
- if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE &&
- M_HASHTYPE_GET(m) != M_HASHTYPE_OPAQUE)
+ if (M_HASHTYPE_ISHASH(m))
hash = m->m_pkthdr.flowid;
else
hash = jenkins_hash(m->m_data, ETHER_HDR_LEN,
OpenPOWER on IntegriCloud