diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-05-02 22:50:46 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-05-02 07:50:47 -0400 |
commit | 5539ae9613587e4a4eec42d420b8bdd9ff552a65 (patch) | |
tree | 39db7c012bed1b364069c0b9b2bdd5ece87210b1 /include/linux/virtio_net.h | |
parent | 99ffc696d10b28580fe93441d627cf290ac4484c (diff) |
virtio: finer-grained features for virtio_net
So, we previously had a 'VIRTIO_NET_F_GSO' bit which meant that 'the
host can handle csum offload, and any TSO (v4&v6 incl ECN) or UFO
packets you might want to send. I thought this was good enough for
Linux, but it actually isn't, since we don't do UFO in software.
So, add separate feature bits for what the host can handle. Add
equivalent ones for the guest to say what it can handle, because LRO
is coming too (thanks Herbert!).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/virtio_net.h')
-rw-r--r-- | include/linux/virtio_net.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 1ea3351df609..9405aa6cdf26 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -6,9 +6,18 @@ | |||
6 | #define VIRTIO_ID_NET 1 | 6 | #define VIRTIO_ID_NET 1 |
7 | 7 | ||
8 | /* The feature bitmap for virtio net */ | 8 | /* The feature bitmap for virtio net */ |
9 | #define VIRTIO_NET_F_CSUM 0 /* Can handle pkts w/ partial csum */ | 9 | #define VIRTIO_NET_F_CSUM 0 /* Host handles pkts w/ partial csum */ |
10 | #define VIRTIO_NET_F_GUEST_CSUM 1 /* Guest handles pkts w/ partial csum */ | ||
10 | #define VIRTIO_NET_F_MAC 5 /* Host has given MAC address. */ | 11 | #define VIRTIO_NET_F_MAC 5 /* Host has given MAC address. */ |
11 | #define VIRTIO_NET_F_GSO 6 /* Can handle pkts w/ any GSO type */ | 12 | #define VIRTIO_NET_F_GSO 6 /* Host handles pkts w/ any GSO type */ |
13 | #define VIRTIO_NET_F_GUEST_TSO4 7 /* Guest can handle TSOv4 in. */ | ||
14 | #define VIRTIO_NET_F_GUEST_TSO6 8 /* Guest can handle TSOv6 in. */ | ||
15 | #define VIRTIO_NET_F_GUEST_ECN 9 /* Guest can handle TSO[6] w/ ECN in. */ | ||
16 | #define VIRTIO_NET_F_GUEST_UFO 10 /* Guest can handle UFO in. */ | ||
17 | #define VIRTIO_NET_F_HOST_TSO4 11 /* Host can handle TSOv4 in. */ | ||
18 | #define VIRTIO_NET_F_HOST_TSO6 12 /* Host can handle TSOv6 in. */ | ||
19 | #define VIRTIO_NET_F_HOST_ECN 13 /* Host can handle TSO[6] w/ ECN in. */ | ||
20 | #define VIRTIO_NET_F_HOST_UFO 14 /* Host can handle UFO in. */ | ||
12 | 21 | ||
13 | struct virtio_net_config | 22 | struct virtio_net_config |
14 | { | 23 | { |