[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <72db98ef-b27d-f6b0-ebfa-c5f3e5ec8b3c@hauke-m.de>
Date: Wed, 1 Sep 2021 23:30:48 +0200
From: Hauke Mehrtens <hauke@...ke-m.de>
To: Jan Hoffmann <jan@....eu>, netdev@...r.kernel.org
Cc: stable@...r.kernel.org, Thomas Nixon <tom@...n.co.uk>
Subject: Re: [PATCH net] net: dsa: lantiq_gswip: fix maximum frame length
On 9/1/21 8:49 PM, Jan Hoffmann wrote:
> Currently, outgoing packets larger than 1496 bytes are dropped when
> tagged VLAN is used on a switch port.
>
> Add the frame check sequence length to the value of the register
> GSWIP_MAC_FLEN to fix this. This matches the lantiq_ppa vendor driver,
> which uses a value consisting of 1518 bytes for the MAC frame, plus the
> lengths of special tag and VLAN tags.
This field is the size of the Ethernet Frame which probably includes the
FCS which your patch adds.
There is also a discussion in the OpenWrt github about the same topic:
https://github.com/openwrt/openwrt/pull/4353
> Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200")
> Cc: stable@...r.kernel.org
> Signed-off-by: Jan Hoffmann <jan@....eu>
Acked-by: Hauke Mehrtens <hauke@...ke-m.de>
> ---
> drivers/net/dsa/lantiq_gswip.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
> index e78026ef6d8c..64d6dfa83122 100644
> --- a/drivers/net/dsa/lantiq_gswip.c
> +++ b/drivers/net/dsa/lantiq_gswip.c
> @@ -843,7 +843,8 @@ static int gswip_setup(struct dsa_switch *ds)
>
> gswip_switch_mask(priv, 0, GSWIP_MAC_CTRL_2_MLEN,
> GSWIP_MAC_CTRL_2p(cpu_port));
> - gswip_switch_w(priv, VLAN_ETH_FRAME_LEN + 8, GSWIP_MAC_FLEN);
> + gswip_switch_w(priv, VLAN_ETH_FRAME_LEN + 8 + ETH_FCS_LEN,
> + GSWIP_MAC_FLEN);
> gswip_switch_mask(priv, 0, GSWIP_BM_QUEUE_GCTRL_GL_MOD,
> GSWIP_BM_QUEUE_GCTRL);
>
>
Download attachment "OpenPGP_0x93DD20630910B515.asc" of type "application/pgp-keys" (13572 bytes)
Download attachment "OpenPGP_signature" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists