If configuring VF promiscuous mode is not supported,
return -ENOTSUP error code in .promiscuous_enable/disable dev_ops.
This is to fix the port start during configuration restore,
where if .promiscuous_enable/disable dev_ops exists
and return any value other than -ENOTSUP, start will fail.
Same is done for .allmulticast_enable/disable dev_ops.
Fixes:
ca041cd44fcc ("ethdev: change allmulticast callbacks to return status")
Fixes:
9039c8125730 ("ethdev: change promiscuous callbacks to return status")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
ret = iavf_config_promisc(adapter, true, vf->promisc_multicast_enabled);
if (!ret)
vf->promisc_unicast_enabled = true;
+ else if (ret == IAVF_NOT_SUPPORTED)
+ ret = -ENOTSUP;
else
ret = -EAGAIN;
vf->promisc_multicast_enabled);
if (!ret)
vf->promisc_unicast_enabled = false;
+ else if (ret == IAVF_NOT_SUPPORTED)
+ ret = -ENOTSUP;
else
ret = -EAGAIN;
ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, true);
if (!ret)
vf->promisc_multicast_enabled = true;
+ else if (ret == IAVF_NOT_SUPPORTED)
+ ret = -ENOTSUP;
else
ret = -EAGAIN;
ret = iavf_config_promisc(adapter, vf->promisc_unicast_enabled, false);
if (!ret)
vf->promisc_multicast_enabled = false;
+ else if (ret == IAVF_NOT_SUPPORTED)
+ ret = -ENOTSUP;
else
ret = -EAGAIN;