diff options
author | Auke Kok <auke-jan.h.kok@intel.com> | 2006-05-25 16:24:21 -0400 |
---|---|---|
committer | Auke Kok <juke-jan.h.kok@intel.com> | 2006-05-25 16:24:21 -0400 |
commit | 6b900bb4bcb6095339f8d404babd9d779bfa1ea4 (patch) | |
tree | c3c727be5c0b9d99e8c01eae16412d0ad43e9c48 /drivers/net/ixgb/ixgb_main.c | |
parent | 1dfdd7df21309e57867962020a5ccb83d00e5432 (diff) |
ixgb: use rx copybreak/skb recycle
o use rx copybreak/skb recycle
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Diffstat (limited to 'drivers/net/ixgb/ixgb_main.c')
-rw-r--r-- | drivers/net/ixgb/ixgb_main.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c index 27034b3ba80b..0e23994a6a76 100644 --- a/drivers/net/ixgb/ixgb_main.c +++ b/drivers/net/ixgb/ixgb_main.c | |||
@@ -1990,6 +1990,26 @@ ixgb_clean_rx_irq(struct ixgb_adapter *adapter) | |||
1990 | goto rxdesc_done; | 1990 | goto rxdesc_done; |
1991 | } | 1991 | } |
1992 | 1992 | ||
1993 | /* code added for copybreak, this should improve | ||
1994 | * performance for small packets with large amounts | ||
1995 | * of reassembly being done in the stack */ | ||
1996 | #define IXGB_CB_LENGTH 256 | ||
1997 | if (length < IXGB_CB_LENGTH) { | ||
1998 | struct sk_buff *new_skb = | ||
1999 | dev_alloc_skb(length + NET_IP_ALIGN); | ||
2000 | if (new_skb) { | ||
2001 | skb_reserve(new_skb, NET_IP_ALIGN); | ||
2002 | new_skb->dev = netdev; | ||
2003 | memcpy(new_skb->data - NET_IP_ALIGN, | ||
2004 | skb->data - NET_IP_ALIGN, | ||
2005 | length + NET_IP_ALIGN); | ||
2006 | /* save the skb in buffer_info as good */ | ||
2007 | buffer_info->skb = skb; | ||
2008 | skb = new_skb; | ||
2009 | } | ||
2010 | } | ||
2011 | /* end copybreak code */ | ||
2012 | |||
1993 | /* Good Receive */ | 2013 | /* Good Receive */ |
1994 | skb_put(skb, length); | 2014 | skb_put(skb, length); |
1995 | 2015 | ||