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
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -56,7 +56,7 @@ · 55 unmodified lines | |||
| 56 | #define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow | 56 | #define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow |
| 57 | * Steering */ | 57 | * Steering */ |
| 58 | #define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */ | 58 | #define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */ |
| 59 | 59 | #define VIRTIO_NET_F_NOTF_COAL 53 /* Guest can handle notifications coalescing */ | |
| 60 | #define VIRTIO_NET_F_HASH_REPORT 57 /* Supports hash report */ | 60 | #define VIRTIO_NET_F_HASH_REPORT 57 /* Supports hash report */ |
| 61 | #define VIRTIO_NET_F_RSS 60 /* Supports RSS RX steering */ | 61 | #define VIRTIO_NET_F_RSS 60 /* Supports RSS RX steering */ |
| 62 | #define VIRTIO_NET_F_RSC_EXT 61 /* extended coalescing info */ | 62 | #define VIRTIO_NET_F_RSC_EXT 61 /* extended coalescing info */ |
| @@ -355,4 +355,36 @@ struct virtio_net_hash_config { · 292 unmodified lines | |||
| 355 | #define VIRTIO_NET_CTRL_GUEST_OFFLOADS 5 | 355 | #define VIRTIO_NET_CTRL_GUEST_OFFLOADS 5 |
| 356 | #define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET 0 | 356 | #define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET 0 |
| 357 | 357 | ||
| 358 | /* | ||
| 359 | * Control notifications coalescing. | ||
| 360 | * | ||
| 361 | * Request the device to change the notifications coalescing parameters. | ||
| 362 | * | ||
| 363 | * Available with the VIRTIO_NET_F_NOTF_COAL feature bit. | ||
| 364 | */ | ||
| 365 | #define VIRTIO_NET_CTRL_NOTF_COAL 6 | ||
| 366 | /* | ||
| 367 | * Set the tx-usecs/tx-max-packets patameters. | ||
| 368 | * tx-usecs - Maximum number of usecs to delay a TX notification. | ||
| 369 | * tx-max-packets - Maximum number of packets to send before a TX notification. | ||
| 370 | */ | ||
| 371 | struct virtio_net_ctrl_coal_tx { | ||
| 372 | __le32 tx_max_packets; | ||
| 373 | __le32 tx_usecs; | ||
| 374 | }; | ||
| 375 | |||
| 376 | #define VIRTIO_NET_CTRL_NOTF_COAL_TX_SET 0 | ||
| 377 | |||
| 378 | /* | ||
| 379 | * Set the rx-usecs/rx-max-packets patameters. | ||
| 380 | * rx-usecs - Maximum number of usecs to delay a RX notification. | ||
| 381 | * rx-max-frames - Maximum number of packets to receive before a RX notification. | ||
| 382 | */ | ||
| 383 | struct virtio_net_ctrl_coal_rx { | ||
| 384 | __le32 rx_max_packets; | ||
| 385 | __le32 rx_usecs; | ||
| 386 | }; | ||
| 387 | |||
| 388 | #define VIRTIO_NET_CTRL_NOTF_COAL_RX_SET 1 | ||
| 389 | |||
| 358 | #endif /* _UAPI_LINUX_VIRTIO_NET_H */ | 390 | #endif /* _UAPI_LINUX_VIRTIO_NET_H */ |