]> Git Repo - qemu.git/commitdiff
virtio_net: reuse constants from linux
authorMichael S. Tsirkin <[email protected]>
Wed, 1 Jul 2015 09:36:57 +0000 (11:36 +0200)
committerMichael S. Tsirkin <[email protected]>
Wed, 8 Jul 2015 07:09:56 +0000 (10:09 +0300)
VIRTIO_NET_F_CTRL_GUEST_OFFLOADS now appears in the
linux header, let's reuse it.

Signed-off-by: Michael S. Tsirkin <[email protected]>
include/hw/virtio/virtio-net.h
include/standard-headers/linux/virtio_net.h

index 280dacfbe97e1c57f0a7120eaab95f0492f4d614..60b11d5c2cc9ccf7e753846c61bfffdb1889c147 100644 (file)
@@ -21,9 +21,6 @@
 #define VIRTIO_NET(obj) \
         OBJECT_CHECK(VirtIONet, (obj), TYPE_VIRTIO_NET)
 
-#define VIRTIO_NET_F_CTRL_GUEST_OFFLOADS 2 /* Control channel offload
-                                         * configuration support */
-
 #define TX_TIMER_INTERVAL 150000 /* 150 us */
 
 /* Limit the number of packets that can be sent via a single flush
@@ -100,15 +97,6 @@ typedef struct VirtIONet {
     int announce_counter;
 } VirtIONet;
 
-/*
- * Control network offloads
- *
- * Dynamic offloads are available with the
- * VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature bit.
- */
-#define VIRTIO_NET_CTRL_GUEST_OFFLOADS   5
-#define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET        0
-
 void virtio_net_set_netclient_name(VirtIONet *n, const char *name,
                                    const char *type);
 
index 3209c9021949cc6b5c5df1b594bd889dac3c3e0f..a78f33e775ef07e9ef059042ffa62d991c3ba509 100644 (file)
@@ -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 */
This page took 0.030799 seconds and 4 git commands to generate.