DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dey, Souvik" <sodey@rbbn.com>
To: "Guo, Jia" <jia.guo@intel.com>,
	"Xing, Beilei" <beilei.xing@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: issue with ADD VLAN from Guest
Date: Tue, 15 Dec 2020 13:16:02 +0000
Message-ID: <DM6PR03MB47773E00D5B593484FDB5B87CDC60@DM6PR03MB4777.namprd03.prod.outlook.com> (raw)
In-Reply-To: <5359d7d1809046edb3e1be7d4a88709a@intel.com>

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.


From: Guo, Jia <jia.guo@intel.com>
Sent: Monday, December 14, 2020 9:24 PM
To: Dey, Souvik <sodey@rbbn.com>; Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
Cc: dev@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@rbbn.com<mailto:sodey@rbbn.com>>
Sent: Saturday, December 12, 2020 9:05 PM
To: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>; Guo, Jia <jia.guo@intel.com<mailto:jia.guo@intel.com>>; Zhang, Qi Z <qi.z.zhang@intel.com<mailto:qi.z.zhang@intel.com>>
Cc: dev@dpdk.org<mailto:dev@dpdk.org>; Souvik Dey <sodey@rbbn.com<mailto:sodey@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@rbbn.com<mailto:sodey@rbbn.com>>
* 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;

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.

  reply	other threads:[~2020-12-15 13:16 UTC|newest]

Thread overview: 14+ 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 [this message]
2020-12-15 13:30       ` Dey, Souvik
2020-12-15 13:28   ` [dpdk-dev] [PATCH v3] " Souvik Dey
2020-12-16  2:09     ` 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
2020-12-12 12:51 [dpdk-dev] [PATCH v2] " Souvik Dey

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:

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

  git send-email \
    --in-reply-to=DM6PR03MB47773E00D5B593484FDB5B87CDC60@DM6PR03MB4777.namprd03.prod.outlook.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 \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git