igb: Don't update TDT upon very packets transmitted
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 22 Nov 2012 12:02:31 +0000 (20:02 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 22 Nov 2012 12:12:58 +0000 (20:12 +0800)
commit871c0e2b6879cde2fe8b1c76bc3ae0040abb975c
tree0b609ed7a98bef0432270dbdaa9180ab3c94a0b6
parent391741ecf79383bb438422ff3941bac9c50cb988
igb: Don't update TDT upon very packets transmitted

The TDT is updated only 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.igbX.tx_wreg_nsegs.

CPU usage when transmitting 18bytes tiny UDP datagrams @1.48Mpps with
82575 on AMD970 (3500Mhz) are reduced from 55% to 38% with the default
value.

Inspired-by: FreeBSD netmap's paper
sys/dev/netif/igb/if_igb.c
sys/dev/netif/igb/if_igb.h