diff options
author | dim <dim@FreeBSD.org> | 2015-09-06 22:05:55 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-09-06 22:05:55 +0000 |
commit | 0c1fa3e6ad5b7fd602181bc094d752a27ea34568 (patch) | |
tree | d34068aa6ef95b9bc5d6b21eecab74939200433a /sys/netinet6/ip6_input.c | |
parent | fe6d24a2c11b8f1f6a6abb515a55ff47926356a5 (diff) | |
download | FreeBSD-src-0c1fa3e6ad5b7fd602181bc094d752a27ea34568.zip FreeBSD-src-0c1fa3e6ad5b7fd602181bc094d752a27ea34568.tar.gz |
Merge ^/head r287502 through r287526.
Diffstat (limited to 'sys/netinet6/ip6_input.c')
-rw-r--r-- | sys/netinet6/ip6_input.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 328a296..fc38168 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -93,6 +93,7 @@ __FBSDID("$FreeBSD$"); #include <net/if_dl.h> #include <net/route.h> #include <net/netisr.h> +#include <net/rss_config.h> #include <net/pfil.h> #include <net/vnet.h> @@ -1349,6 +1350,44 @@ ip6_savecontrol(struct inpcb *in6p, struct mbuf *m, struct mbuf **mp) loopend: ; } + + if (in6p->inp_flags2 & INP_RECVFLOWID) { + uint32_t flowid, flow_type; + + flowid = m->m_pkthdr.flowid; + flow_type = M_HASHTYPE_GET(m); + + /* + * XXX should handle the failure of one or the + * other - don't populate both? + */ + *mp = sbcreatecontrol((caddr_t) &flowid, + sizeof(uint32_t), IPV6_FLOWID, IPPROTO_IPV6); + if (*mp) + mp = &(*mp)->m_next; + *mp = sbcreatecontrol((caddr_t) &flow_type, + sizeof(uint32_t), IPV6_FLOWTYPE, IPPROTO_IPV6); + if (*mp) + mp = &(*mp)->m_next; + } + +#ifdef RSS + if (in6p->inp_flags2 & INP_RECVRSSBUCKETID) { + uint32_t flowid, flow_type; + uint32_t rss_bucketid; + + flowid = m->m_pkthdr.flowid; + flow_type = M_HASHTYPE_GET(m); + + if (rss_hash2bucket(flowid, flow_type, &rss_bucketid) == 0) { + *mp = sbcreatecontrol((caddr_t) &rss_bucketid, + sizeof(uint32_t), IPV6_RSSBUCKETID, IPPROTO_IPV6); + if (*mp) + mp = &(*mp)->m_next; + } + } +#endif + } #undef IS2292 |