em(4): Avoid allocating a csum offloading TX desc whenever possible.
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 20 Feb 2009 11:21:53 +0000 (19:21 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 24 Feb 2009 10:50:49 +0000 (18:50 +0800)
commit51e6819fc2ad7cefdf830dcc9f20bcbe2af2aa52
tree6ddce41bba781031c15f570278efb9905d427a7a
parent3aa2b22467d8837968492ac0d37b31962eec6dab
em(4): Avoid allocating a csum offloading TX desc whenever possible.

According to Intel's PCIe GbE Controllers Open Source Software
Developer's Manual Revision 1.8: a csum offloading TX desc will
prevent TX data read requests from being pipelined, thus reduce TX
performance.  The pipelining effect is not obvious when transmitting
bulk data (e.g. 1472 bytes UDP datagram), but it could be dominant
when transmitting tiny packets.  So we should avoid allocating a
csum offloading TX desc whenever possible to take advantage of the
pipelining effect.

On 82573E_IAMT,
Before this commit: ~700Kpps
After this commit:  ~990Kpps

The funny thing about this commit is:
Old driver code from Intel's FreeBSD driver 6.2.9 roughly did what
we are doing in this commit, while Intel's FreeBSD driver 6.9.6
simply follows Linux's way to flush the performance to the toilet ...
sys/dev/netif/em/if_em.c
sys/dev/netif/em/if_em.h