[dpdk-stable] [dpdk-dev] net/i40e: add promiscuous configure unsupported check

Ye Xiaolong xiaolong.ye at intel.com
Mon Mar 2 03:20:16 CET 2020


On 02/28, Xiao Zhang wrote:
>Return ENOTSUP error code when configuring i40evf promiscuous mode to
>fix port start hang issue on platforms which are unsupported to configure
>promiscuous mode.
>
>Fixes: ddc7cb0d9453 ("net/i40e: re-program promiscuous mode on VF
>interface")

Please don't truncate the Fixes tag line, otherwise check-git-log.sh will complain.

>Cc: stable at dpdk.org
>
>Signed-off-by: Xiao Zhang <xiao.zhang at intel.com>
>---
> drivers/net/i40e/i40e_ethdev_vf.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
>diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
>index c34f520..244397e 100644
>--- a/drivers/net/i40e/i40e_ethdev_vf.c
>+++ b/drivers/net/i40e/i40e_ethdev_vf.c
>@@ -2191,6 +2191,8 @@ i40evf_dev_promiscuous_enable(struct rte_eth_dev *dev)
> 	ret = i40evf_config_promisc(dev, 1, vf->promisc_multicast_enabled);
> 	if (ret == 0)
> 		vf->promisc_unicast_enabled = TRUE;
>+	else if (ret == I40E_NOT_SUPPORTED)
>+		ret = -ENOTSUP;
> 	else
> 		ret = -EAGAIN;
> 
>@@ -2206,6 +2208,8 @@ i40evf_dev_promiscuous_disable(struct rte_eth_dev *dev)
> 	ret = i40evf_config_promisc(dev, 0, vf->promisc_multicast_enabled);
> 	if (ret == 0)
> 		vf->promisc_unicast_enabled = FALSE;
>+	else if (ret == I40E_NOT_SUPPORTED)
>+		ret = -ENOTSUP;
> 	else
> 		ret = -EAGAIN;
> 
>@@ -2221,6 +2225,8 @@ i40evf_dev_allmulticast_enable(struct rte_eth_dev *dev)
> 	ret = i40evf_config_promisc(dev, vf->promisc_unicast_enabled, 1);
> 	if (ret == 0)
> 		vf->promisc_multicast_enabled = TRUE;
>+	else if (ret == I40E_NOT_SUPPORTED)
>+		ret = -ENOTSUP;
> 	else
> 		ret = -EAGAIN;
> 
>@@ -2236,6 +2242,8 @@ i40evf_dev_allmulticast_disable(struct rte_eth_dev *dev)
> 	ret = i40evf_config_promisc(dev, vf->promisc_unicast_enabled, 0);
> 	if (ret == 0)
> 		vf->promisc_multicast_enabled = FALSE;
>+	else if (ret == I40E_NOT_SUPPORTED)
>+		ret = -ENOTSUP;
> 	else
> 		ret = -EAGAIN;
> 
>-- 
>2.7.4
>

For the rest,

Reviewed-by: Xiaolong Ye <xiaolong.ye at intel.com>

Applied to dpdk-next-net-intel with the Fixes line fix, Thanks.


More information about the stable mailing list