When initializing a TCP/IP context descriptor, even if a checksum
offload feature is not going to be used, the IPCSS and TUCSS fields
must be initialized.
* Fix outbound IPv4 header checksums (missing add of an offset).
* When enabling Rx TCP/UDP checksum offload, make sure that IPv4
header checksum Rx offload is enabled on the chip, as well.
* Bump the number of Rx descriptors from 128 to 256.
* Don't use a sliding Tx interrupt window. Instead, just do reap-behind
when we have <= 1/8 of our available descriptors in wm_start().
* Don't use Tx Queue Empty interrupts, and always set the Tx Interrupt
Delay bit in the Tx descriptor.
* In wm_intr(), always call wm_rxintr() and wm_txintr(), regardless of
their respective ISR bits being set. We're here, might as well do some
work.
* Adjust the Tx and Rx interrupt delay timer values. New values from
Intel's driver for FreeBSD via Allen Briggs.
With these changes, NetBSD can sustain > 900Mb/s userland to userland
*without* using TCP checksum offload using Intel PRO/1000 XT cards.
* Garbage-collect some unused stuff.
* Make the Tx window slide along the Tx job queue space, not the
Tx descriptor space. We are more likely to run low on DMA maps
than we are hardware descriptors.
* When forcing an interrupt, make sure that interrupt-delay-enable is
cleared (necessary with last change to make sure it's set for all
descriptors).
* Crank up the Transmit Interrupt Delay Value to 1024 * 1.024 msec. We
really want these to be deferred.
context setup.
* Implement Matt Thomas's sliding Tx interrupt window algorithm,
forcing an interrupt when the Tx desc list is 2/3 consumed.
* Use the Report Packet Sent interrupt, rather than Report Status,
since we use the Tx descriptor to count Tx errors.
transmit and receive descriptor rings is limited to 256 descriptors.
So, set the if_snd queue length to 256 to let the upper layers queue
lots of packets, and let the driver handle up to 32 of them at a time.
(We should probably make this change to most Ethernet drivers, since
it actually saves some resources.)
* Increase the number of Tx DMA segments from 8 to 16.
* Clean up the way we count "how many times did I get a packet with N
DMA segments".
* Add a missing htole32() in wm_tx_cksum().
* Don't set both RS and RPS in the last Tx descriptor of a packet; just
use RS.
* Add some more information to the watchdog message.