Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet6/in6_pcbgroup.c
Show All 31 Lines | |||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include "opt_inet6.h" | #include "opt_inet6.h" | ||||
#include "opt_rss.h" | #include "opt_rss.h" | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/mbuf.h> | #include <sys/mbuf.h> | ||||
#include <net/rss_config.h> | |||||
#include <netinet/in.h> | #include <netinet/in.h> | ||||
#include <netinet/in_pcb.h> | #include <netinet/in_pcb.h> | ||||
#include <netinet/in_rss.h> | #include <netinet6/in6_rss.h> | ||||
bz: Outside #ifdef INET6 | |||||
#ifdef INET6 | #ifdef INET6 | ||||
#include <netinet6/in6_pcb.h> | #include <netinet6/in6_pcb.h> | ||||
#endif /* INET6 */ | #endif /* INET6 */ | ||||
/* | /* | ||||
* Given a hash of whatever the covered tuple might be, return a pcbgroup | * Given a hash of whatever the covered tuple might be, return a pcbgroup | ||||
* index. Where RSS is supported, try to align bucket selection with RSS CPU | * index. Where RSS is supported, try to align bucket selection with RSS CPU | ||||
* affinity strategy. | * affinity strategy. | ||||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | in6_pcbgroup_bytuple(struct inpcbinfo *pcbinfo, const struct in6_addr *laddrp, | ||||
/* | /* | ||||
* RSS note: we pass foreign addr/port as source, and local addr/port | * RSS note: we pass foreign addr/port as source, and local addr/port | ||||
* as destination, as we want to align with what the hardware is | * as destination, as we want to align with what the hardware is | ||||
* doing. | * doing. | ||||
*/ | */ | ||||
switch (pcbinfo->ipi_hashfields) { | switch (pcbinfo->ipi_hashfields) { | ||||
case IPI_HASHFIELDS_4TUPLE: | case IPI_HASHFIELDS_4TUPLE: | ||||
#ifdef RSS | #ifdef RSS | ||||
hash = rss_hash_ip6_4tuple(*faddrp, fport, *laddrp, lport); | hash = rss_hash_ip6_4tuple(faddrp, fport, laddrp, lport); | ||||
#else | #else | ||||
hash = faddrp->s6_addr32[3] ^ fport; | hash = faddrp->s6_addr32[3] ^ fport; | ||||
#endif | #endif | ||||
break; | break; | ||||
case IPI_HASHFIELDS_2TUPLE: | case IPI_HASHFIELDS_2TUPLE: | ||||
#ifdef RSS | #ifdef RSS | ||||
hash = rss_hash_ip6_2tuple(*faddrp, *laddrp); | hash = rss_hash_ip6_2tuple(faddrp, laddrp); | ||||
#else | #else | ||||
hash = faddrp->s6_addr32[3] ^ laddrp->s6_addr32[3]; | hash = faddrp->s6_addr32[3] ^ laddrp->s6_addr32[3]; | ||||
#endif | #endif | ||||
break; | break; | ||||
default: | default: | ||||
hash = 0; | hash = 0; | ||||
} | } | ||||
Show All 24 Lines |
Outside #ifdef INET6