Displaying 4 results from an estimated 4 matches for "ext_mask".
2017 Apr 15
11
[PATCH RFC (resend) net-next 0/6] virtio-net: Add support for virtio-net header extensions
Curreclty virtion net header is fixed size and adding things to it is rather
difficult to do. This series attempt to add the infrastructure as well as some
extensions that try to resolve some deficiencies we currently have.
First, vnet header only has space for 16 flags. This may not be enough
in the future. The extensions will provide space for 32 possbile extension
flags and 32 possible
2017 Apr 15
11
[PATCH RFC (resend) net-next 0/6] virtio-net: Add support for virtio-net header extensions
Curreclty virtion net header is fixed size and adding things to it is rather
difficult to do. This series attempt to add the infrastructure as well as some
extensions that try to resolve some deficiencies we currently have.
First, vnet header only has space for 16 flags. This may not be enough
in the future. The extensions will provide space for 32 possbile extension
flags and 32 possible
2017 Apr 15
0
[PATCH RFC (resend) net-next 3/6] virtio_net: Add basic skeleton for handling vnet header extensions.
...rivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 5ad6ee6..08e2709 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -145,6 +145,10 @@ struct virtnet_info {
/* Packet virtio header size */
u8 hdr_len;
+ /* Header extensions were negotiated */
+ bool hdr_ext;
+ u32 ext_mask;
+
/* Active statistics */
struct virtnet_stats __percpu *stats;
@@ -174,6 +178,11 @@ struct virtnet_info {
u32 speed;
};
+struct virtio_net_hdr_max {
+ struct virtio_net_hdr_mrg_rxbuf hdr;
+ struct virtio_net_ext_hdr ext_hdr;
+};
+
static inline u8 padded_vnet_hdr(struct virtnet_info *...
2017 Apr 15
0
[PATCH RFC (resend) net-next 5/6] virtio-net: Add support for vlan acceleration vnet header extension.
...o_net_ext_hdr ext_hdr;
struct virtio_net_ext_ip6frag ip6f_ext;
+ struct virtio_net_ext_vlan vlan_ext;
};
static inline u8 padded_vnet_hdr(struct virtnet_info *vi)
@@ -2276,6 +2277,11 @@ static void virtnet_init_extensions(struct virtio_device *vdev)
vi->hdr_len += sizeof(u32);
vi->ext_mask |= VIRTIO_NET_EXT_F_IP6FRAG;
}
+
+ if (virtio_has_feature(vdev, VIRTIO_NET_F_VLAN_OFFLOAD)) {
+ vi->hdr_len += sizeof(struct virtio_net_ext_vlan);
+ vi->ext_mask |= VIRTIO_NET_EXT_F_VLAN;
+ }
}
#define MIN_MTU ETH_MIN_MTU
@@ -2352,6 +2358,14 @@ static int virtnet_probe(struct virtio_d...