[dpdk-dev] [PATCH v2] net/i40e: issue with ADD VLAN from Guest

Dey, Souvik sodey at rbbn.com
Tue Dec 15 14:16:02 CET 2020


Hi Guo,

Ok sure will remove the extra log and submit the version 3. I have not received any other comments , so will also add your ACK in the next version then.

--
Regards,
Souvik

From: Guo, Jia <jia.guo at intel.com>
Sent: Monday, December 14, 2020 9:24 PM
To: Dey, Souvik <sodey at rbbn.com>; Xing, Beilei <beilei.xing at intel.com>; Zhang, Qi Z <qi.z.zhang at intel.com>
Cc: dev at dpdk.org
Subject: RE: [PATCH v2] net/i40e: issue with ADD VLAN from Guest

________________________________
NOTICE: This email was received from an EXTERNAL sender
________________________________


From: Souvik Dey <sodey at rbbn.com<mailto:sodey at rbbn.com>>
Sent: Saturday, December 12, 2020 9:05 PM
To: Xing, Beilei <beilei.xing at intel.com<mailto:beilei.xing at intel.com>>; Guo, Jia <jia.guo at intel.com<mailto:jia.guo at intel.com>>; Zhang, Qi Z <qi.z.zhang at intel.com<mailto:qi.z.zhang at intel.com>>
Cc: dev at dpdk.org<mailto:dev at dpdk.org>; Souvik Dey <sodey at rbbn.com<mailto:sodey at rbbn.com>>
Subject: [PATCH v2] net/i40e: issue with ADD VLAN from Guest

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 at rbbn.com<mailto:sodey at rbbn.com>>
---
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 | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index c26b036..d3dbcb5 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1078,8 +1078,19 @@ 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 "
+ "as a part of OP_ADD_VLAN");


What I mean is that “PMD_DRV_LOG(ERR, "fail to set vlan strip");” is enough, since it will make the driver log to be
more simple. And also avoid a quoted string split across lines which let the second line could not hit your expectation.
Other look good, if no other comment, please add my ACK in your next version, thanks.

return err;
}
--
2.9.3.windows.1


________________________________
Notice: This e-mail together with any attachments may contain information of Ribbon Communications Inc. that is confidential and/or proprietary for the sole use of the intended recipient. Any review, disclosure, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please notify the sender immediately and then delete all copies, including any attachments.
________________________________


More information about the dev mailing list