FreeBSD/sys/net/rss_config.c
/*
 * netisr CPU affinity lookup given just the hash and hashtype.
 */
netisr CPU affinity lookup given just the hash and hashtype.
netisr CPU affinity lookup given just the hash and hashtype .
u_int
rss_hash2cpuid(uint32_t hash_val, uint32_t hash_type)
{
	switch (hash_type) {
	case M_HASHTYPE_RSS_IPV4:
	case M_HASHTYPE_RSS_TCP_IPV4:
	case M_HASHTYPE_RSS_UDP_IPV4:
	case M_HASHTYPE_RSS_IPV6:
	case M_HASHTYPE_RSS_TCP_IPV6:
	case M_HASHTYPE_RSS_UDP_IPV6:
		return (rss_getcpu(rss_getbucket(hash_val)));
	default:
		return (NETISR_CPUID_NONE);
	}
}
u_int rss_hash2cpuid ( uint32_t hash_val , uint32_t hash_type ) { switch ( hash_type ) { case M_HASHTYPE_RSS_IPV4 : case M_HASHTYPE_RSS_TCP_IPV4 : case M_HASHTYPE_RSS_UDP_IPV4 : case M_HASHTYPE_RSS_IPV6 : case M_HASHTYPE_RSS_TCP_IPV6 : case M_HASHTYPE_RSS_UDP_IPV6 : return ( rss_getcpu ( rss_getbucket ( hash_val ) ) ) ; default : return ( NETISR_CPUID_NONE ) ; } }
netisr CPU affinity lookup given just the hash and hashtype.
netisr CPU affinity lookup given just the hash and hashtype .