FreeBSD/sys/net/rss_config.c
/*
 * Query the RSS bucket associated with the given hash value and
 * type.
 */
Query the RSS bucket associated with the given hash value and
type.
Query the RSS bucket associated with the given hash value and type .
int
rss_hash2bucket(uint32_t hash_val, uint32_t hash_type, uint32_t *bucket_id)
{
	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:
		*bucket_id = rss_getbucket(hash_val);
		return (0);
	default:
		return (-1);
	}
}
int rss_hash2bucket ( uint32_t hash_val , uint32_t hash_type , uint32_t * bucket_id ) { 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 : * bucket_id = rss_getbucket ( hash_val ) ; return ( 0 ) ; default : return ( -1 ) ; } }
Query the RSS bucket associated with the given hash value and
 type.
Query the RSS bucket associated with the given hash value and type .