net: macb: increase max_mtu for oversized frames
Increase max_mtu from 1500 to 1518 bytes when not configured for jumbo frames. Use 1536 as a starting point as documented in macb.h for oversized (big) frames, which is the configuration applied in case jumbo frames capability is not configured; ref. macb_main.c. Signed-off-by: Pieter Van Trappen <pieter.van.trappen@cern.ch> Link: https://patch.msgid.link/20240812090657.583821-1-vtpieter@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
e7d731326e
commit
7cb4357964
@@ -5119,12 +5119,12 @@ static int macb_probe(struct platform_device *pdev)
|
||||
goto err_out_free_netdev;
|
||||
}
|
||||
|
||||
/* MTU range: 68 - 1500 or 10240 */
|
||||
/* MTU range: 68 - 1518 or 10240 */
|
||||
dev->min_mtu = GEM_MTU_MIN_SIZE;
|
||||
if ((bp->caps & MACB_CAPS_JUMBO) && bp->jumbo_max_len)
|
||||
dev->max_mtu = bp->jumbo_max_len - ETH_HLEN - ETH_FCS_LEN;
|
||||
else
|
||||
dev->max_mtu = ETH_DATA_LEN;
|
||||
dev->max_mtu = 1536 - ETH_HLEN - ETH_FCS_LEN;
|
||||
|
||||
if (bp->caps & MACB_CAPS_BD_RD_PREFETCH) {
|
||||
val = GEM_BFEXT(RXBD_RDBUFF, gem_readl(bp, DCFG10));
|
||||
|
||||
Reference in New Issue
Block a user