Lines Matching refs:rc
207 struct rss_config *rc = NULL;
209 rc = calloc(1, sizeof(*rc));
210 if (rc == NULL) {
215 rc->rss_ncpus = rss_getsysctlint("net.inet.rss.ncpus");
216 if (rc->rss_ncpus < 0) {
221 rc->rss_nbuckets = rss_getsysctlint("net.inet.rss.buckets");
222 if (rc->rss_nbuckets < 0) {
227 rc->rss_basecpu = rss_getsysctlint("net.inet.rss.basecpu");
228 if (rc->rss_basecpu< 0) {
233 rc->rss_bucket_map = calloc(rc->rss_nbuckets, sizeof(int));
234 if (rc->rss_bucket_map == NULL) {
235 warn("%s: calloc (rss buckets; %d entries)", __func__, rc->rss_nbuckets);
239 if (rss_getbucketmap(rc->rss_bucket_map, rc->rss_nbuckets) != 0) {
244 return (rc);
247 if (rc != NULL) {
248 free(rc->rss_bucket_map);
249 free(rc);
255 rss_config_free(struct rss_config *rc)
258 if ((rc != NULL) && rc->rss_bucket_map)
259 free(rc->rss_bucket_map);
260 if (rc != NULL)
261 free(rc);
265 rss_config_get_bucket_count(struct rss_config *rc)
268 if (rc == NULL)
270 return (rc->rss_nbuckets);
274 rss_get_bucket_cpuset(struct rss_config *rc, rss_bucket_type_t btype,
278 if (bucket < 0 || bucket >= rc->rss_nbuckets) {
294 CPU_SET(rc->rss_bucket_map[bucket], cs);