diff options
author | adrian <adrian@FreeBSD.org> | 2014-12-31 22:52:43 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2014-12-31 22:52:43 +0000 |
commit | 06c1511222c2634e60b2b997582869fd01901440 (patch) | |
tree | 2620d3031f532e46e873e3d0198bbfbf6440c05c /sys/netinet6 | |
parent | 0f65758efe597093a0c3052f75df5cf16fc305f8 (diff) | |
download | FreeBSD-src-06c1511222c2634e60b2b997582869fd01901440.zip FreeBSD-src-06c1511222c2634e60b2b997582869fd01901440.tar.gz |
Migrate the RSS IPv6 hash code to use pointers to the v6 addresses
rather than passing them in by value.
The eventual aim is to do incremental hash construction rather than
all of the memcpy()'ing into a contiguous buffer for the hash
function, which does show up as taking quite a bit of CPU during
profiling.
Tested:
* a variety of laptops/desktop setups I have, with v6 connectivity
Differential Revision: D1404
Reviewed by: bz, rpaulo
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6_pcbgroup.c | 4 | ||||
-rw-r--r-- | sys/netinet6/udp6_usrreq.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet6/in6_pcbgroup.c b/sys/netinet6/in6_pcbgroup.c index 204370d..45773ed 100644 --- a/sys/netinet6/in6_pcbgroup.c +++ b/sys/netinet6/in6_pcbgroup.c @@ -105,7 +105,7 @@ in6_pcbgroup_bytuple(struct inpcbinfo *pcbinfo, const struct in6_addr *laddrp, switch (pcbinfo->ipi_hashfields) { case IPI_HASHFIELDS_4TUPLE: #ifdef RSS - hash = rss_hash_ip6_4tuple(*faddrp, fport, *laddrp, lport); + hash = rss_hash_ip6_4tuple(faddrp, fport, laddrp, lport); #else hash = faddrp->s6_addr32[3] ^ fport; #endif @@ -113,7 +113,7 @@ in6_pcbgroup_bytuple(struct inpcbinfo *pcbinfo, const struct in6_addr *laddrp, case IPI_HASHFIELDS_2TUPLE: #ifdef RSS - hash = rss_hash_ip6_2tuple(*faddrp, *laddrp); + hash = rss_hash_ip6_2tuple(faddrp, laddrp); #else hash = faddrp->s6_addr32[3] ^ laddrp->s6_addr32[3]; #endif diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 30089d2..fc6b6a0 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -841,7 +841,7 @@ udp6_output(struct inpcb *inp, struct mbuf *m, struct sockaddr *addr6, * XXX .. and we should likely cache this in the inpcb. */ #ifdef RSS - m->m_pkthdr.flowid = rss_hash_ip6_2tuple(*faddr, *laddr); + m->m_pkthdr.flowid = rss_hash_ip6_2tuple(faddr, laddr); M_HASHTYPE_SET(m, M_HASHTYPE_RSS_IPV6); #endif flags = 0; |