[dpdk-dev] net/i40e: VF with vlan ID set from host does not work

Min Tang tommytang at gmail.com
Mon Dec 17 16:47:49 CET 2018

More information: the i40e driver on host (ubuntu16.04) was 2.2.4, but I
tried the latest 2.7.26 i40e driver and it had the same problem. DPDK 17.05
was running in a linux VM, but I don't think the latest DPDK has solved
the problem. It's easy to reproduce.

On Fri, Dec 14, 2018 at 4:28 PM Min Tang <tommytang at gmail.com> wrote:

> Hi All:
> When vlan ID was set on a VF from host by "ip link set <pf> vf <vf> vlan
> <vlan id>", other VF with the same ID  could not ping it. Packet capturing
> showed that it could receive packets but it failed to send packet. There
> was no such issue with linux driver. I understand that it needs vlan
> stripping/insertion to work: PF strips vlan tag when sending packet to VF
> and insert vlan tag for packets received from VF. It looked like that vlan
> insertion did not work although vlan stripping worked fine.
> The problem was caused by vlan stripping enabling in i40evf_init_vlan. It
> worked after I made the following change. To make port vlan work, we have
> to enable vlan stripping, but I don't know why enabling vlan stripping
> makes vlan insertion fail. The ixgbe driver does not have the issue.
> Index: git/drivers/net/i40e/i40e_ethdev_vf.c
> ===================================================================
> --- git.orig/drivers/net/i40e/i40e_ethdev_vf.c
> +++ git/drivers/net/i40e/i40e_ethdev_vf.c
> @@ -1633,9 +1632,6 @@ i40evf_init_vlan(struct rte_eth_dev *dev
>         struct rte_eth_dev_data *data = dev->data;
>         int ret;
> -       /* Apply vlan offload setting */
> -       i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK);
> -
>         /* Apply pvid setting */
>         ret = i40evf_vlan_pvid_set(dev, data->dev_conf.txmode.pvid,
>                                 data->dev_conf.txmode.hw_vlan_insert_pvid);

More information about the dev mailing list