search for: eth_p_8021q

Displaying 15 results from an estimated 15 matches for "eth_p_8021q".

2007 Apr 18
4
[Bridge] [PATCH/RFC] Let {ip, arp}tables "see" bridged VLAN tagged {I, AR}P packets
...der size. - add BRNF_NF_BRIDGE_PREROUTING mask, to make sure the iptables PREROUTING chain isn't traversed twice. The old mechanism isn't satisfactory when the bridge port is a VLAN tagged device. - add some code in vlan_dev.c::vlan_dev_hard_start_xmit(): skb->protocol = __constant_htons(ETH_P_8021Q); skb->mac.raw -= VLAN_HLEN; skb->nh.raw -= VLAN_HLEN; When the logical VLAN device adds its VLAN header to the packet, I think it should update the skb. The protocol then becomes VLAN, the Ethernet header pointer should be updated correctly. Also, the network header pointer should now point...
2007 Apr 18
5
[Bridge] RFC: [PATCH] bridge vlan integration
...t; +#include <linux/skbuff.h> +#include <linux/if_bridge.h> +#include <linux/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 (...
2007 Apr 18
1
[Bridge] RE: [VLAN] Re: [PATCH/RFC] Let {ip, arp}tables "see" bridged VLAN tagged{I,AR}P packets
...@oss.sgi.com; vlan@wanfear.com; bridge >Subject: [VLAN] Re: [PATCH/RFC] Let {ip,arp}tables "see" bridged VLAN >tagged{I,AR}P packets > > >Bart De Schuymer wrote: >> - add some code in vlan_dev.c::vlan_dev_hard_start_xmit(): >> skb->protocol = __constant_htons(ETH_P_8021Q); >> skb->mac.raw -= VLAN_HLEN; >> skb->nh.raw -= VLAN_HLEN; > >I wonder if this is what was messing up the tcpdump packet capture >as well? Hi Ben and all others, Just to clarify for other who hasn't been a part of this discussion before. ---- 8< ---- When tr...
2018 Sep 06
1
[PATCH net-next 10/11] tap: accept an array of XDP buffs through sendmsg()
...+ err = virtio_net_hdr_to_skb(skb, gso, tap_is_little_endian(q)); > + if (err) > + goto err_kfree; > + } > + > + skb_probe_transport_header(skb, ETH_HLEN); > + > + /* Move network header to the right position for VLAN tagged packets */ > + if ((skb->protocol == htons(ETH_P_8021Q) || > + skb->protocol == htons(ETH_P_8021AD)) && > + __vlan_get_protocol(skb, skb->protocol, &depth) != 0) > + skb_set_network_header(skb, depth); > + > + rcu_read_lock(); > + tap = rcu_dereference(q->tap); > + if (tap) { > + skb->dev = tap...
2007 Apr 18
7
[Bridge] Passing vlan tagged packets through linux bridge
> Use an Intel pro/100 or pro/1000 driver..they are known to > work with VLANs. > > I guess it's also possible that it's a problem in the > bridging code, so try the latest kernel > as well... I compiled the latest 2.6.19 kernel and tested it with two 3COM 3c905c fast ethernet interfaces which work fine with vlan 802.1q tagging, but when I have added the eth0 and eth1
2007 Apr 18
2
[Bridge] large packet size doesn't work
Hi, I have just configured a Linux box with kernel 2.6.16.7 and configured two ethernet interfaces (with MTU 1500) in bridge mode. CONFIG_BRIDGE_NETFILTER is enabled. The problem is that ping -s 1500 192.168.0.2 doesn't work from 192.168.0.1 if the systems are separated by the bridge. Normal ping with smaller packet size works ok. What is wrong? Best Regards Fulvio Ricciardi
2018 Sep 06
0
[PATCH net-next 10/11] tap: accept an array of XDP buffs through sendmsg()
...kb)->h_proto; + + if (vnet_hdr_len) { + err = virtio_net_hdr_to_skb(skb, gso, tap_is_little_endian(q)); + if (err) + goto err_kfree; + } + + skb_probe_transport_header(skb, ETH_HLEN); + + /* Move network header to the right position for VLAN tagged packets */ + if ((skb->protocol == htons(ETH_P_8021Q) || + skb->protocol == htons(ETH_P_8021AD)) && + __vlan_get_protocol(skb, skb->protocol, &depth) != 0) + skb_set_network_header(skb, depth); + + rcu_read_lock(); + tap = rcu_dereference(q->tap); + if (tap) { + skb->dev = tap->dev; + dev_queue_xmit(skb); + } el...
2018 Sep 25
2
bpf compilation using clang
...return -2; } key = (__u8 *)rss_conf->rss_hash_key; if (proto == ETH_P_8021AD) { proto = load_half(skb, nhoff + offsetof(struct vlan_hdr, h_vlan_encapsulated_proto)); nhoff += sizeof(struct vlan_hdr); } if (proto == ETH_P_8021Q) { proto = load_half(skb, nhoff + offsetof(struct vlan_hdr, h_vlan_encapsulated_proto)); nhoff += sizeof(struct vlan_hdr); } if (likely(proto == ETH_P_IP)) { struct ipv4_l3_l4_tuple v4_tuple = { .src_addr = IP...
2013 Mar 28
2
[Bridge] [PATCH v2] net: add ETH_P_802_3_MIN
...thhdr *ehdr, (len << TXHDR_LEN_SHIFT) | ((l3off / 2) << TXHDR_L3START_SHIFT) | (ihl << TXHDR_IHL_SHIFT) | - ((eth_proto_inner < 1536) ? TXHDR_LLC : 0) | + ((eth_proto_inner < ETH_P_802_3_MIN) ? TXHDR_LLC : 0) | ((eth_proto == ETH_P_8021Q) ? TXHDR_VLAN : 0) | (ipv6 ? TXHDR_IP_VER : 0) | csum_bits); diff --git a/drivers/net/plip/plip.c b/drivers/net/plip/plip.c index bed62d9..1f7bef9 100644 --- a/drivers/net/plip/plip.c +++ b/drivers/net/plip/plip.c @@ -560,7 +560,7 @@ static __be16 plip_type_trans(struct sk_buff *s...
2018 Sep 13
4
bpf compilation using clang
Hi all, I am trying to insert instructions into the bpf using the bpf syscall, the instructions were generated using the following command line: clang -I ~/Builds/bpf_rss/iproute2/include -Wall -target bpf -O2 -emit-llvm -c upstream/qemu/hw/net/rss_tap_bpf_program.c -o - | llc -march=bpf -filetype=obj -o tap_bpf_program.o and then were translated to bpf instructions using the BPFCparser tool
2018 Sep 06
22
[PATCH net-next 00/11] Vhost_net TX batching
Hi all: This series tries to batch submitting packets to underlayer socket through msg_control during sendmsg(). This is done by: 1) Doing userspace copy inside vhost_net 2) Build XDP buff 3) Batch at most 64 (VHOST_NET_BATCH) XDP buffs and submit them once through msg_control during sendmsg(). 4) Underlayer sockets can use XDP buffs directly when XDP is enalbed, or build skb based on XDP
2018 Sep 12
14
[PATCH net-next V2 00/11] vhost_net TX batching
Hi all: This series tries to batch submitting packets to underlayer socket through msg_control during sendmsg(). This is done by: 1) Doing userspace copy inside vhost_net 2) Build XDP buff 3) Batch at most 64 (VHOST_NET_BATCH) XDP buffs and submit them once through msg_control during sendmsg(). 4) Underlayer sockets can use XDP buffs directly when XDP is enalbed, or build skb based on XDP
2018 Sep 12
14
[PATCH net-next V2 00/11] vhost_net TX batching
Hi all: This series tries to batch submitting packets to underlayer socket through msg_control during sendmsg(). This is done by: 1) Doing userspace copy inside vhost_net 2) Build XDP buff 3) Batch at most 64 (VHOST_NET_BATCH) XDP buffs and submit them once through msg_control during sendmsg(). 4) Underlayer sockets can use XDP buffs directly when XDP is enalbed, or build skb based on XDP
2013 Feb 13
14
[Bridge] [PATCH v10 net-next 00/12] VLAN filtering/VLAN aware bridge
Changes since v9: * series re-ordering so make functionality more distinct. Basic vlan filtering is patches 1-4. Support for PVID/untagged vlans is patches 5 and 6. VLAN support for FDB/MDB is patches 7-11. Patch 12 is still additional egress policy. * Slight simplification to code that extracts the VID from skb. Since we now depend on the vlan module, at the time of input skb_tci is
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