History

virtio_net: support per queue interrupt coalesce command

Add interrupt_coalesce config in send_queue and receive_queue to cache user config. Send per virtqueue interrupt moderation config to underlying device in order to have more efficient interrupt moderation and cpu utilization of guest VM. Additionally, address all the VQs when updating the global configuration, as now the individual VQs configuration can diverge from the global configuration.

Gavin Li committed 3 years ago

Commit 394bd871 parent 308d7982 files · +155 −8Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/virtio_net.h+14−0
@@ -56,6 +56,7 @@ · 55 unmodified lines
56#define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow56#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#define VIRTIO_NET_F_VQ_NOTF_COAL 52 /* Device supports virtqueue notification coalescing */
59#define VIRTIO_NET_F_NOTF_COAL 53 /* Device supports notifications coalescing */60#define VIRTIO_NET_F_NOTF_COAL 53 /* Device supports notifications coalescing */
60#define VIRTIO_NET_F_GUEST_USO4 54 /* Guest can handle USOv4 in. */61#define VIRTIO_NET_F_GUEST_USO4 54 /* Guest can handle USOv4 in. */
61#define VIRTIO_NET_F_GUEST_USO6 55 /* Guest can handle USOv6 in. */62#define VIRTIO_NET_F_GUEST_USO6 55 /* Guest can handle USOv6 in. */
@@ -391,5 +392,18 @@ struct virtio_net_ctrl_coal_rx { · 329 unmodified lines
391};392};
392 393
393#define VIRTIO_NET_CTRL_NOTF_COAL_RX_SET 1394#define VIRTIO_NET_CTRL_NOTF_COAL_RX_SET 1
395#define VIRTIO_NET_CTRL_NOTF_COAL_VQ_SET 2
396#define VIRTIO_NET_CTRL_NOTF_COAL_VQ_GET 3
397
398struct virtio_net_ctrl_coal {
399 __le32 max_packets;
400 __le32 max_usecs;
401};
402
403struct virtio_net_ctrl_coal_vq {
404 __le16 vqn;
405 __le16 reserved;
406 struct virtio_net_ctrl_coal coal;
407};
394 408
395#endif /* _UAPI_LINUX_VIRTIO_NET_H */409#endif /* _UAPI_LINUX_VIRTIO_NET_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t