DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/i40e: fix dropping packets with Ethertype 0x88A8
@ 2016-08-16  8:29 Beilei Xing
  2016-08-17  0:55 ` Wu, Jingjing
  2016-08-17  1:58 ` [dpdk-dev] [PATCH v2] " Beilei Xing
  0 siblings, 2 replies; 5+ messages in thread
From: Beilei Xing @ 2016-08-16  8:29 UTC (permalink / raw)
  To: jingjing.wu; +Cc: dev, Beilei Xing

Refer to FW default setting, Ethertype 0x88A8 is treated as S-TAG,
packects with S-TAG should be received in Port Virtualizer mode,
but Port Virtual mode is not initialized in DPDK. So X710 will
packets with Ethertype 0x88A8.
This patch fixes this issue by turning off S-TAG identification.

Fixes: 4861cde46116 ("i40e: new poll mode driver")

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

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index d0aeb70..55c4887 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -932,6 +932,9 @@ config_floating_veb(struct rte_eth_dev *dev)
 	}
 }
 
+#define I40E_L2_TAGS_S_TAG_SHIFT 1
+#define I40E_L2_TAGS_S_TAG_MASK I40E_MASK(0x1, I40E_L2_TAGS_S_TAG_SHIFT)
+
 static int
 eth_i40e_dev_init(struct rte_eth_dev *dev)
 {
@@ -1120,6 +1123,13 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 	/* Disable double vlan by default */
 	i40e_vsi_config_double_vlan(vsi, FALSE);
 
+	/* Disable S-TAG identification by default */
+	ret = I40E_READ_REG(hw, I40E_PRT_L2TAGSEN);
+	if (ret & I40E_L2_TAGS_S_TAG_MASK) {
+		ret &= ~I40E_L2_TAGS_S_TAG_MASK;
+		I40E_WRITE_REG(hw, I40E_PRT_L2TAGSEN, ret);
+	}
+
 	if (!vsi->max_macaddrs)
 		len = ETHER_ADDR_LEN;
 	else
-- 
2.5.0

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

* Re: [dpdk-dev] [PATCH] net/i40e: fix dropping packets with Ethertype 0x88A8
  2016-08-16  8:29 [dpdk-dev] [PATCH] net/i40e: fix dropping packets with Ethertype 0x88A8 Beilei Xing
@ 2016-08-17  0:55 ` Wu, Jingjing
  2016-08-17  1:58 ` [dpdk-dev] [PATCH v2] " Beilei Xing
  1 sibling, 0 replies; 5+ messages in thread
From: Wu, Jingjing @ 2016-08-17  0:55 UTC (permalink / raw)
  To: Xing, Beilei; +Cc: dev



> -----Original Message-----
> From: Xing, Beilei
> Sent: Tuesday, August 16, 2016 4:30 PM
> To: Wu, Jingjing
> Cc: dev@dpdk.org; Xing, Beilei
> Subject: [PATCH] net/i40e: fix dropping packets with Ethertype 0x88A8
> 
> Refer to FW default setting, Ethertype 0x88A8 is treated as S-TAG, packects
> with S-TAG should be received in Port Virtualizer mode, but Port Virtual
> mode is not initialized in DPDK. So X710 will packets with Ethertype 0x88A8.
Will [drop] packets?
> This patch fixes this issue by turning off S-TAG identification.
> 

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

* [dpdk-dev] [PATCH v2] net/i40e: fix dropping packets with Ethertype 0x88A8
  2016-08-16  8:29 [dpdk-dev] [PATCH] net/i40e: fix dropping packets with Ethertype 0x88A8 Beilei Xing
  2016-08-17  0:55 ` Wu, Jingjing
@ 2016-08-17  1:58 ` Beilei Xing
  2016-08-17  3:09   ` Wu, Jingjing
  1 sibling, 1 reply; 5+ messages in thread
From: Beilei Xing @ 2016-08-17  1:58 UTC (permalink / raw)
  To: jingjing.wu; +Cc: dev, Beilei Xing

Refer to FW default setting, Ethertype 0x88A8 is treated as S-TAG,
packects with S-TAG should be received in Port Virtualizer mode,
but Port Virtual mode is not initialized in DPDK. So X710 will
drop packets with Ethertype 0x88A8.
This patch fixes this issue by turning off S-TAG identification.

Fixes: 4861cde46116 ("i40e: new poll mode driver")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
v2 changes:
 commit log modification

 drivers/net/i40e/i40e_ethdev.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index d0aeb70..55c4887 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -932,6 +932,9 @@ config_floating_veb(struct rte_eth_dev *dev)
 	}
 }
 
+#define I40E_L2_TAGS_S_TAG_SHIFT 1
+#define I40E_L2_TAGS_S_TAG_MASK I40E_MASK(0x1, I40E_L2_TAGS_S_TAG_SHIFT)
+
 static int
 eth_i40e_dev_init(struct rte_eth_dev *dev)
 {
@@ -1120,6 +1123,13 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 	/* Disable double vlan by default */
 	i40e_vsi_config_double_vlan(vsi, FALSE);
 
+	/* Disable S-TAG identification by default */
+	ret = I40E_READ_REG(hw, I40E_PRT_L2TAGSEN);
+	if (ret & I40E_L2_TAGS_S_TAG_MASK) {
+		ret &= ~I40E_L2_TAGS_S_TAG_MASK;
+		I40E_WRITE_REG(hw, I40E_PRT_L2TAGSEN, ret);
+	}
+
 	if (!vsi->max_macaddrs)
 		len = ETHER_ADDR_LEN;
 	else
-- 
2.5.0

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

* Re: [dpdk-dev] [PATCH v2] net/i40e: fix dropping packets with Ethertype 0x88A8
  2016-08-17  1:58 ` [dpdk-dev] [PATCH v2] " Beilei Xing
@ 2016-08-17  3:09   ` Wu, Jingjing
  2016-09-21 11:24     ` Bruce Richardson
  0 siblings, 1 reply; 5+ messages in thread
From: Wu, Jingjing @ 2016-08-17  3:09 UTC (permalink / raw)
  To: Xing, Beilei; +Cc: dev



> -----Original Message-----
> From: Xing, Beilei
> Sent: Wednesday, August 17, 2016 9:58 AM
> To: Wu, Jingjing
> Cc: dev@dpdk.org; Xing, Beilei
> Subject: [PATCH v2] net/i40e: fix dropping packets with Ethertype 0x88A8
> 
> Refer to FW default setting, Ethertype 0x88A8 is treated as S-TAG, packects
> with S-TAG should be received in Port Virtualizer mode, but Port Virtual
> mode is not initialized in DPDK. So X710 will drop packets with Ethertype
> 0x88A8.
> This patch fixes this issue by turning off S-TAG identification.
> 
> Fixes: 4861cde46116 ("i40e: new poll mode driver")
> 
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>

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

* Re: [dpdk-dev] [PATCH v2] net/i40e: fix dropping packets with Ethertype 0x88A8
  2016-08-17  3:09   ` Wu, Jingjing
@ 2016-09-21 11:24     ` Bruce Richardson
  0 siblings, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2016-09-21 11:24 UTC (permalink / raw)
  To: Wu, Jingjing; +Cc: Xing, Beilei, dev

On Wed, Aug 17, 2016 at 03:09:43AM +0000, Wu, Jingjing wrote:
> 
> 
> > -----Original Message-----
> > From: Xing, Beilei
> > Sent: Wednesday, August 17, 2016 9:58 AM
> > To: Wu, Jingjing
> > Cc: dev@dpdk.org; Xing, Beilei
> > Subject: [PATCH v2] net/i40e: fix dropping packets with Ethertype 0x88A8
> > 
> > Refer to FW default setting, Ethertype 0x88A8 is treated as S-TAG, packects
> > with S-TAG should be received in Port Virtualizer mode, but Port Virtual
> > mode is not initialized in DPDK. So X710 will drop packets with Ethertype
> > 0x88A8.
> > This patch fixes this issue by turning off S-TAG identification.
> > 
> > Fixes: 4861cde46116 ("i40e: new poll mode driver")
> > 
> > Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
> 

Applied to dpdk-next-net/rel_16_11

/Bruce

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

end of thread, other threads:[~2016-09-21 11:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-16  8:29 [dpdk-dev] [PATCH] net/i40e: fix dropping packets with Ethertype 0x88A8 Beilei Xing
2016-08-17  0:55 ` Wu, Jingjing
2016-08-17  1:58 ` [dpdk-dev] [PATCH v2] " Beilei Xing
2016-08-17  3:09   ` Wu, Jingjing
2016-09-21 11:24     ` Bruce Richardson

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