Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

virtio_net: document VIRTIO_NET_CTRL_GUEST_OFFLOADS

Document VIRTIO_NET_CTRL_GUEST_OFFLOADS and the
relevant feature bits.

Will allow ethtool control of the offloads down the road.

Reported-by: Yan Vugenfirer <yan@daynix.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

+16
+16
include/uapi/linux/virtio_net.h
··· 34 34 /* The feature bitmap for virtio net */ 35 35 #define VIRTIO_NET_F_CSUM 0 /* Host handles pkts w/ partial csum */ 36 36 #define VIRTIO_NET_F_GUEST_CSUM 1 /* Guest handles pkts w/ partial csum */ 37 + #define VIRTIO_NET_F_CTRL_GUEST_OFFLOADS 2 /* Dynamic offload configuration. */ 37 38 #define VIRTIO_NET_F_MAC 5 /* Host has given MAC address. */ 38 39 #define VIRTIO_NET_F_GUEST_TSO4 7 /* Guest can handle TSOv4 in. */ 39 40 #define VIRTIO_NET_F_GUEST_TSO6 8 /* Guest can handle TSOv6 in. */ ··· 226 225 #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET 0 227 226 #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN 1 228 227 #define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX 0x8000 228 + 229 + /* 230 + * Control network offloads 231 + * 232 + * Reconfigures the network offloads that Guest can handle. 233 + * 234 + * Available with the VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature bit. 235 + * 236 + * Command data format matches the feature bit mask exactly. 237 + * 238 + * See VIRTIO_NET_F_GUEST_* for the list of offloads 239 + * that can be enabled/disabled. 240 + */ 241 + #define VIRTIO_NET_CTRL_GUEST_OFFLOADS 5 242 + #define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET 0 229 243 230 244 #endif /* _LINUX_VIRTIO_NET_H */