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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: xiaohui.xin
Date: Wednesday, December 1, 2010 - 1:08 am

From: Xin Xiaohui <xiaohui.xin@intel.com>

Signed-off-by: Xin Xiaohui <xiaohui.xin@intel.com>
Signed-off-by: Zhao Yu <yzhao81new@gmail.com>
Reviewed-by: Jeff Dike <jdike@linux.intel.com>
---
 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 d3ece5c..11833b4 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -550,6 +550,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

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v16 09/17] Don't do skb recycle, if device use exte ..., xiaohui.xin, (Wed Dec 1, 1:08 am)
[PATCH v16 12/17] Add header file for mp device., xiaohui.xin, (Wed Dec 1, 1:08 am)
[PATCH v16 13/17] Add mp(mediate passthru) device., xiaohui.xin, (Wed Dec 1, 1:08 am)