net: virtio_net: notifications coalescing support
authorAlvaro Karsz <alvaro.karsz@solid-run.com>
Mon, 18 Jul 2022 09:11:02 +0000 (12:11 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 11 Aug 2022 08:26:07 +0000 (04:26 -0400)
commit699b045a8e43bd1063db4795be685bfd659649dc
tree1f640e7f3fc7e8c3a77ad42bf4ee7a7f019562ea
parent95bf9798779af166b1d6d184d794834214a1a261
net: virtio_net: notifications coalescing support

New VirtIO network feature: VIRTIO_NET_F_NOTF_COAL.

Control a Virtio network device notifications coalescing parameters
using the control virtqueue.

A device that supports this fetature can receive
VIRTIO_NET_CTRL_NOTF_COAL control commands.

- VIRTIO_NET_CTRL_NOTF_COAL_TX_SET:
  Ask the network device to change the following parameters:
  - tx_usecs: Maximum number of usecs to delay a TX notification.
  - tx_max_packets: Maximum number of packets to send before a
    TX notification.

- VIRTIO_NET_CTRL_NOTF_COAL_RX_SET:
  Ask the network device to change the following parameters:
  - rx_usecs: Maximum number of usecs to delay a RX notification.
  - rx_max_packets: Maximum number of packets to receive before a
    RX notification.

VirtIO spec. patch:
https://lists.oasis-open.org/archives/virtio-comment/202206/msg00100.html

Signed-off-by: Alvaro Karsz <alvaro.karsz@solid-run.com>
Message-Id: <20220718091102.498774-1-alvaro.karsz@solid-run.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Jason Wang <jasowang@redhat.com>
drivers/net/virtio_net.c
include/uapi/linux/virtio_net.h