svn commit: r335223 - head/sys/dev/cxgbe
Conrad Meyer
cem at freebsd.org
Fri Jun 15 21:20:43 UTC 2018
This seems generally useful, and nothing about the code is specific to
cxgbe. Could it be adapted to be driver-agnostic?
Thanks,
Conrad
On Fri, Jun 15, 2018 at 11:04 AM, Navdeep Parhar <np at freebsd.org> wrote:
> Author: np
> Date: Fri Jun 15 18:04:44 2018
> New Revision: 335223
> URL: https://svnweb.freebsd.org/changeset/base/335223
>
> Log:
> cxgbe(4): sysctls to display the local and intr CPUs for the adapter.
> ...
> +}
> +
> +static int
> +sysctl_cpus(SYSCTL_HANDLER_ARGS)
> +{
>...
> + rc = bus_get_cpus(sc->dev, op, sizeof(cpuset), &cpuset);
> + if (rc != 0)
> + return (rc);
> +
>...
> + CPU_FOREACH(i)
> + sbuf_printf(sb, "%d ", i);
> + rc = sbuf_finish(sb);
> + sbuf_delete(sb);
More information about the svn-src-all
mailing list