re0 packet loss partially solved (patch included)

From: Sean McNeil <sean_at_mcneil.com>
Date: Fri, 15 Oct 2004 15:29:35 -0700
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);
  


Received on Fri Oct 15 2004 - 20:29:36 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:17 UTC