> + /* 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; > + } > + } >
Why use dev_alloc_skb in the receive path? All it does is add an extra 16 bytes of header space that is never used. Also, you should use 2 rather than NET_IP_ALIGN here. The point of NET_IP_ALIGN is to allow architectures where unaligned DMA is expensive to redefine NET_IP_ALIGN to 0. But in this case you are not DMA'ing into the new buffer but using memcpy so you always want to reserve 2 (16 - ETH_HLEN) to cause aligned access in IP receive. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html