virtio_net: ethtool tx napi configuration
authorJason Wang <jasowang@redhat.com>
Tue, 9 Oct 2018 02:06:26 +0000 (10:06 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Oct 2018 05:34:38 +0000 (22:34 -0700)
commit0c465be183c7c57a26446df6ea96d8676b865f92
treea32ec09bd8ecc98c6da27205b0affa070bc55c52
parent1a21cc507bb75954bd8618f193179e2a3f8d9069
virtio_net: ethtool tx napi configuration

Implement ethtool .set_coalesce (-C) and .get_coalesce (-c) handlers.
Interrupt moderation is currently not supported, so these accept and
display the default settings of 0 usec and 1 frame.

Toggle tx napi through setting tx-frames. So as to not interfere
with possible future interrupt moderation, value 1 means tx napi while
value 0 means not.

Only allow the switching when device is down for simplicity.

Link: https://patchwork.ozlabs.org/patch/948149/
Suggested-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c