aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-11-15 10:54:36 -0500
committerDavid S. Miller <davem@davemloft.net>2016-11-15 10:54:36 -0500
commitbb598c1b8c9bf56981927dcb8c0dc34b8ff95342 (patch)
tree69fe6d3bcdbf0acb76e42b144d8af5a0234ccdcb /include/linux/netdevice.h
parenteb2ca35f1814dad3ca547261eedfbbd0d65a0efc (diff)
parente76d21c40bd6c67fd4e2c1540d77e113df962b4d (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Several cases of bug fixes in 'net' overlapping other changes in 'net-next-. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index d64135a0ab71..86bacf6a64f0 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3252,6 +3252,21 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb);
3252bool is_skb_forwardable(const struct net_device *dev, 3252bool is_skb_forwardable(const struct net_device *dev,
3253 const struct sk_buff *skb); 3253 const struct sk_buff *skb);
3254 3254
3255static __always_inline int ____dev_forward_skb(struct net_device *dev,
3256 struct sk_buff *skb)
3257{
3258 if (skb_orphan_frags(skb, GFP_ATOMIC) ||
3259 unlikely(!is_skb_forwardable(dev, skb))) {
3260 atomic_long_inc(&dev->rx_dropped);
3261 kfree_skb(skb);
3262 return NET_RX_DROP;
3263 }
3264
3265 skb_scrub_packet(skb, true);
3266 skb->priority = 0;
3267 return 0;
3268}
3269
3255void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev); 3270void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev);
3256 3271
3257extern int netdev_budget; 3272extern int netdev_budget;