|
From: bekars <be...@gm...> - 2007-03-26 10:42:18
|
There is a piece code in e1000 driver about copybreak improve small packet
performance.
/* code added for copybreak, this should improve
* performance for small packets with large amounts
* of reassembly being done in the stack */
if (length < copybreak) {
struct sk_buff *new_skb =
netdev_alloc_skb(netdev, length + NET_IP_ALIGN);
if (new_skb) {
skb_reserve(new_skb, NET_IP_ALIGN);
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;
}
/* else just continue with the old one */
}
I test the 64 byte packet throughput. Firstly, using the copybreak, the
result is 35%. Secondly, remove the code by echo 20 >
/sys/module/e1000/parameters/copybreak, the result is 38%.
Questions:
1) Why removing the code make higher result?
2) Why add the copybreak code to the receive skb process? Do it just what it
should to do?
Thank for your reply, happy everyday.
Bekars ^_^
|