Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH net] net: dsa: lantiq_gswip: fix maximum frame length
@ 2021-09-01 18:49 Jan Hoffmann
2021-09-01 21:30 ` Hauke Mehrtens
2021-09-02 10:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Jan Hoffmann @ 2021-09-01 18:49 UTC (permalink / raw)
To: hauke, netdev; +Cc: Jan Hoffmann, stable
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.
Fixes: 14fceff4771e ("net: dsa: Add Lantiq / Intel DSA driver for vrx200")
Cc: stable@vger.kernel.org
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
---
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);
--
2.33.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: dsa: lantiq_gswip: fix maximum frame length
2021-09-01 18:49 [PATCH net] net: dsa: lantiq_gswip: fix maximum frame length Jan Hoffmann
@ 2021-09-01 21:30 ` Hauke Mehrtens
2021-09-02 10:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Hauke Mehrtens @ 2021-09-01 21:30 UTC (permalink / raw)
To: Jan Hoffmann, netdev; +Cc: stable, Thomas Nixon
[-- Attachment #1.1.1: Type: text/plain, Size: 1592 bytes --]
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@vger.kernel.org
> Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Acked-by: Hauke Mehrtens <hauke@hauke-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);
>
>
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 13751 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] net: dsa: lantiq_gswip: fix maximum frame length
2021-09-01 18:49 [PATCH net] net: dsa: lantiq_gswip: fix maximum frame length Jan Hoffmann
2021-09-01 21:30 ` Hauke Mehrtens
@ 2021-09-02 10:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-09-02 10:40 UTC (permalink / raw)
To: Jan Hoffmann; +Cc: hauke, netdev, stable
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Wed, 1 Sep 2021 20:49:33 +0200 you 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.
>
> [...]
Here is the summary with links:
- [net] net: dsa: lantiq_gswip: fix maximum frame length
https://git.kernel.org/netdev/net/c/552799f8b3b0
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-02 10:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-01 18:49 [PATCH net] net: dsa: lantiq_gswip: fix maximum frame length Jan Hoffmann
2021-09-01 21:30 ` Hauke Mehrtens
2021-09-02 10:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).