diff options
author | Aaron Conole <aconole@redhat.com> | 2016-06-03 20:57:12 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-07 01:08:49 (GMT) |
commit | 14de9d114a82a564b94388c95af79a701dc93134 (patch) | |
tree | 0383dc33ea97f87ab15be125f8f702b009d76923 /include | |
parent | 3d9dc408fa6abf8dd1ea39e243e565891004a6f9 (diff) | |
download | linux-14de9d114a82a564b94388c95af79a701dc93134.tar.xz |
virtio-net: Add initial MTU advice feature
This commit adds the feature bit and associated mtu device entry for the
virtio network device. When a virtio device comes up, it checks the
feature bit for the VIRTIO_NET_F_MTU feature. If such feature bit is
enabled, the driver will read the advised MTU and use it as the initial
value.
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/linux/virtio_net.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h index ec32293..1ab4ea6 100644 --- a/include/uapi/linux/virtio_net.h +++ b/include/uapi/linux/virtio_net.h @@ -55,6 +55,7 @@ #define VIRTIO_NET_F_MQ 22 /* Device supports Receive Flow * Steering */ #define VIRTIO_NET_F_CTRL_MAC_ADDR 23 /* Set MAC address */ +#define VIRTIO_NET_F_MTU 25 /* Initial MTU advice */ #ifndef VIRTIO_NET_NO_LEGACY #define VIRTIO_NET_F_GSO 6 /* Host handles pkts w/ any GSO type */ @@ -73,6 +74,8 @@ struct virtio_net_config { * Legal values are between 1 and 0x8000 */ __u16 max_virtqueue_pairs; + /* Default maximum transmit unit advice */ + __u16 mtu; } __attribute__((packed)); /* |