From 187960992256630c99847633a0e1c34e1065d0e4 Mon Sep 17 00:00:00 2001 From: Balazs Nemeth Date: Fri, 11 Aug 2023 11:40:35 +0200 Subject: [PATCH] Never reduce MTU on PF In case a policy specifying a different MTU, in the past, the MTU of the PF associated with the VFs would also be updated. Since reducing the MTU on PF could cause issues when the PF is used by other things too (i.e. primary network), reducing the MTU could cause connectivity issues. Therefore, take the conservative approach of never reducing the MTU on the PF when configuring the MTU on the VF. Signed-off-by: Balazs Nemeth --- pkg/utils/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index f14825881..5aae1fdec 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -262,7 +262,7 @@ func configSriovDevice(iface *sriovnetworkv1.Interface, ifaceStatus *sriovnetwor } } // set PF mtu - if iface.Mtu > 0 && iface.Mtu != ifaceStatus.Mtu { + if iface.Mtu > 0 && iface.Mtu > ifaceStatus.Mtu { err = setNetdevMTU(iface.PciAddress, iface.Mtu) if err != nil { glog.Warningf("configSriovDevice(): fail to set mtu for PF %s: %v", iface.PciAddress, err)