From: Rosen Penev Date: Tue, 26 May 2026 20:22:47 +0000 (-0700) Subject: net: ibm: emac: Reserve VLAN header in MJS limit X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0906c117f81c2ae6e6dbfa82719f79c75e1c9325;p=thirdparty%2Flinux.git net: ibm: emac: Reserve VLAN header in MJS limit The IBM EMAC programs its Maximum Jumbo Size (MJS) drop threshold from ndev->mtu directly. The hardware sizes the threshold against the L2 frame minus the ethernet header, but does not discount the 802.1Q tag, so a frame carrying a VLAN tag and a full 1500-byte payload exceeds MJS by exactly 4 bytes and is dropped. This is normally hidden because JPSM (and therefore the MJS check) only engages when the MTU is raised above ETH_DATA_LEN. With the qca8k DSA tagger the conduit MTU is bumped by QCA_HDR_LEN to 1502 during dsa_conduit_setup(), which is enough to enable JPSM and expose the off-by-VLAN-tag in the limit. Pad MJS by VLAN_HLEN so a VLAN-tagged full-MTU frame passes. Reported on Meraki MX60 (qca8k switch): tagged VLAN traffic drops at 1500-byte payload, while 1496 bytes works and untagged 1500 bytes works. Assisted-by: Claude:Opus-4.7 Signed-off-by: Rosen Penev Link: https://patch.msgid.link/20260526202247.13823-1-rosenp@gmail.com Signed-off-by: Paolo Abeni --- diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c index 7216209211d96..e597e2ad434cc 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -457,7 +458,7 @@ static inline u32 emac_iff2rmr(struct net_device *ndev) if (emac_has_feature(dev, EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE)) { r &= ~EMAC4_RMR_MJS_MASK; - r |= EMAC4_RMR_MJS(ndev->mtu); + r |= EMAC4_RMR_MJS(ndev->mtu + VLAN_HLEN); } return r;