Re: [PATCH net-next 2/5] ipv6: sr: add support for encapsulation of L2 frames

2017-08-24 Thread David Miller
From: David Lebrun Date: Wed, 23 Aug 2017 17:32:00 +0200 > + case SEG6_IPTUN_MODE_L2ENCAP: > + head = sizeof(struct ipv6hdr) + 14; > + break; This 14 is ETH_HLEN. > > + if (pskb_expand_head(skb, skb->mac_len, 0, GFP_ATOMIC) < 0) > +

[PATCH net-next 2/5] ipv6: sr: add support for encapsulation of L2 frames

2017-08-23 Thread David Lebrun
This patch implements the L2 frame encapsulation mechanism, referred to as T.Encaps.L2 in the SRv6 specifications [1]. A new type of SRv6 tunnel mode is added (SEG6_IPTUN_MODE_L2ENCAP). It only accepts packets with an existing MAC header (i.e., it will not work for locally generated packets). The