standard-headers: update virtio_net.h
authorMichael S. Tsirkin <mst@redhat.com>
Fri, 9 Mar 2018 23:11:06 +0000 (01:11 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 20 Mar 2018 01:34:52 +0000 (03:34 +0200)
include speed/duplex fields

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
include/standard-headers/linux/virtio_net.h

index 30ff24940df7a4e02031c48396ba2c9986d14f0d..e9f255ea3f0e2e32df0bf1e699573871baa5a479 100644 (file)
@@ -57,6 +57,8 @@
                                         * Steering */
 #define VIRTIO_NET_F_CTRL_MAC_ADDR 23  /* Set MAC address */
 
+#define VIRTIO_NET_F_SPEED_DUPLEX 63   /* Device set linkspeed and duplex */
+
 #ifndef VIRTIO_NET_NO_LEGACY
 #define VIRTIO_NET_F_GSO       6       /* Host handles pkts w/ any GSO type */
 #endif /* VIRTIO_NET_NO_LEGACY */
@@ -76,6 +78,17 @@ struct virtio_net_config {
        uint16_t max_virtqueue_pairs;
        /* Default maximum transmit unit advice */
        uint16_t mtu;
+       /*
+        * speed, in units of 1Mb. All values 0 to INT_MAX are legal.
+        * Any other value stands for unknown.
+        */
+       uint32_t speed;
+       /*
+        * 0x00 - half duplex
+        * 0x01 - full duplex
+        * Any other value stands for unknown.
+        */
+       uint8_t duplex;
 } QEMU_PACKED;
 
 /*