I have found the source of both issues, but will require a kernel patch to fix.
The problematic file in question is kernel/nvidia/drivers/net/ethernet/nvethernet/ether_linux.c starting at line 3860.
There is a check to verify that the network interface is down:
if (netif_running(ndev)) {
netdev_err(pdata->ndev, "must be stopped to change its MTU\n");
return -EBUSY;
}
Im curious if I could just comment this out, but dont know what the effects of an online MTU change would be.
Then a few lines down, it blindly forces a MTU change regardless if the register set for macsec is present or not.
#ifdef MACSEC_SUPPORT
/* Macsec is supported, reduce MTU */
if ((osi_core->mac == OSI_MAC_HW_EQOS && osi_core->mac_ver == OSI_EQOS_MAC_5_30) ||
(osi_core->mac == OSI_MAC_HW_MGBE && osi_core->mac_ver == OSI_MGBE_MAC_3_10)) {
ndev->mtu -= MACSEC_TAG_ICV_LEN;
netdev_info(pdata->ndev, "Macsec: Reduced MTU: %d Max: %d\n",
ndev->mtu, ndev->max_mtu);
}
#endif /* MACSEC_SUPPORT */
There is no way to enable/disable macsec at the device tree level it seems. I tried removing the register pointing to the macsec hardware but this check ignores it. There should be a device tree option like nvidia,macsec-enabled added.