Thread (21 messages) 21 messages, 2 authors, 2010-11-08
STALE5686d REVIEWED: 1 (0M)
Revisions (5)
  1. v11 [diff vs current]
  2. v12 [diff vs current]
  3. v13 current
  4. v14 [diff vs current]
  5. v15 [diff vs current]

[PATCH v13 09/16]Don't do skb recycle, if device use external buffer.

From: <hidden>
Date: 2010-10-15 08:53:02
Also in: kvm, lkml
Subsystem: networking [general], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

From: Xin Xiaohui <redacted>

Signed-off-by: Xin Xiaohui <redacted>
Signed-off-by: Zhao Yu <redacted>
Reviewed-by: Jeff Dike <redacted>
---
 net/core/skbuff.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 02439e0..196aa99 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -558,6 +558,12 @@ bool skb_recycle_check(struct sk_buff *skb, int skb_size)
 	if (skb_shared(skb) || skb_cloned(skb))
 		return false;
 
+	/* if the device wants to do mediate passthru, the skb may
+	 * get external buffer, so don't recycle
+	 */
+	if (dev_is_mpassthru(skb->dev))
+		return 0;
+
 	skb_release_head_state(skb);
 
 	shinfo = skb_shinfo(skb);
-- 
1.7.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help