aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgb')
-rw-r--r--drivers/net/ixgb/ixgb_main.c20
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