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

Function sysctl_rss_bucket_mapping

freebsd/net/rss_config.c:528–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

526 "", "RSS keying material");
527
528static int
529sysctl_rss_bucket_mapping(SYSCTL_HANDLER_ARGS)
530{
531 struct sbuf *sb;
532 int error;
533 int i;
534
535 error = 0;
536 error = sysctl_wire_old_buffer(req, 0);
537 if (error != 0)
538 return (error);
539 sb = sbuf_new_for_sysctl(NULL, NULL, 512, req);
540 if (sb == NULL)
541 return (ENOMEM);
542 for (i = 0; i < rss_buckets; i++) {
543 sbuf_printf(sb, "%s%d:%d", i == 0 ? "" : " ",
544 i,
545 rss_getcpu(i));
546 }
547 error = sbuf_finish(sb);
548 sbuf_delete(sb);
549
550 return (error);
551}
552SYSCTL_PROC(_net_inet_rss, OID_AUTO, bucket_mapping,
553 CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0,
554 sysctl_rss_bucket_mapping, "", "RSS bucket -> CPU mapping");

Callers

nothing calls this directly

Calls 6

sysctl_wire_old_bufferFunction · 0.85
sbuf_new_for_sysctlFunction · 0.85
sbuf_printfFunction · 0.85
rss_getcpuFunction · 0.85
sbuf_finishFunction · 0.85
sbuf_deleteFunction · 0.85

Tested by

no test coverage detected