From: Souvik Dey <sodey@rbbn.com>
To: beilei.xing@intel.com, jia.guo@intel.com, qi.z.zhang@intel.com
Cc: dev@dpdk.org, Souvik Dey <sodey@rbbn.com>
Subject: [dpdk-dev] [PATCH v3] net/i40e: issue with ADD VLAN from Guest
Date: Tue, 15 Dec 2020 08:28:15 -0500 [thread overview]
Message-ID: <20201215132815.15200-1-sodey@rbbn.com> (raw)
In-Reply-To: <20201212130525.14656-1-sodey@rbbn.com>
Reset the configuration of vlan strip that would be change
by the pf kernel driver when adding vlan from vf.
Application cannot use rte_eth_dev_set_vlan_offload() to set
the VLAN_STRIP, as this will only work for the first time when
original and current config mismatch, but for all subsequent call
it will be ignored.
Signed-off-by: Souvik Dey <sodey@rbbn.com>
---
v3:
* Changed the error log in case vlan strip command fails
as per the latest comment.
---
v2:
* Simplied the commit log.
* goto err; is not required as it has only one more return path
and there is no cleanup required apart from just return err.
* Updated the comment start from /* -> /**
* Changed the error log in case vlan strip command fails.
---
drivers/net/i40e/i40e_ethdev_vf.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index c26b036..2faee1d 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1078,8 +1078,18 @@ i40evf_add_vlan(struct rte_eth_dev *dev, uint16_t vlanid)
args.out_buffer = vf->aq_resp;
args.out_size = I40E_AQ_BUF_SZ;
err = i40evf_execute_vf_cmd(dev, &args);
- if (err)
+ if (err) {
PMD_DRV_LOG(ERR, "fail to execute command OP_ADD_VLAN");
+ return err;
+ }
+ /**
+ * In linux kernel driver on receiving ADD_VLAN it enables
+ * VLAN_STRIP by default. So reconfigure the vlan_offload
+ * as it was done by the app earlier.
+ */
+ err = i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK);
+ if (err)
+ PMD_DRV_LOG(ERR, "fail to set vlan_strip");
return err;
}
--
2.9.3.windows.1
next prev parent reply other threads:[~2020-12-15 13:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-09 17:55 [dpdk-dev] [PATCH] " Souvik Dey
2020-12-11 3:07 ` Guo, Jia
2020-12-12 12:26 ` Dey, Souvik
2020-12-12 13:05 ` [dpdk-dev] [PATCH v2] " Souvik Dey
2020-12-15 2:24 ` Guo, Jia
2020-12-15 13:16 ` Dey, Souvik
2020-12-15 13:30 ` Dey, Souvik
2020-12-15 13:28 ` Souvik Dey [this message]
2020-12-16 2:09 ` [dpdk-dev] [PATCH v3] " Guo, Jia
2020-12-23 10:51 ` Zhang, Qi Z
2021-01-04 16:42 ` Ferruh Yigit
2021-01-05 3:07 ` Guo, Jia
2021-01-05 10:45 ` Ferruh Yigit
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=20201215132815.15200-1-sodey@rbbn.com \
--to=sodey@rbbn.com \
--cc=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=jia.guo@intel.com \
--cc=qi.z.zhang@intel.com \
/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).