Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: net/ipv6/xfrm6_output.c net/openvswitch/flow_netlink.c net/openvswitch/vport-gre.c net/openvswitch/vport-vxlan.c net/openvswitch/vport.c net/openvswitch/vport.h The openvswitch conflicts were overlapping changes. One was the egress tunnel info fix in 'net' and the other was the vport ->send() op simplification in 'net-next'. The xfrm6_output.c conflicts was also a simplification overlapping a bug fix. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -60,6 +60,38 @@ static inline struct metadata_dst *tun_rx_dst(int md_size)
|
||||
return tun_dst;
|
||||
}
|
||||
|
||||
static inline struct metadata_dst *tun_dst_unclone(struct sk_buff *skb)
|
||||
{
|
||||
struct metadata_dst *md_dst = skb_metadata_dst(skb);
|
||||
int md_size = md_dst->u.tun_info.options_len;
|
||||
struct metadata_dst *new_md;
|
||||
|
||||
if (!md_dst)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
new_md = metadata_dst_alloc(md_size, GFP_ATOMIC);
|
||||
if (!new_md)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
memcpy(&new_md->u.tun_info, &md_dst->u.tun_info,
|
||||
sizeof(struct ip_tunnel_info) + md_size);
|
||||
skb_dst_drop(skb);
|
||||
dst_hold(&new_md->dst);
|
||||
skb_dst_set(skb, &new_md->dst);
|
||||
return new_md;
|
||||
}
|
||||
|
||||
static inline struct ip_tunnel_info *skb_tunnel_info_unclone(struct sk_buff *skb)
|
||||
{
|
||||
struct metadata_dst *dst;
|
||||
|
||||
dst = tun_dst_unclone(skb);
|
||||
if (IS_ERR(dst))
|
||||
return NULL;
|
||||
|
||||
return &dst->u.tun_info;
|
||||
}
|
||||
|
||||
static inline struct metadata_dst *ip_tun_rx_dst(struct sk_buff *skb,
|
||||
__be16 flags,
|
||||
__be64 tunnel_id,
|
||||
|
Reference in New Issue
Block a user