search for: vhdr

Displaying 11 results from an estimated 11 matches for "vhdr".

Did you mean: hdr
2017 Apr 15
0
[PATCH RFC (resend) net-next 5/6] virtio-net: Add support for vlan acceleration vnet header extension.
...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(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 |= VIR...
2007 Apr 18
5
[Bridge] RFC: [PATCH] bridge vlan integration
...inux/netfilter_bridge.h> +#include <asm/uaccess.h> +#include "br_private.h" + +int br_vlan_input_frame(struct sk_buff *skb, struct net_bridge_port_vlan *vlan) +{ + if (skb->protocol != htons(ETH_P_8021Q)) { + skb->vlan = vlan->untagged; + } else { + struct vlan_ethhdr *vhdr = (struct vlan_ethhdr *)(skb->mac.raw); + unsigned short vlan_TCI = ntohs(vhdr->h_vlan_TCI); + unsigned short vid = (vlan_TCI & VLAN_VID_MASK); + + skb->vlan = vid ? vid : vlan->untagged; + } + + if (skb->vlan == 0) + goto err; + + if (br_vlan_filter(skb, vlan)) + goto err;...
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
2010 Mar 03
1
[RFC][ PATCH 3/3] vhost-net: Add mergeable RX buffer support to vhost-net
...vhost_discard(vq, headcount); break; } /* TODO: Should check and handle checksum. */ + if (vhost_has_feature(&net->dev, VIRTIO_NET_F_MRG_RXBUF)) { + struct virtio_net_hdr_mrg_rxbuf *vhdr = + (struct virtio_net_hdr_mrg_rxbuf *) + vq->iov[0].iov_base; + /* add num_bufs */ + vq->iov[0].iov_len = vq->guest_hlen; + vhdr->num_buffers = headcount; +...
2010 Mar 03
1
[RFC][ PATCH 3/3] vhost-net: Add mergeable RX buffer support to vhost-net
...vhost_discard(vq, headcount); break; } /* TODO: Should check and handle checksum. */ + if (vhost_has_feature(&net->dev, VIRTIO_NET_F_MRG_RXBUF)) { + struct virtio_net_hdr_mrg_rxbuf *vhdr = + (struct virtio_net_hdr_mrg_rxbuf *) + vq->iov[0].iov_base; + /* add num_bufs */ + vq->iov[0].iov_len = vq->guest_hlen; + vhdr->num_buffers = headcount; +...
2010 Apr 06
1
[PATCH v3] Add Mergeable receive buffer support to vhost_net
...error and bomb out unless EAGAIN? */ if (err < 0) { - vhost_discard_vq_desc(vq); + vhost_discard_desc(vq, headcount); break; } /* TODO: Should check and handle checksum. */ + if (vhost_has_feature(&net->dev, VIRTIO_NET_F_MRG_RXBUF)) { + struct virtio_net_hdr_mrg_rxbuf *vhdr = + (struct virtio_net_hdr_mrg_rxbuf *) + vq->iov[0].iov_base; + /* add num_buffers */ + if (vhost_has_feature(&net->dev, + VHOST_NET_F_VIRTIO_NET_HDR)) + hdr.num_buffers = headcount; + else if (vq->iov[0].iov_len < sizeof(*vhdr)) { + vq_err(vq, "tin...
2010 Apr 06
1
[PATCH v3] Add Mergeable receive buffer support to vhost_net
...error and bomb out unless EAGAIN? */ if (err < 0) { - vhost_discard_vq_desc(vq); + vhost_discard_desc(vq, headcount); break; } /* TODO: Should check and handle checksum. */ + if (vhost_has_feature(&net->dev, VIRTIO_NET_F_MRG_RXBUF)) { + struct virtio_net_hdr_mrg_rxbuf *vhdr = + (struct virtio_net_hdr_mrg_rxbuf *) + vq->iov[0].iov_base; + /* add num_buffers */ + if (vhost_has_feature(&net->dev, + VHOST_NET_F_VIRTIO_NET_HDR)) + hdr.num_buffers = headcount; + else if (vq->iov[0].iov_len < sizeof(*vhdr)) { + vq_err(vq, "tin...
2007 Apr 18
1
[Bridge] RE: [VLAN] Re: [PATCH/RFC] Let {ip, arp}tables "see" bridged VLAN tagged{I,AR}P packets
...kets tcpdump works (and Ethereal for Windows sees the packet correctly on the wire) so the problem doesn't occur when sending packets. I added following line to vlan_dev.c: vlan_dev.c:: int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type* ptype): vlan_TCI = ntohs(vhdr->h_vlan_TCI); + /* Print the 802.1p priority */ +printk("VLAN Prio: %hx\n", vlan_TCI >> 13); vid = (vlan_TCI & VLAN_VID_MASK); With the code above I get the 802.1p correctly. Does anyone know how and when pcap grabs the packet (does pcap grab the packet before or after vla...
2013 Mar 28
2
[Bridge] [PATCH v2] net: add ETH_P_802_3_MIN
...(&ptx->var, eth2_llc, sizeof(eth2_llc)); diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 218a3b6..70962f3 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h @@ -339,7 +339,7 @@ static inline void vlan_set_encap_proto(struct sk_buff *skb, */ proto = vhdr->h_vlan_encapsulated_proto; - if (ntohs(proto) >= 1536) { + if (ntohs(proto) >= ETH_P_802_3_MIN) { skb->protocol = proto; return; } diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h index 798032d..ade07f1 100644 --- a/include/uapi/linux/if_ether.h +++ b/...
2013 Jan 09
16
[Bridge] [PATCH net-next V5 00/14] Add basic VLAN support to bridges
This series of patches provides an ability to add VLANs to the bridge ports. This is similar to what can be found in most switches. The bridge port may have any number of VLANs added to it including vlan 0 priority tagged traffic. When vlans are added to the port, only traffic tagged with particular vlan will forwarded over this port. Additionally, vlan ids are added to FDB entries and become