hv_netvsc: Implement set_channels ethtool op
authorAndrew Schwartzmeyer <andschwa@microsoft.com>
Wed, 12 Aug 2015 00:14:32 +0000 (17:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Aug 2015 21:45:38 +0000 (14:45 -0700)
commitb5960e6e2b5c52520cec5888c3feb71b71ba1980
tree57a9d25b41eaaa9852d8209cadccd76c5f1ccf89
parent8ebdcc52b9b8a53e3ba2643f515d41fff44d4743
hv_netvsc: Implement set_channels ethtool op

This enables the use of ethtool --set-channels devname combined N to
change the number of vRSS queues. Separate rx, tx, and other parameters
are not supported. The maximum is rsscap.num_recv_que. It passes the
given value to rndis_filter_device_add through the device_info->num_chn
field.

If the procedure fails, it attempts to recover to the prior state. If
the recovery fails, it logs an error and aborts.

Current num_chn is saved and restored when changing the MTU.

Signed-off-by: Andrew Schwartzmeyer <andschwa@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c