Subject: Re: Problem with sip(4) truncating full-sized frames when used with vlan(4)
To: Pavel Cahyna <pavel.cahyna@st.mff.cuni.cz>
From: Bill Studenmund <wrstuden@netbsd.org>
List: current-users
Date: 03/11/2006 21:27:05
--u65IjBhB3TIa72Vp
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Mar 05, 2006 at 12:05:02PM +0100, Pavel Cahyna wrote:
> On Sun, Mar 05, 2006 at 07:37:02AM +0100, Nino Dehne wrote:
> > Hi,
> >=20
> > could somebody please look into the problem I described in kern/32900?
> >=20
> > It bit me again recently. I now have to set the MTU on _every_ box on t=
he
> > segment to 1496 or else I get weird behaviour like full-sized HTTP POSTs
> > not working while normal browsing works.
> >=20
> > I can almost definitely say that sip(4) used to work with vlan(4) and I
> > never had problems under 3.0.
>=20
> There was one change to this driver which could be related. Try reverting
> it with this patch:
>=20
>=20
> @@ -1899,8 +1899,8 @@
>  		m->m_len -=3D ETHER_CRC_LEN;
> =20
>  		*sc->sc_rxtailp =3D NULL;
> -		len =3D m->m_len + sc->sc_rxlen;
>  		m =3D sc->sc_rxhead;
> +		len =3D m->m_len + sc->sc_rxlen;
> =20
>  		SIP_RXCHAIN_RESET(sc);

If you do that, you'll never have jumbo frames work. That bug fixes an=20
issue which was in a number of NIC drivers (probalby copied around) and=20
made all jumbo frames die.

Note how in one variant, m->m_len is the length of the last mbuf in the
chain in a jumbo chain, while in the other it is the length of the first
mbuf in the chain. Note further that the first mbuf's length is already in
sc->sc_rxlen. Thus one version will add the first mbuf twice and never add
the length of the last mbuf in the chain.

:-)

Take care,

Bill

--u65IjBhB3TIa72Vp
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFEE7EoWz+3JHUci9cRAtN6AJwPtSrGFVVFXj4bX52Z1fsYI5biawCaAz0B
WMSaIHAO/MrumFfOSCNkp/Y=
=k4RL
-----END PGP SIGNATURE-----

--u65IjBhB3TIa72Vp--