summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/virtio-net.h
diff options
context:
space:
mode:
authorMichael Brown2017-01-23 17:32:54 +0100
committerMichael Brown2017-01-23 17:32:54 +0100
commit4e85b2708fa0c8854c722302ff9bf00ecdbcccc8 (patch)
tree3e2fd685189aef8f258e38986d9a96b1a8412c52 /src/drivers/net/virtio-net.h
parent[cloud] Add ability to retrieve Google Compute Engine metadata (diff)
downloadipxe-4e85b2708fa0c8854c722302ff9bf00ecdbcccc8.tar.gz
ipxe-4e85b2708fa0c8854c722302ff9bf00ecdbcccc8.tar.xz
ipxe-4e85b2708fa0c8854c722302ff9bf00ecdbcccc8.zip
[virtio] Use host-specified MTU when available
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/virtio-net.h')
-rw-r--r--src/drivers/net/virtio-net.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/drivers/net/virtio-net.h b/src/drivers/net/virtio-net.h
index c2b4a17cc..ff58d3ef1 100644
--- a/src/drivers/net/virtio-net.h
+++ b/src/drivers/net/virtio-net.h
@@ -4,6 +4,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_MTU 3 /* Initial MTU advice */
#define VIRTIO_NET_F_MAC 5 /* Host has given MAC address. */
#define VIRTIO_NET_F_GSO 6 /* Host handles pkts w/ any GSO type */
#define VIRTIO_NET_F_GUEST_TSO4 7 /* Guest can handle TSOv4 in. */
@@ -25,6 +26,15 @@ struct virtio_net_config
{
/* The config defining mac address (if VIRTIO_NET_F_MAC) */
u8 mac[6];
+ /* See VIRTIO_NET_F_STATUS and VIRTIO_NET_S_* above */
+ u16 status;
+ /* Maximum number of each of transmit and receive queues;
+ * see VIRTIO_NET_F_MQ and VIRTIO_NET_CTRL_MQ.
+ * Legal values are between 1 and 0x8000
+ */
+ u16 max_virtqueue_pairs;
+ /* Default maximum transmit unit advice */
+ u16 mtu;
} __attribute__((packed));
/* This is the first element of the scatter-gather list. If you don't