Re: [PATCH v2 3/6] ethtool: introduce new ioctl for per-queue settings

2019-02-08 Thread Willem de Bruijn
On Fri, Feb 8, 2019 at 2:04 AM Michal Kubecek wrote: > > On Thu, Feb 07, 2019 at 11:37:19PM +, Nunley, Nicholas D wrote: > > From: Michal Kubecek [mailto:mkube...@suse.cz] > > > On Tue, Feb 05, 2019 at 04:01:03PM -0800, Jeff Kirsher wrote: > > > > Introduce a new ioctl for setting per-queue pa

Re: [PATCH v2 3/6] ethtool: introduce new ioctl for per-queue settings

2019-02-07 Thread Michal Kubecek
On Thu, Feb 07, 2019 at 11:37:19PM +, Nunley, Nicholas D wrote: > From: Michal Kubecek [mailto:mkube...@suse.cz] > > On Tue, Feb 05, 2019 at 04:01:03PM -0800, Jeff Kirsher wrote: > > > Introduce a new ioctl for setting per-queue parameters. > > > Users can apply commands to specific queues by s

RE: [PATCH v2 3/6] ethtool: introduce new ioctl for per-queue settings

2019-02-07 Thread Nunley, Nicholas D
bject: Re: [PATCH v2 3/6] ethtool: introduce new ioctl for per-queue > settings > > On Tue, Feb 05, 2019 at 04:01:03PM -0800, Jeff Kirsher wrote: > > +static int do_perqueue(struct cmd_context *ctx) { > > + __u32 > queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)] = {0

RE: [PATCH v2 3/6] ethtool: introduce new ioctl for per-queue settings

2019-02-07 Thread Nunley, Nicholas D
bject: Re: [PATCH v2 3/6] ethtool: introduce new ioctl for per-queue > settings > > On Tue, Feb 05, 2019 at 04:01:03PM -0800, Jeff Kirsher wrote: > > +static int find_max_num_queues(struct cmd_context *ctx) { > > + struct ethtool_channels echannels; > > + > > +

RE: [PATCH v2 3/6] ethtool: introduce new ioctl for per-queue settings

2019-02-07 Thread Nunley, Nicholas D
bject: Re: [PATCH v2 3/6] ethtool: introduce new ioctl for per-queue > settings > > On Tue, Feb 05, 2019 at 04:01:03PM -0800, Jeff Kirsher wrote: > > Introduce a new ioctl for setting per-queue parameters. > > Users can apply commands to specific queues by setting SUB_COMMAND &g

Re: [PATCH v2 3/6] ethtool: introduce new ioctl for per-queue settings

2019-02-06 Thread Michal Kubecek
On Tue, Feb 05, 2019 at 04:01:03PM -0800, Jeff Kirsher wrote: > +static int do_perqueue(struct cmd_context *ctx) > +{ > + __u32 queue_mask[__KERNEL_DIV_ROUND_UP(MAX_NUM_QUEUE, 32)] = {0}; > + int i, n_queues = 0; > + > + if (ctx->argc == 0) > + exit_bad_args(); > + > + /

Re: [PATCH v2 3/6] ethtool: introduce new ioctl for per-queue settings

2019-02-06 Thread Michal Kubecek
On Tue, Feb 05, 2019 at 04:01:03PM -0800, Jeff Kirsher wrote: > +static int find_max_num_queues(struct cmd_context *ctx) > +{ > + struct ethtool_channels echannels; > + > + echannels.cmd = ETHTOOL_GCHANNELS; > + if (send_ioctl(ctx, &echannels)) > + return -1; > + > + ret

Re: [PATCH v2 3/6] ethtool: introduce new ioctl for per-queue settings

2019-02-06 Thread Michal Kubecek
On Tue, Feb 05, 2019 at 04:01:03PM -0800, Jeff Kirsher wrote: > Introduce a new ioctl for setting per-queue parameters. > Users can apply commands to specific queues by setting SUB_COMMAND and > queue_mask with the following ethtool command: > > ethtool --set-perqueue-command DEVNAME [queue_mask