DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix VF Tx error issue
@ 2017-12-05  2:40 Beilei Xing
  2017-12-05  6:35 ` Wu, Jingjing
  2017-12-08  7:40 ` [dpdk-dev] [PATCH v2] " Beilei Xing
  0 siblings, 2 replies; 4+ messages in thread
From: Beilei Xing @ 2017-12-05  2:40 UTC (permalink / raw)
  To: jingjing.wu, qi.z.zhang; +Cc: dev, stable

When using kernel PF + DPDK VF, if setting VLAN strip on
or off in VF side after setting VLAN for VF with ethtool in
PF side, it will case VF Tx error. The root case is that
setting VLAN for VF in kernel PF side is to set PVID, then
Rx VLAN offload is not permitted.
This patch fixes the issue by check VLAN offload capability
when setting VLAN offload.

Fixes: 5f0b95d5 ("net/i40e: support VLAN stripping for VF")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev_vf.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 91b5bb0..4927b14 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1585,13 +1585,19 @@ static int
 i40evf_init_vlan(struct rte_eth_dev *dev)
 {
 	/* Apply vlan offload setting */
-	return i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK);
+	i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK);
+
+	return 0;
 }
 
 static int
 i40evf_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
 	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
+	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+
+	if (!(vf->vf_res->vf_offload_flags & VIRTCHNL_VF_OFFLOAD_VLAN))
+		return -ENOTSUP;
 
 	/* Vlan stripping setting */
 	if (mask & ETH_VLAN_STRIP_MASK) {
-- 
2.5.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] net/i40e: fix VF Tx error issue
  2017-12-05  2:40 [dpdk-dev] [PATCH] net/i40e: fix VF Tx error issue Beilei Xing
@ 2017-12-05  6:35 ` Wu, Jingjing
  2017-12-08  7:40 ` [dpdk-dev] [PATCH v2] " Beilei Xing
  1 sibling, 0 replies; 4+ messages in thread
From: Wu, Jingjing @ 2017-12-05  6:35 UTC (permalink / raw)
  To: Xing, Beilei, Zhang, Qi Z; +Cc: dev, stable



> -----Original Message-----
> From: Xing, Beilei
> Sent: Tuesday, December 5, 2017 10:41 AM
> To: Wu, Jingjing <jingjing.wu@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [PATCH] net/i40e: fix VF Tx error issue
> 
> When using kernel PF + DPDK VF, if setting VLAN strip on or off in VF side after
> setting VLAN for VF with ethtool in PF side, it will case VF Tx error. The root
> case is that setting VLAN for VF in kernel PF side is to set PVID, then Rx VLAN
> offload is not permitted.
> This patch fixes the issue by check VLAN offload capability when setting VLAN
> offload.
> 
> Fixes: 5f0b95d5 ("net/i40e: support VLAN stripping for VF")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH v2] net/i40e: fix VF Tx error issue
  2017-12-05  2:40 [dpdk-dev] [PATCH] net/i40e: fix VF Tx error issue Beilei Xing
  2017-12-05  6:35 ` Wu, Jingjing
@ 2017-12-08  7:40 ` Beilei Xing
  2017-12-20  7:00   ` Zhang, Helin
  1 sibling, 1 reply; 4+ messages in thread
From: Beilei Xing @ 2017-12-08  7:40 UTC (permalink / raw)
  To: jingjing.wu; +Cc: dev, stable

When using kernel PF + DPDK VF, if setting VLAN strip on
or off in VF side after setting PVID for VF with ethtool in
PF side, it will cause VF Tx error. The root cause is that
Rx VLAN offload is not permitted after setting PVID for VF
in kernel PF side.
This patch fixes the issue by check VLAN offload capability
when setting VLAN offload.

Fixes: 5f0b95d5 ("net/i40e: support VLAN stripping for VF")
Cc: stable@dpdk.org

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
---
v2 changes:
 - Fix typo in commit log.

 drivers/net/i40e/i40e_ethdev_vf.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 91b5bb0..4927b14 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1585,13 +1585,19 @@ static int
 i40evf_init_vlan(struct rte_eth_dev *dev)
 {
 	/* Apply vlan offload setting */
-	return i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK);
+	i40evf_vlan_offload_set(dev, ETH_VLAN_STRIP_MASK);
+
+	return 0;
 }
 
 static int
 i40evf_vlan_offload_set(struct rte_eth_dev *dev, int mask)
 {
 	struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
+	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
+
+	if (!(vf->vf_res->vf_offload_flags & VIRTCHNL_VF_OFFLOAD_VLAN))
+		return -ENOTSUP;
 
 	/* Vlan stripping setting */
 	if (mask & ETH_VLAN_STRIP_MASK) {
-- 
2.5.5

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/i40e: fix VF Tx error issue
  2017-12-08  7:40 ` [dpdk-dev] [PATCH v2] " Beilei Xing
@ 2017-12-20  7:00   ` Zhang, Helin
  0 siblings, 0 replies; 4+ messages in thread
From: Zhang, Helin @ 2017-12-20  7:00 UTC (permalink / raw)
  To: Xing, Beilei, Wu, Jingjing; +Cc: dev, stable



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Beilei Xing
> Sent: Friday, December 8, 2017 3:41 PM
> To: Wu, Jingjing
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH v2] net/i40e: fix VF Tx error issue
> 
> When using kernel PF + DPDK VF, if setting VLAN strip on or off in VF side
> after setting PVID for VF with ethtool in PF side, it will cause VF Tx error. The
> root cause is that Rx VLAN offload is not permitted after setting PVID for VF
> in kernel PF side.
> This patch fixes the issue by check VLAN offload capability when setting VLAN
> offload.
> 
> Fixes: 5f0b95d5 ("net/i40e: support VLAN stripping for VF")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Applied to next-net-intel, thanks! /Helin

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-12-20  7:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-05  2:40 [dpdk-dev] [PATCH] net/i40e: fix VF Tx error issue Beilei Xing
2017-12-05  6:35 ` Wu, Jingjing
2017-12-08  7:40 ` [dpdk-dev] [PATCH v2] " Beilei Xing
2017-12-20  7:00   ` Zhang, Helin

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