another set of ppc405_enet changes
From: andrew may <hidden>
Date: 2001-09-12 03:27:12
I wanted to limit this patch to be just a rework of the static var's but I
ended up changing more things. I will attempt a summary of the changes.
I did not compile/fix the stuff ifdef'd out by default.
I attached the output from some runs with nttcp before and after the changes.
It does not appear like there is any noticable change in performace from these
changes. "-u" is for UDP "-r" is Rx'd on the 405GP Tx'd by my x86 box, "-t" is
Tx'd by the 405GP Rx'd by the x86.
One thing to look into would be the diff between UDP tx packets to the
number rx'd on the other side. I don't know where the packets are being dropped
now.
Config.ini changed to CONFIG_PPC405_ENET to be tristate instead of just bool.
Change NUM_RX to 32 and NUM_TX to 8. Doesn't change performace noticablely.
Moved probe1 code into init function.
kfree of private struct on module unload or failure to register netdevice.
Used skb->len instead of tail-head in places.
For both tx/rx eob int's clear reg first then loop through, instead of loop
clear, goto top of loop again.
Moved tx stat counts into tx eob from hard_xmit. In tx_eob moved netif_wake
outside of loop.
In rx_eob wait untill end of function to refill slots instead of after
each packet. Also did skb_put instead of += tail and len. Put in check
for dev_alloc_skb failure but still no recovery when OOM.
Orig--------------------
# ./nttcp-ppc -T -u -r -n 100000 192.168.1.5
Bytes Real s CPU s Real-MBit/s CPU-MBit/s Calls Real-C/s CPU-C/s
l409600000 36.75 24.11 89.1642 135.9104 100001 2721.10 4147.7
1409600000 36.75 3.10 89.1754 1057.0323 100003 2721.50 32259.0
# ./nttcp-ppc -T -u -t -n 100000 192.168.1.5
Bytes Real s CPU s Real-MBit/s CPU-MBit/s Calls Real-C/s CPU-C/s
l409600000 34.81 22.75 94.1400 144.0352 100003 2873.01 4395.7
1388304896 34.81 1.54 89.2353 2017.1683 94802 2723.27 61559.7
# ./nttcp-ppc -T -t -n 100000 192.168.1.5
Bytes Real s CPU s Real-MBit/s CPU-MBit/s Calls Real-C/s CPU-C/s
l409600000 46.71 44.44 70.1553 73.7354 100000 2140.97 2250.2
1409600000 46.71 6.79 70.1555 482.5920 288192 6170.12 42443.6
# ./nttcp-ppc -T -r -n 100000 192.168.1.5
Bytes Real s CPU s Real-MBit/s CPU-MBit/s Calls Real-C/s CPU-C/s
l409600000 44.21 42.45 74.1172 77.1920 100161 2265.52 2359.5
1409600000 44.21 2.01 74.1199 1630.2488 100000 2261.96 49751.2
With Patch--------------------
# ./nttcp-ppc -T -u -r -n 100000 192.168.1.5
Bytes Real s CPU s Real-MBit/s CPU-MBit/s Calls Real-C/s CPU-C/s
l409600000 36.39 24.43 90.0534 134.1302 100001 2748.24 4093.4
1409600000 36.38 3.19 90.0617 1027.2100 100003 2748.55 31348.9
# ./nttcp-ppc -T -u -r -n 100000 192.168.1.5
Bytes Real s CPU s Real-MBit/s CPU-MBit/s Calls Real-C/s CPU-C/s
l409600000 36.33 24.14 90.1953 135.7415 100001 2752.57 4142.5
1409600000 36.32 3.34 90.2083 981.0778 100003 2753.02 29941.0
# ./nttcp-ppc -T -u -t -n 100000 192.168.1.5
Bytes Real s CPU s Real-MBit/s CPU-MBit/s Calls Real-C/s CPU-C/s
l409600000 34.81 20.59 94.1261 159.1452 100003 2872.59 4856.9
1386686976 34.82 1.77 88.8523 1747.7377 94407 2711.58 53337.3
# ./nttcp-ppc -T -t -n 100000 192.168.1.5
Bytes Real s CPU s Real-MBit/s CPU-MBit/s Calls Real-C/s CPU-C/s
l409600000 46.22 41.92 70.8989 78.1679 100000 2163.66 2385.5
1409600000 46.22 6.35 70.8987 516.0315 287353 6217.33 45252.4
# ./nttcp-ppc -T -r -n 100000 192.168.1.5
Bytes Real s CPU s Real-MBit/s CPU-MBit/s Calls Real-C/s CPU-C/s
l409600000 44.79 42.63 73.1577 76.8661 100099 2234.81 2348.1
1409600000 44.79 2.80 73.1578 1170.2857 100000 2232.60 35714.3