re0 packet loss partially solved (patch included)

Sean McNeil sean at mcneil.com
Fri Oct 15 15:29:36 PDT 2004


Folks,

I've solved part of my problem with the re0 driver and it dropping
packets.  In interrupt mode, the xmit buffers are checked based on a
timer.  For 8169 chips, this timer was set to check half as often as
with non-8169 chips.  It should have been set to check twice as often.

I still have packet loss in polling mode, however, and have not
determined how to fix it.  I'm confident it is related and that packets
are being tossed because the xmit queue isn't being checked often
enough.

The following patch fixes xmit packet loss in interrupt mode:

*** sys/dev/re/if_re.c.orig	Tue Sep 28 11:22:24 2004
--- sys/dev/re/if_re.c	Fri Oct 15 15:19:55 2004
*************** re_init_locked(sc)
*** 2217,2223 ****
  	 * moderation, which dramatically improves TX frame rate.
  	 */
  	if (sc->rl_type == RL_8169)
! 		CSR_WRITE_4(sc, RL_TIMERINT_8169, 0x800);
  	else
  		CSR_WRITE_4(sc, RL_TIMERINT, 0x400);
  
--- 2217,2223 ----
  	 * moderation, which dramatically improves TX frame rate.
  	 */
  	if (sc->rl_type == RL_8169)
! 		CSR_WRITE_4(sc, RL_TIMERINT_8169, 0x200);
  	else
  		CSR_WRITE_4(sc, RL_TIMERINT, 0x400);
  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20041015/408c2171/attachment.bin


More information about the freebsd-current mailing list