diff options
| author | Dave Airlie <airlied@redhat.com> | 2016-12-05 10:11:48 +0300 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2016-12-05 10:11:48 +0300 |
| commit | f03ee46be9401e3434f52bb15e92d1e640f76438 (patch) | |
| tree | f0a1819bd3e44902578b80e1a03d1dde1c6099b8 /include/linux/netdevice.h | |
| parent | 0d5320fc194128a1a584a7e91a606cb3af2ded80 (diff) | |
| parent | 3e5de27e940d00d8d504dfb96625fb654f641509 (diff) | |
| download | linux-f03ee46be9401e3434f52bb15e92d1e640f76438.tar.xz | |
Backmerge tag 'v4.9-rc8' into drm-next
Linux 4.9-rc8
Daniel requested this so we could apply some follow on fixes cleanly to -next.
Diffstat (limited to 'include/linux/netdevice.h')
| -rw-r--r-- | include/linux/netdevice.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 91ee3643ccc8..e16a2a980ea8 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1619,7 +1619,7 @@ enum netdev_priv_flags { * @dcbnl_ops: Data Center Bridging netlink ops * @num_tc: Number of traffic classes in the net device * @tc_to_txq: XXX: need comments on this one - * @prio_tc_map XXX: need comments on this one + * @prio_tc_map: XXX: need comments on this one * * @fcoe_ddp_xid: Max exchange id for FCoE LRO by ddp * @@ -3354,6 +3354,21 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb); bool is_skb_forwardable(const struct net_device *dev, const struct sk_buff *skb); +static __always_inline int ____dev_forward_skb(struct net_device *dev, + struct sk_buff *skb) +{ + if (skb_orphan_frags(skb, GFP_ATOMIC) || + unlikely(!is_skb_forwardable(dev, skb))) { + atomic_long_inc(&dev->rx_dropped); + kfree_skb(skb); + return NET_RX_DROP; + } + + skb_scrub_packet(skb, true); + skb->priority = 0; + return 0; +} + void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev); extern int netdev_budget; |
