MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rss_hash2cpuid

Function rss_hash2cpuid

freebsd/net/rss_config.c:356–371  ·  view source on GitHub ↗

* netisr CPU affinity lookup given just the hash and hashtype. */

Source from the content-addressed store, hash-verified

354 * netisr CPU affinity lookup given just the hash and hashtype.
355 */
356u_int
357rss_hash2cpuid(uint32_t hash_val, uint32_t hash_type)
358{
359
360 switch (hash_type) {
361 case M_HASHTYPE_RSS_IPV4:
362 case M_HASHTYPE_RSS_TCP_IPV4:
363 case M_HASHTYPE_RSS_UDP_IPV4:
364 case M_HASHTYPE_RSS_IPV6:
365 case M_HASHTYPE_RSS_TCP_IPV6:
366 case M_HASHTYPE_RSS_UDP_IPV6:
367 return (rss_getcpu(rss_getbucket(hash_val)));
368 default:
369 return (NETISR_CPUID_NONE);
370 }
371}
372
373/*
374 * Query the RSS bucket associated with the given hash value and

Callers 6

inp_to_cpuidFunction · 0.85
rss_soft_m2cpuid_v4Function · 0.85
hpts_cpuidFunction · 0.85
rss_soft_m2cpuid_v6Function · 0.85
ktls_get_cpuFunction · 0.85
rss_m2cpuidFunction · 0.85

Calls 2

rss_getcpuFunction · 0.85
rss_getbucketFunction · 0.85

Tested by

no test coverage detected