DPDK patches and discussions
 help / color / mirror / Atom feed
From: Min Tang <tommytang@gmail.com>
To: dev@dpdk.org
Subject: [dpdk-dev] net/i40e: VF with vlan ID set from host does not work
Date: Fri, 14 Dec 2018 16:28:47 -0500	[thread overview]
Message-ID: <CAEHUbGQfk6C1g8xSJdrcNWtuOeGs+iWov+mcoAgU0ZYnCiwffQ@mail.gmail.com> (raw)

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);

             reply	other threads:[~2018-12-14 21:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-14 21:28 Min Tang [this message]
2018-12-17 15:47 ` Min Tang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEHUbGQfk6C1g8xSJdrcNWtuOeGs+iWov+mcoAgU0ZYnCiwffQ@mail.gmail.com \
    --to=tommytang@gmail.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).