Skip to content

Commit 0906c11

Browse files
nehebPaolo Abeni
authored andcommitted
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 <rosenp@gmail.com> Link: https://patch.msgid.link/20260526202247.13823-1-rosenp@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent c2c0486 commit 0906c11

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • drivers/net/ethernet/ibm/emac

drivers/net/ethernet/ibm/emac/core.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <linux/skbuff.h>
3131
#include <linux/crc32.h>
3232
#include <linux/ethtool.h>
33+
#include <linux/if_vlan.h>
3334
#include <linux/mii.h>
3435
#include <linux/bitops.h>
3536
#include <linux/of.h>
@@ -457,7 +458,7 @@ static inline u32 emac_iff2rmr(struct net_device *ndev)
457458

458459
if (emac_has_feature(dev, EMAC_APM821XX_REQ_JUMBO_FRAME_SIZE)) {
459460
r &= ~EMAC4_RMR_MJS_MASK;
460-
r |= EMAC4_RMR_MJS(ndev->mtu);
461+
r |= EMAC4_RMR_MJS(ndev->mtu + VLAN_HLEN);
461462
}
462463

463464
return r;

0 commit comments

Comments
 (0)