* [dpdk-dev] net/i40e: VF with vlan ID set from host does not work
@ 2018-12-14 21:28 Min Tang
2018-12-17 15:47 ` Min Tang
0 siblings, 1 reply; 2+ messages in thread
From: Min Tang @ 2018-12-14 21:28 UTC (permalink / raw)
To: dev
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] net/i40e: VF with vlan ID set from host does not work
2018-12-14 21:28 [dpdk-dev] net/i40e: VF with vlan ID set from host does not work Min Tang
@ 2018-12-17 15:47 ` Min Tang
0 siblings, 0 replies; 2+ messages in thread
From: Min Tang @ 2018-12-17 15:47 UTC (permalink / raw)
To: dev, qi.z.zhang, beilei.xing
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@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);
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-17 15:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-14 21:28 [dpdk-dev] net/i40e: VF with vlan ID set from host does not work Min Tang
2018-12-17 15:47 ` Min Tang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).