Skip to content

Commit

Permalink
Never reduce MTU on PF
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
bn222 committed Aug 11, 2023
1 parent cd82b04 commit 1879609
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1879609

Please sign in to comment.