search for: virtio_net_ext_to_skb

Displaying 4 results from an estimated 4 matches for "virtio_net_ext_to_skb".

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.
...b) { + BUILD_BUG_ON(sizeof(struct virtio_net_hdr_max) > sizeof(skb->cb)); return (struct virtio_net_hdr_mrg_rxbuf *)skb->cb; } @@ -767,6 +777,12 @@ static int receive_buf(struct virtnet_info *vi, struct receive_queue *rq, goto frame_err; } + if (vi->hdr_ext && + virtio_net_ext_to_skb(skb, + (struct virtio_net_ext_hdr *)(hdr + 1))) { + goto frame_err; + } + skb->protocol = eth_type_trans(skb, dev); pr_debug("Receiving skb proto 0x%04x len %i type %i\n", ntohs(skb->protocol), skb->len, skb->pkt_type); @@ -1106,6 +1122,11 @@ static int xmit_skb(...
2017 Apr 15
0
[PATCH RFC (resend) net-next 5/6] virtio-net: Add support for vlan acceleration vnet header extension.
...has_feature(vdev, VIRTIO_NET_F_VLAN_OFFLOAD)) vi->hdr_ext = true; if (vi->hdr_ext) diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 3b259dc..e790191 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h @@ -113,6 +113,14 @@ static inline int virtio_net_ext_to_skb(struct sk_buff *skb, ptr += sizeof(struct virtio_net_ext_ip6frag); } + if (ext->flags & VIRTIO_NET_EXT_F_VLAN) { + struct virtio_net_ext_vlan *vhdr = + (struct virtio_net_ext_vlan *)ptr; + + __vlan_hwaccel_put_tag(skb, vhdr->vlan_proto, vhdr->vlan_tci); + ptr += sizeof(st...