aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netdevice.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 7514b9c37a39..5faaadb0c74f 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3017,6 +3017,19 @@ static inline void netif_set_gso_max_size(struct net_device *dev,
3017 dev->gso_max_size = size; 3017 dev->gso_max_size = size;
3018} 3018}
3019 3019
3020static inline void skb_gso_error_unwind(struct sk_buff *skb, __be16 protocol,
3021 int pulled_hlen, u16 mac_offset,
3022 int mac_len)
3023{
3024 skb->protocol = protocol;
3025 skb->encapsulation = 1;
3026 skb_push(skb, pulled_hlen);
3027 skb_reset_transport_header(skb);
3028 skb->mac_header = mac_offset;
3029 skb->network_header = skb->mac_header + mac_len;
3030 skb->mac_len = mac_len;
3031}
3032
3020static inline bool netif_is_macvlan(struct net_device *dev) 3033static inline bool netif_is_macvlan(struct net_device *dev)
3021{ 3034{
3022 return dev->priv_flags & IFF_MACVLAN; 3035 return dev->priv_flags & IFF_MACVLAN;