aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/virtio_net.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h
index 2470f541af50..848e3584d7c8 100644
--- a/include/uapi/linux/virtio_net.h
+++ b/include/uapi/linux/virtio_net.h
@@ -51,6 +51,8 @@
51#define VIRTIO_NET_F_CTRL_RX_EXTRA 20 /* Extra RX mode control support */ 51#define VIRTIO_NET_F_CTRL_RX_EXTRA 20 /* Extra RX mode control support */
52#define VIRTIO_NET_F_GUEST_ANNOUNCE 21 /* Guest can announce device on the 52#define VIRTIO_NET_F_GUEST_ANNOUNCE 21 /* Guest can announce device on the
53 * network */ 53 * network */
54#define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow
55 * Steering */
54 56
55#define VIRTIO_NET_S_LINK_UP 1 /* Link is up */ 57#define VIRTIO_NET_S_LINK_UP 1 /* Link is up */
56#define VIRTIO_NET_S_ANNOUNCE 2 /* Announcement is needed */ 58#define VIRTIO_NET_S_ANNOUNCE 2 /* Announcement is needed */
@@ -60,6 +62,11 @@ struct virtio_net_config {
60 __u8 mac[6]; 62 __u8 mac[6];
61 /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */ 63 /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */
62 __u16 status; 64 __u16 status;
65 /* Maximum number of each of transmit and receive queues;
66 * see VIRTIO_NET_F_MQ and VIRTIO_NET_CTRL_MQ.
67 * Legal values are between 1 and 0x8000
68 */
69 __u16 max_virtqueue_pairs;
63} __attribute__((packed)); 70} __attribute__((packed));
64 71
65/* This is the first element of the scatter-gather list. If you don't 72/* This is the first element of the scatter-gather list. If you don't
@@ -166,4 +173,24 @@ struct virtio_net_ctrl_mac {
166#define VIRTIO_NET_CTRL_ANNOUNCE 3 173#define VIRTIO_NET_CTRL_ANNOUNCE 3
167 #define VIRTIO_NET_CTRL_ANNOUNCE_ACK 0 174 #define VIRTIO_NET_CTRL_ANNOUNCE_ACK 0
168 175
176/*
177 * Control Receive Flow Steering
178 *
179 * The command VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET
180 * enables Receive Flow Steering, specifying the number of the transmit and
181 * receive queues that will be used. After the command is consumed and acked by
182 * the device, the device will not steer new packets on receive virtqueues
183 * other than specified nor read from transmit virtqueues other than specified.
184 * Accordingly, driver should not transmit new packets on virtqueues other than
185 * specified.
186 */
187struct virtio_net_ctrl_mq {
188 u16 virtqueue_pairs;
189};
190
191#define VIRTIO_NET_CTRL_MQ 4
192 #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET 0
193 #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN 1
194 #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX 0x8000
195
169#endif /* _LINUX_VIRTIO_NET_H */ 196#endif /* _LINUX_VIRTIO_NET_H */