bce: Improve tiny packets transmission performance on low frequency CPU
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 26 Nov 2012 13:32:42 +0000 (21:32 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 26 Nov 2012 13:32:42 +0000 (21:32 +0800)
commitf52858a0e5001afe34e1bb2738532a7d298a4870
treefb2d2cf75a3b66dabe8267d5fac95ffb0e8c3bd0
parentbd04074e9ba0274980fb871d674ca6540d13f4c6
bce: Improve tiny packets transmission performance on low frequency CPU

Update TX HOST_IDX and HOST_BSEQ registers a little bit often; mainly to
improve timeliness of packets transmission:
The TX HOST_IDX and HOST_BSEQ registers are updated after certain amount
of TX descriptors are added to the hardware TX ring.  The default value
of the amount of TX descriptors are 8.  This value could be further
tuned by per-device sysctl node hw.bceX.tx_wreg.

The default value greatly improves tiny packets transmission performance
w/ 5709C on AMD970@800Mhz (513Kpps -> 1Mpps) and it does not increase CPU
usage on AMD970@3500Mhz (CPU usage stays @24%, 5709C could only do 1Mpps).
sys/dev/netif/bce/if_bce.c
sys/dev/netif/bce/if_bcereg.h