search for: virtio_net_ext_from_skb

Displaying 4 results from an estimated 4 matches for "virtio_net_ext_from_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.
...;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(struct send_queue *sq, struct sk_buff *skb) if (vi->mergeable_rx_bufs) hdr->num_buffers = 0; + if (vi->hdr_ext && + virtio_net_ext_from_skb(skb, (struct virtio_net_ext_hdr *)(hdr + 1), + vi->ext_mask)) + BUG(); + sg_init_table(sq->sg, skb_shinfo(skb)->nr_frags + (can_push ? 1 : 2)); if (can_push) { __skb_push(skb, hdr_len); diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 5209b5e..eaa52...
2017 Apr 15
0
[PATCH RFC (resend) net-next 5/6] virtio-net: Add support for vlan acceleration vnet header extension.
...t;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(struct virtio_net_ext_vlan); + } + return 0; } @@ -130,6 +138,15 @@ static inline int virtio_net_ext_from_skb(const struct sk_buff *skb, ext->flags |= VIRTIO_NET_EXT_F_IP6FRAG; } + if (ext_mask & VIRTIO_NET_EXT_F_VLAN && skb_vlan_tag_present(skb)) { + struct virtio_net_ext_vlan *vhdr = + (struct virtio_net_ext_vlan *)ptr; + + vlan_get_tag(skb, &vhdr->vlan_tci); + vhdr-&g...