aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-01-06 17:37:45 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-06 17:37:45 -0500
commit56a4342dfe3145cd66f766adccb28fd9b571606d (patch)
treed1593764488ff8cbb0b83cb9ae35fd968bf81760 /include/linux/netdevice.h
parent805c1f4aedaba1bc8d839e7c27b128083dd5c2f0 (diff)
parentfe0d692bbc645786bce1a98439e548ae619269f5 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c net/ipv6/ip6_tunnel.c net/ipv6/ip6_vti.c ipv6 tunnel statistic bug fixes conflicting with consolidation into generic sw per-cpu net stats. qlogic conflict between queue counting bug fix and the addition of multiple MAC address support. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 0c30af38be0d..d9c961aa6a7f 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1921,6 +1921,15 @@ static inline int dev_parse_header(const struct sk_buff *skb,
1921 return dev->header_ops->parse(skb, haddr); 1921 return dev->header_ops->parse(skb, haddr);
1922} 1922}
1923 1923
1924static inline int dev_rebuild_header(struct sk_buff *skb)
1925{
1926 const struct net_device *dev = skb->dev;
1927
1928 if (!dev->header_ops || !dev->header_ops->rebuild)
1929 return 0;
1930 return dev->header_ops->rebuild(skb);
1931}
1932
1924typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int len); 1933typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int len);
1925int register_gifconf(unsigned int family, gifconf_func_t *gifconf); 1934int register_gifconf(unsigned int family, gifconf_func_t *gifconf);
1926static inline int unregister_gifconf(unsigned int family) 1935static inline int unregister_gifconf(unsigned int family)
@@ -3039,6 +3048,19 @@ static inline void netif_set_gso_max_size(struct net_device *dev,
3039 dev->gso_max_size = size; 3048 dev->gso_max_size = size;
3040} 3049}
3041 3050
3051static inline void skb_gso_error_unwind(struct sk_buff *skb, __be16 protocol,
3052 int pulled_hlen, u16 mac_offset,
3053 int mac_len)
3054{
3055 skb->protocol = protocol;
3056 skb->encapsulation = 1;
3057 skb_push(skb, pulled_hlen);
3058 skb_reset_transport_header(skb);
3059 skb->mac_header = mac_offset;
3060 skb->network_header = skb->mac_header + mac_len;
3061 skb->mac_len = mac_len;
3062}
3063
3042static inline bool netif_is_macvlan(struct net_device *dev) 3064static inline bool netif_is_macvlan(struct net_device *dev)
3043{ 3065{
3044 return dev->priv_flags & IFF_MACVLAN; 3066 return dev->priv_flags & IFF_MACVLAN;