aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2012-11-01 05:16:32 -0400
committerDavid S. Miller <davem@davemloft.net>2012-11-02 21:29:57 -0400
commit149d36f7187cbd10beff88e4e20f93e51a34827e (patch)
tree600293aadc93c8f5d5d48bba03fa8087d35e46c7 /drivers/net/tun.c
parent25121173f7b1e4ac3fc692df6e7b8c52ec36abba (diff)
tun: report orphan frags errors to zero copy callback
When tun transmits a zero copy skb, it orphans the frags which might need to allocate extra memory, in atomic context. If that fails, notify ubufs callback before freeing the skb as a hint that device should disable zerocopy mode. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r--drivers/net/tun.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 9e287680cd2e..b44d7b79cddc 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -728,6 +728,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
728 728
729drop: 729drop:
730 dev->stats.tx_dropped++; 730 dev->stats.tx_dropped++;
731 skb_tx_error(skb);
731 kfree_skb(skb); 732 kfree_skb(skb);
732 rcu_read_unlock(); 733 rcu_read_unlock();
733 return NETDEV_TX_OK; 734 return NETDEV_TX_OK;