From 5ed6b64c99d049af0496199c245e0389cb9b8a27 Mon Sep 17 00:00:00 2001 From: gechiang <62408185+gechiang@users.noreply.github.com> Date: Sat, 14 Aug 2021 17:01:00 -0700 Subject: [PATCH] Reapply the fix to address setting MTU > 1500 causing portmgrd crash on BRCM platforms (#8472) --- .../systems/linux/kernel/modules/bcm-knet/bcm-knet.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/broadcom/saibcm-modules/systems/linux/kernel/modules/bcm-knet/bcm-knet.c b/platform/broadcom/saibcm-modules/systems/linux/kernel/modules/bcm-knet/bcm-knet.c index a3f92b17584b..43edc056beff 100644 --- a/platform/broadcom/saibcm-modules/systems/linux/kernel/modules/bcm-knet/bcm-knet.c +++ b/platform/broadcom/saibcm-modules/systems/linux/kernel/modules/bcm-knet/bcm-knet.c @@ -6341,6 +6341,11 @@ bkn_init_ndev(u8 *mac, char *name) dev->mtu = rx_buffer_size; } +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) + dev->min_mtu = 68; + dev->max_mtu = rx_buffer_size; +#endif + /* Device vectors */ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29)) dev->netdev_ops = &bkn_netdev_ops;