Commit Graph

41 Commits

Author SHA1 Message Date
tls ab54d7e94f Add support for jumbo (9K) frames. Add support for larger receive
descriptor sizes if larger mbuf clusters are in use -- currently
commented out because, for some reason, transmit doesn't work at
all with large mbuf cluster sizes.

Note that using actual 9K frames is a _lot_ less efficient than
using frames that are a little smaller than 8K so that they fit
in one or two pages (instead of two or three) and avoid the extra
chained descriptor with only 1K of data in it, too.  TCP will
segment things just fine for an 8K total packet size, just as it
does for 1500-byte packets.

On my system, using "mtu 8000" with ifconfig, I get an almost 50%
performance boost for TCP (930Mbit/sec instead of 660Mbit/sec) over
1500-byte frames.  "mtu 9000" yields only 770Mbit/sec.
2003-09-10 04:02:17 +00:00
thorpej 2f2b9c7cb0 GMII works on the i82543 now. 2003-09-04 19:32:19 +00:00
thorpej 058f44ae26 Add support for the Intel PRO/1000 MT Quad Port server adapter; this
is just 2 i82546EB chips behind an IBM 133 PCI-X bridge.
2003-07-29 19:49:50 +00:00
lukem 365cbd9428 add missing __KERNEL_RCSID() 2003-07-14 15:47:00 +00:00
thorpej b43b1645a2 Use aprint*(). 2003-04-29 01:07:30 +00:00
tron 78a6a01cac Pullup short mbuf in wm_tx_cksum() instead of dropping it which fixes
PR kern/21190 by myself. Jason R. Thorpe code reviewed the changes.
2003-04-15 22:52:40 +00:00
thorpej b2beaa1fbd wm_tx_cksum(): Set the initial offset correctly for packets using
802.1Q encap.
2003-04-15 21:12:24 +00:00
kent d49a3d652c Support for 82540EP and 82540EP (LOM).
Not tested.
2003-04-05 13:23:17 +00:00
kent e7a590c1f1 Support for i82450EP. 2003-04-04 06:45:12 +00:00
thorpej b6fa4ee6ba Use bus_dmamap_load_mbuf() in wm_add_rxbuf(). 2003-02-04 17:40:31 +00:00
itojun aa8971e35f m_tag transition mistake (within #if 0) 2003-01-21 05:43:26 +00:00
itojun 40606ab8f2 switch from kame-based m_aux mbuf auxiliary data, to openbsd m_tag
implementation.  it will simplify porting across *bsd (such as kame/altq),
and make us more synchronized.  from Joel Wilsson
2003-01-17 08:11:49 +00:00
tsutsui 238efe4697 Replace magic numbers for power management control with PCI_PMCSR* macros.
XXX Should we use pci_get_powerstate() and pci_set_powerstate() in pci.c?
2002-12-23 02:58:36 +00:00
kristerw 2ce6431736 wm_copy_small in not used anywhere. Remove. 2002-12-21 16:12:15 +00:00
christos ab944659c0 change the macro params to longer names 2002-10-23 01:34:58 +00:00
fair 2104199dc3 Change the "dontcare bits" argument to ifmedia_init() to IFM_IMASK
so that it is possible select PHY instances other than the first
one (instance zero), if there is more than one PHY attached.
2002-10-21 23:38:10 +00:00
thorpej b75a007d9f Add trailing ; to CFATTACH_DECL. 2002-10-02 16:51:16 +00:00
thorpej 387fc6dc87 Use CFATTACH_DECL(). 2002-09-30 20:37:04 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
itojun a8b4aa9a72 #if 0 out call to rnd_add_uint32() in interrupt logic until thorpej
measures performance differences.
2002-08-23 16:30:10 +00:00
itojun e68a39d27b attach random number source. 2002-08-23 07:45:39 +00:00
thorpej 3e3fdc01e9 * After testing for DD on a descriptor, and finding it clear,
sync that descriptor with PREREAD to make sure that it is evicted
  from the data cache.  From Allen Briggs.
* With the above bug fixed, stop using BUS_DMA_COHERENT, resulting in
  a fairly decent performance improvement on systems where BUS_DMA_COHERENT
  causes descriptors to be accessed uncached (most painful in wm_start()).
2002-08-17 20:58:04 +00:00
thorpej 00a0212e10 Update a comment; TCP/IP checksum offloading is fixed! 2002-08-15 18:35:25 +00:00
briggs 8d5eb3e93d On transmit, zero the upper 32 bits of the address in the tx descriptor.
The descriptor may have been used as as context descriptor in the past,
in which case this field will be non-zero.  h/w checksum offload works now.
2002-08-15 18:29:02 +00:00
thorpej 2b615e62c4 Add support for the new i82540, i82545, and i82546 Gig-E chips. The
i82546 chip has 2 Gig-E interfaces in a single chip.

The main difference is these chips have a special handshaking protocol
for accessing the EEPROM (due to the shared nature on the i82546).
2002-08-08 00:12:08 +00:00
simonb d436dc19f3 Fix a typo in a comment. 2002-08-07 04:53:18 +00:00
simonb fdfab8da56 Fix a typo in a comment. 2002-08-06 23:51:43 +00:00
thorpej 4616eedacf Document exactly what the problem with TCP/UDP checksum offloading is. 2002-07-14 01:34:00 +00:00
thorpej bc09351189 And thus spake the manual...
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.
2002-07-14 01:12:28 +00:00
thorpej baecca774e * Shuffle the TODO list a bit.
* 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.
2002-07-09 21:05:03 +00:00
thorpej 77ef1df52c Don't use internal names to identify chips. Add types for the
i82540, i82545, and i82546 (but don't match them yet).
2002-07-09 19:47:46 +00:00
thorpej 297ae331d6 Make a few performance tweaks:
* 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.
2002-07-09 14:52:37 +00:00
thorpej 3e669d3bca * Increase the number of Tx job queue entries from 32 to 64.
* 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.
2002-05-09 01:00:12 +00:00
thorpej 3ce23a4ac6 * Instrument the number of times we force a Tx interrupt.
* 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.
2002-05-09 00:41:06 +00:00
thorpej 88f6c3663b Don't set WTX_TCPIP_CMD_TCP or WTX_TCPIP_CMD_IP in the TCP/IP context
descriptor.  Those are apparently only valid if using the Cordova's
"segmentation offload" feature.
2002-05-08 21:43:10 +00:00
thorpej d680cf3220 * Make sure the interrupt-delay bit gets set on ALL descriptors,
except for the one we want to force a Tx interrupt.
* Tweak the Tx descriptor accounting a little.
2002-05-08 21:22:20 +00:00
thorpej 3992641218 Implement a cache for the outbound IP/TCP/UDP checksum offload
context.
2002-05-08 19:00:27 +00:00
thorpej 935179d022 * Account for the descriptor consumed by the Tx checksum offload
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.
2002-05-08 17:53:28 +00:00
thorpej 84fbb01984 Fix a comment. 2002-05-02 16:34:47 +00:00
thorpej c115365b50 * Deal with errata on the i82542 and i82543 chips: The size of the
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.
2002-05-02 16:33:27 +00:00
thorpej 5f0f48a9f2 Device driver for the Intel i82542, i82542, and i82544 Gigabit
Ethernet interfaces.
2002-03-28 04:54:35 +00:00