FreeBSD/sys/netinet6/in6_rss.c
/*
 * Similar to rss_m2cpuid, but designed to be used by the IPv6 NETISR
 * on incoming frames.
 *
 * If an existing RSS hash exists and it matches what the configured
 * hashing is, then use it.
 *
 * If there's an existing RSS hash but the desired hash is different,
 * or if there's no useful RSS hash, then calculate it via
 * the software path.
 *
 * XXX TODO: definitely want statistics here!
 */
Similar to rss_m2cpuid, but designed to be used by the IPv6 NETISR
on incoming frames.

If an existing RSS hash exists and it matches what the configured
hashing is, then use it.

If there's an existing RSS hash but the desired hash is different,
or if there's no useful RSS hash, then calculate it via
the software path.

XXX TODO: definitely want statistics here!
Similar to rss_m2cpuid but designed to be used by the IPv6 NETISR on incoming frames . If an existing RSS hash exists and it matches what the configured hashing is then use it . If there ' s an existing RSS hash but the desired hash is different or if there ' s no useful RSS hash then calculate it via the software path . XXX TODO : definitely want statistics here!
struct mbuf *
rss_soft_m2cpuid_v6(struct mbuf *m, uintptr_t source, u_int *cpuid)
{
	uint32_t hash_val, hash_type;
	int ret;
	M_ASSERTPKTHDR(m);
	ret = rss_mbuf_software_hash_v6(m, RSS_HASH_PKT_INGRESS,
	    &hash_val, &hash_type);
	if (ret > 0) {
		*cpuid = rss_hash2cpuid(m->m_pkthdr.flowid, M_HASHTYPE_GET(m));
	} else if (ret == 0) {
		m->m_pkthdr.flowid = hash_val;
		M_HASHTYPE_SET(m, hash_type);
		*cpuid = rss_hash2cpuid(m->m_pkthdr.flowid, M_HASHTYPE_GET(m));
	} else { 
		*cpuid = NETISR_CPUID_NONE;
	}
	return (m);
}
struct mbuf * rss_soft_m2cpuid_v6 ( struct mbuf * m , uintptr_t source , u_int * cpuid ) { uint32_t hash_val , hash_type ; int ret ; M_ASSERTPKTHDR ( m ) ; ret = rss_mbuf_software_hash_v6 ( m , RSS_HASH_PKT_INGRESS , & hash_val , & hash_type ) ; if ( ret > 0 ) { * cpuid = rss_hash2cpuid ( m -> m_pkthdr . flowid , M_HASHTYPE_GET ( m ) ) ; } else if ( ret == 0 ) { m -> m_pkthdr . flowid = hash_val ; M_HASHTYPE_SET ( m , hash_type ) ; * cpuid = rss_hash2cpuid ( m -> m_pkthdr . flowid , M_HASHTYPE_GET ( m ) ) ; } else { * cpuid = NETISR_CPUID_NONE ; } return ( m ) ; }
Similar to rss_m2cpuid, but designed to be used by the IPv6 NETISR
 on incoming frames.
Similar to rss_m2cpuid but designed to be used by the IPv6 NETISR on incoming frames .
/* mbuf has a valid hash already; don't need to modify it */ /* hash was done; update */ /* ret < 0 */ /* no hash was done */