[dpdk-dev] [PATCH v2] net/i40e: solve the failure of vf vlan filtering

Xing, Beilei beilei.xing at intel.com
Wed Aug 25 09:13:36 CEST 2021



> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Qiming Chen
> Sent: Tuesday, August 24, 2021 5:30 PM
> To: dev at dpdk.org
> Cc: Xing, Beilei <beilei.xing at intel.com>; Qiming Chen
> <chenqiming_huawei at 163.com>
> Subject: [dpdk-dev] [PATCH v2] net/i40e: solve the failure of vf vlan filtering
> 
> When vf driver port promiscuous is turned on, the vlan filtering function is
> invalid.
> Through communication with PAE expert, this is a limitation of the i40e chip.
> Before adding or removing VLANs, you must first disable unicast
> promiscuous or multicast promiscuous, then operate the vlan, and finally
> restore unicast promiscuous or multicast promiscuous state.

Thanks for the patch.
But I heard from DPDK validation team that there's no vf vlan filter issue with
i40evf driver. Please refer to the test plan
https://doc.dpdk.org/dts/test_plans/kernelpf_iavf_test_plan.html.

So could you please detail the issue?
E.g. do you use kernel PF + DPDK VF or DPDK PF + DPDK VF? 
What's the driver version? And what's the step to reproduce with testpmd?

BTW, for the commit log, needn't to describe the details you communicated
with PAE, just describe what's the issue, the root cause, and how to fix it.
Besides, fix patch needs fix line. Please refer to other fix patches.

Beilei

> 
> Signed-off-by: Qiming Chen <chenqiming_huawei at 163.com>
> ---
>  drivers/net/i40e/i40e_ethdev_vf.c | 23 +++++++++++++++++++++--
>  1 file changed, 21 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c
> b/drivers/net/i40e/i40e_ethdev_vf.c
> index 12e69a3233..a099daae6b 100644
> --- a/drivers/net/i40e/i40e_ethdev_vf.c
> +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> @@ -1900,11 +1900,30 @@ static int
>  i40evf_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)  {
>  	int ret;
> +	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
> +	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data-
> >dev_private);
> +	bool promisc_unicast_enabled = vf->promisc_unicast_enabled;
> +	bool promisc_multicast_enabled = vf->promisc_multicast_enabled;
> 
> -	if (on)
> +	if (promisc_unicast_enabled)
> +		i40evf_dev_promiscuous_disable(dev);
> +
> +	if (promisc_multicast_enabled)
> +		i40evf_dev_allmulticast_disable(dev);
> +
> +	if (on) {
>  		ret = i40evf_add_vlan(dev, vlan_id);
> -	else
> +		if ((dev_conf->rxmode.offloads &
> DEV_RX_OFFLOAD_VLAN_STRIP) == 0)
> +			i40evf_disable_vlan_strip(dev);
> +	} else {
>  		ret = i40evf_del_vlan(dev,vlan_id);
> +	}
> +
> +	if (promisc_unicast_enabled)
> +		i40evf_dev_promiscuous_enable(dev);
> +
> +	if (promisc_multicast_enabled)
> +		i40evf_dev_allmulticast_enable(dev);
> 
>  	return ret;
>  }
> --
> 2.30.1.windows.1



More information about the dev mailing list