Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Oct 2004 15:29:35 -0700
From:      Sean McNeil <sean@mcneil.com>
To:        freebsd-current@freebsd.org
Subject:   re0 packet loss partially solved (patch included)
Message-ID:  <1097879374.1215.7.camel@server.mcneil.com>

next in thread | raw e-mail | index | archive | help

--=-gH/jVksQCMBZcpqgKOUp
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

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 =3D=3D RL_8169)
! 		CSR_WRITE_4(sc, RL_TIMERINT_8169, 0x800);
  	else
  		CSR_WRITE_4(sc, RL_TIMERINT, 0x400);
 =20
--- 2217,2223 ----
  	 * moderation, which dramatically improves TX frame rate.
  	 */
  	if (sc->rl_type =3D=3D RL_8169)
! 		CSR_WRITE_4(sc, RL_TIMERINT_8169, 0x200);
  	else
  		CSR_WRITE_4(sc, RL_TIMERINT, 0x400);
 =20


--=-gH/jVksQCMBZcpqgKOUp
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQBBcE9OyQsGN30uGE4RAqOaAKDIy4ShsIUoBDnL3zqvswhGb3/ZzACfczmd
2N/j7zwJJXNOihDs4gEW84s=
=ft6q
-----END PGP SIGNATURE-----

--=-gH/jVksQCMBZcpqgKOUp--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1097879374.1215.7.camel>