From 02b892149a8ee10a6caa92f34cad88b042285b7b Mon Sep 17 00:00:00 2001 From: Gris Ge Date: Wed, 28 Jun 2023 22:36:41 +0800 Subject: [PATCH] sriov: do not fail activation on SR-IOV VF failures When user are changing SR-IOV VF settings for options like `max-tx-rate` which some hardware not supported yet, the failure of this VF will fail the whole activation, then the SR-IOV will be disabled means all the VFs will be deleted. Deleting VFs might break network connectivity and this collateral damage of VF option failure is not acceptable for OpenShift use cases even they have checkpoint protection. This patch only log warn message on failure of VF options and will not fail the activation. NetworkManager also ignore MTU failure during activation, I believe this fit into the same assumption. User case reference: https://bugzilla.redhat.com/show_bug.cgi?id=2210164 Signed-off-by: Gris Ge --- src/core/devices/nm-device.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 144c300d8..e2a49de53 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -9590,11 +9590,7 @@ sriov_params_cb(GError *error, gpointer user_data) if (!nm_platform_link_set_sriov_vfs(nm_device_get_platform(self), priv->ifindex, (const NMPlatformVF *const *) plat_vfs)) { - _LOGE(LOGD_DEVICE, "failed to apply SR-IOV VFs"); - nm_device_state_changed(self, - NM_DEVICE_STATE_FAILED, - NM_DEVICE_STATE_REASON_SRIOV_CONFIGURATION_FAILED); - return; + _LOGW(LOGD_DEVICE, "failed to apply SR-IOV VF configurations"); } priv->stage1_sriov_state = NM_DEVICE_STAGE_STATE_COMPLETED;