diff options
| author | Michael S. Tsirkin <mst@redhat.com> | 2013-07-24 20:50:23 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-07-27 23:06:10 -0400 |
| commit | e7428e95a06fb516fac1308bd0e176e27c0b9287 (patch) | |
| tree | 7ccd3f84a565b24ddf7efe5b10325cfd34ad98fc /include/uapi/linux | |
| parent | 10eccb46b521359fa344f63459087df722f0776d (diff) | |
virtio-net: put virtio net header inline with data
For small packets we can simplify xmit processing
by linearizing buffers with the header:
most packets seem to have enough head room
we can use for this purpose.
Since existing hypervisors require that header
is the first s/g element, we need a feature bit
for this.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/virtio_net.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/uapi/linux/virtio_net.h b/include/uapi/linux/virtio_net.h index c520203fac2f..227d4ce84e79 100644 --- a/include/uapi/linux/virtio_net.h +++ b/include/uapi/linux/virtio_net.h | |||
| @@ -70,7 +70,9 @@ struct virtio_net_config { | |||
| 70 | __u16 max_virtqueue_pairs; | 70 | __u16 max_virtqueue_pairs; |
| 71 | } __attribute__((packed)); | 71 | } __attribute__((packed)); |
| 72 | 72 | ||
| 73 | /* This is the first element of the scatter-gather list. If you don't | 73 | /* This header comes first in the scatter-gather list. |
| 74 | * If VIRTIO_F_ANY_LAYOUT is not negotiated, it must | ||
| 75 | * be the first element of the scatter-gather list. If you don't | ||
| 74 | * specify GSO or CSUM features, you can simply ignore the header. */ | 76 | * specify GSO or CSUM features, you can simply ignore the header. */ |
| 75 | struct virtio_net_hdr { | 77 | struct virtio_net_hdr { |
| 76 | #define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset | 78 | #define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 // Use csum_start, csum_offset |
