network interfaces. This works by pre-computing the pseudo-header
checksum and caching it, delaying the actual checksum to ip_output()
if the hardware cannot perform the sum for us. In-bound checksums
can either be fully-checked by hardware, or summed up for final
verification by software. This method was modeled after how this
is done in FreeBSD, although the code is significantly different in
most places.
We don't delay checksums for IPv6/TCP, but we do take advantage of the
cached pseudo-header checksum.
Note: hardware-assisted checksumming defaults to "off". It is
enabled with ifconfig(8). See the manual page for details.
Implement hardware-assisted checksumming on the DP83820 Gigabit Ethernet,
3c90xB/3c90xC 10/100 Ethernet, and Alteon Tigon/Tigon2 Gigabit Ethernet.
SIP_EVENT_COUNTERS.
- Decrease SIP_NTXSEGS to 8 and increase SIP_TXQUEUELEN to 256.
This gives us 256 transmit jobs with only twice the descriptor
memory footprint. This prevents stalling transmissions due to
lack of transmit jobs under heavy load.
- Increase SIP_NRXDESC to 128 so we don't run out of receive descriptors
under extreme load.
- As recommended by the manual, leave one descriptor in the transmit ring
with OWN clear to prevent wrap-around.
- Even though the manual claims that driver software must initialize
TXDP if there are no pending transmissions when a new transmission
is to be initialized, doing so causes serious performance degredation
on the DP83820 under heavy load. Not initializing TXDP also increases
performance on the DP83815.
All of this gets us up to ~90Mb/s on both the DP83820 and DP83815 when
connected to a 100base network.
- Set the destination address register properly for "perfect match" mode
in the receive filter setup.
- Do not enable multicast receipt unless we are configured for some multicast.
- Use the "recommended settings" (which set undocumented registers and
documented-as-reserved fields) for the silicon revision 302h (not 203h,
as documented in one of the two places in the manual) because the
documentation is unclear and because those settings fix the card's
behavior in "perfect match" mode. Without those settings, the card
was generating random CRC/invalid symbol errors and generally not
working unless it was set to be promiscuous.
With these changes, this week's version of the Netgear FA311 works for me.
pci_attach_args *" instead of from four separate parameters which in
all cases were extracted from the same "struct pci_attach_args".
This both simplifies the driver api, and allows for alternate PCI
interrupt mapping schemes, such as one using the tables described in
the Intel Multiprocessor Spec which describe interrupt wirings for
devices behind pci-pci bridges based on the device's location rather
the bridge's location.
Tested on alpha and i386; welcome to 1.5Q
Ethernet chip, which is based on the SiS 900 core, but with differences
in the PHY and filter programming interface, and different WoL and
802.3x flow control programming.
This chip appears on new NetGear FA-312TX cards. Thank goodness
they're finally ditching the LiteOn chips.
- Add more delay after reset
- "Big endian mode" on SiS 900 seems broken so don't enable it;
use htole32()/le32toh() instead
- Don't cast u_int16_t array to u_int8_t pointer
- Add some delay() to FILTER_EMIT macro in sip_set_filter()
Now SiS 900 works on my macppc.
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.
The old timeout()/untimeout() API has been removed from the kernel.
* Don't allocate receive buffers until the interface is actually brought
up, and release all of them if the interface is taken down.
* Add a knob (defaults to off) which will copy an incoming packet to
a single header mbuf if it is small enough to fit in one, rather than
burning an entire cluster on it. Note that this change will be mostly
moot if/when sbcompress() it changed to handle compressing clusters.