aboutsummaryrefslogtreecommitdiff
path: root/include/standard-headers/linux
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2015-07-01 11:36:57 +0200
committerMichael S. Tsirkin <mst@redhat.com>2015-07-08 10:09:56 +0300
commitf56fc2d319b18d5e510988374929188867a5f930 (patch)
treec3a971d9a2374d11ab341bfe68e1e8bacb8326f8 /include/standard-headers/linux
parent220a8846429ac954932e16010efb07af0aba4529 (diff)
virtio_net: reuse constants from linux
VIRTIO_NET_F_CTRL_GUEST_OFFLOADS now appears in the linux header, let's reuse it. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/standard-headers/linux')
-rw-r--r--include/standard-headers/linux/virtio_net.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/standard-headers/linux/virtio_net.h b/include/standard-headers/linux/virtio_net.h
index 3209c90219..a78f33e775 100644
--- a/include/standard-headers/linux/virtio_net.h
+++ b/include/standard-headers/linux/virtio_net.h
@@ -34,6 +34,7 @@
/* The feature bitmap for virtio net */
#define VIRTIO_NET_F_CSUM 0 /* Host handles pkts w/ partial csum */
#define VIRTIO_NET_F_GUEST_CSUM 1 /* Guest handles pkts w/ partial csum */
+#define VIRTIO_NET_F_CTRL_GUEST_OFFLOADS 2 /* Dynamic offload configuration. */
#define VIRTIO_NET_F_MAC 5 /* Host has given MAC address. */
#define VIRTIO_NET_F_GUEST_TSO4 7 /* Guest can handle TSOv4 in. */
#define VIRTIO_NET_F_GUEST_TSO6 8 /* Guest can handle TSOv6 in. */
@@ -226,4 +227,19 @@ struct virtio_net_ctrl_mq {
#define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN 1
#define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX 0x8000
+/*
+ * Control network offloads
+ *
+ * Reconfigures the network offloads that Guest can handle.
+ *
+ * Available with the VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature bit.
+ *
+ * Command data format matches the feature bit mask exactly.
+ *
+ * See VIRTIO_NET_F_GUEST_* for the list of offloads
+ * that can be enabled/disabled.
+ */
+#define VIRTIO_NET_CTRL_GUEST_OFFLOADS 5
+#define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET 0
+
#endif /* _LINUX_VIRTIO_NET_H */