projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2512117
)
tun: report orphan frags errors to zero copy callback
author
Michael S. Tsirkin
<
[email protected]
>
Thu, 1 Nov 2012 09:16:32 +0000
(09:16 +0000)
committer
David S. Miller
<
[email protected]
>
Sat, 3 Nov 2012 01:29:57 +0000
(21:29 -0400)
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 <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/tun.c
patch
|
blob
|
history
diff --git
a/drivers/net/tun.c
b/drivers/net/tun.c
index 9e287680cd2ecee393c1acad6f79c925d85bdf72..b44d7b79cddcef3562341c5c8ef78e14479d48fe 100644
(file)
--- 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)
drop:
dev->stats.tx_dropped++;
+ skb_tx_error(skb);
kfree_skb(skb);
rcu_read_unlock();
return NETDEV_TX_OK;