]> err.no Git - linux-2.6/commitdiff
ixgb: use rx copybreak/skb recycle
authorAuke Kok <auke-jan.h.kok@intel.com>
Thu, 25 May 2006 20:24:21 +0000 (13:24 -0700)
committerAuke Kok <juke-jan.h.kok@intel.com>
Thu, 25 May 2006 20:24:21 +0000 (13:24 -0700)
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>
drivers/net/ixgb/ixgb_main.c

index 27034b3ba80ba4aeb8afe720334e2b7d406f794e..0e23994a6a76706a9424f593696f03c630cc2f8b 100644 (file)
@@ -1990,6 +1990,26 @@ ixgb_clean_rx_irq(struct ixgb_adapter *adapter)
                        goto rxdesc_done;
                }
 
+               /* code added for copybreak, this should improve
+                * performance for small packets with large amounts
+                * of reassembly being done in the stack */
+#define IXGB_CB_LENGTH 256
+               if (length < IXGB_CB_LENGTH) {
+                       struct sk_buff *new_skb =
+                           dev_alloc_skb(length + NET_IP_ALIGN);
+                       if (new_skb) {
+                               skb_reserve(new_skb, NET_IP_ALIGN);
+                               new_skb->dev = netdev;
+                               memcpy(new_skb->data - NET_IP_ALIGN,
+                                      skb->data - NET_IP_ALIGN,
+                                      length + NET_IP_ALIGN);
+                               /* save the skb in buffer_info as good */
+                               buffer_info->skb = skb;
+                               skb = new_skb;
+                       }
+               }
+               /* end copybreak code */
+
                /* Good Receive */
                skb_put(skb, length);