Changeset View
Changeset View
Standalone View
Standalone View
sys/net/rss_config.c
Context not available. | |||||
__DECONST(int *, &rss_basecpu), 0, "RSS base CPU"); | __DECONST(int *, &rss_basecpu), 0, "RSS base CPU"); | ||||
/* | /* | ||||
* Print verbose debugging messages. | |||||
* 0 - disable | |||||
* non-zero - enable | |||||
*/ | |||||
int rss_debug = 0; | |||||
SYSCTL_INT(_net_inet_rss, OID_AUTO, debug, CTLFLAG_RWTUN, &rss_debug, 0, | |||||
"RSS debug level"); | |||||
/* | |||||
* RSS secret key, intended to prevent attacks on load-balancing. Its | * RSS secret key, intended to prevent attacks on load-balancing. Its | ||||
* effectiveness may be limited by algorithm choice and available entropy | * effectiveness may be limited by algorithm choice and available entropy | ||||
* during the boot. | * during the boot. | ||||
Context not available. | |||||
break; | break; | ||||
default: | default: | ||||
printf("%s: invalid RSS hashalgo %u, coercing to %u", | RSS_DEBUG(5, "invalid RSS hashalgo %u, coercing to %u\n", | ||||
__func__, rss_hashalgo, RSS_HASH_TOEPLITZ); | rss_hashalgo, RSS_HASH_TOEPLITZ); | ||||
rss_hashalgo = RSS_HASH_TOEPLITZ; | rss_hashalgo = RSS_HASH_TOEPLITZ; | ||||
} | } | ||||
Context not available. | |||||
* ones. | * ones. | ||||
*/ | */ | ||||
if (rss_bits == 0 || rss_bits > RSS_MAXBITS) { | if (rss_bits == 0 || rss_bits > RSS_MAXBITS) { | ||||
printf("%s: RSS bits %u not valid, coercing to %u", | RSS_DEBUG(5, "RSS bits %u not valid, coercing to %u\n", | ||||
__func__, rss_bits, RSS_MAXBITS); | rss_bits, RSS_MAXBITS); | ||||
rss_bits = RSS_MAXBITS; | rss_bits = RSS_MAXBITS; | ||||
} | } | ||||
Context not available. | |||||
*/ | */ | ||||
rss_buckets = (1 << rss_bits); | rss_buckets = (1 << rss_bits); | ||||
if (rss_buckets < rss_ncpus) | if (rss_buckets < rss_ncpus) | ||||
printf("%s: WARNING: rss_buckets (%u) less than " | RSS_DEBUG(5, "WARNING: rss_buckets (%u) less than " | ||||
"rss_ncpus (%u)\n", __func__, rss_buckets, | "rss_ncpus (%u)\n", rss_buckets, rss_ncpus); | ||||
rss_ncpus); | |||||
rss_mask = rss_buckets - 1; | rss_mask = rss_buckets - 1; | ||||
} else { | } else { | ||||
rss_bits = 0; | rss_bits = 0; | ||||
Context not available. |