Subject: Re: kern/22466: sip driver doesn't configure DP83815 chip to accept long frames
To: Valtteri Vuorikoski <vuori@puuhamaa.magenta.net>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-bugs
Date: 08/13/2003 20:34:56
On Wed, Aug 13, 2003 at 04:06:01PM +0300, Valtteri Vuorikoski wrote:
> >Description:
>
> The sip driver doesn't configure the Ethernet chip (DP83815) to accept
> frames over 1518 bytes long. This causes ip packets larger than 1496
> bytes to get truncated when sent over 802.1Q VLAN trunks.
>
> (The PR kern/22459 sent by me is tangentially related to this issue
> but is based on false assumptions, and should be killed.)
>
> >How-To-Repeat:
>
> Connect a sip interface to a 802.1Q trunk, create a VLAN interface,
> try ping -s 1472 vlan.interface from another machine. Note ip packets
> truncated to 1496 bytes.
>
> >Fix:
>
> The following patch in /sys/dev/pci corrects the problem. if_sipreg.h
> is changed to reflect the nomenclature in the DP83815 data sheet
> (p. 52) for the "accept long packets" bit.
>
> I couldn't find a datasheet for the SiS 900 chip and don't have one to
> test, so I don't know what effect this may have on those.
>
> --- if_sip.c.orig Tue Aug 12 22:27:13 2003
> +++ if_sip.c Wed Aug 13 12:49:33 2003
> @@ -2268,6 +2268,12 @@
> sc->sc_txcfg = TXCFG_MXDMA_512;
> sc->sc_rxcfg = RXCFG_MXDMA_512;
> }
> +
> + /*
> + * Accept packets >1518 bytes (including FCS) so we can handle
> + * 802.1q-tagged frames properly.
> + */
> + sc->sc_rxcfg |= RXCFG_ALP;
> #endif /* DP83820 */
You should do it conditionally, only when the ETHERCAP_VLAN_MTU
flag is set in ec->ec_capenable. See for example sys/dev/ic/tulip.c.
Can you try to update your patch ?
--
Manuel Bouyer <bouyer@antioche.eu.org>
NetBSD: 24 ans d'experience feront toujours la difference
--