DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] i40e: fix vlan stripping from inner header
@ 2016-05-04  5:42 Jingjing Wu
  2016-05-06 14:59 ` Bruce Richardson
  0 siblings, 1 reply; 2+ messages in thread
From: Jingjing Wu @ 2016-05-04  5:42 UTC (permalink / raw)
  To: helin.zhang; +Cc: jingjing.wu, andrey.chilikin, dev

Previously, for tunnel packets, such as VXLAN/NVGRE, the vlan
tags of the inner header will be stripped without putting vlan
info to descriptor, what is not expected behaviour.
This patch fixes it by changing hardware configuration to leave
the inner packet alone.

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director")
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 doc/guides/rel_notes/release_16_07.rst | 7 +++++++
 drivers/net/i40e/i40e_fdir.c           | 2 +-
 drivers/net/i40e/i40e_rxtx.c           | 7 ++++++-
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/doc/guides/rel_notes/release_16_07.rst b/doc/guides/rel_notes/release_16_07.rst
index 83c841b..f6d543c 100644
--- a/doc/guides/rel_notes/release_16_07.rst
+++ b/doc/guides/rel_notes/release_16_07.rst
@@ -54,6 +54,13 @@ EAL
 Drivers
 ~~~~~~~
 
+* **i40e: Fixed vlan stripping from inner header.**
+
+  Previously, for tunnel packets, such as VXLAN/NVGRE, the vlan
+  tags of the inner header will be stripped without putting vlan
+  info to descriptor.
+  Now this issue is fixed by disabling vlan stripping from inner header.
+
 
 Libraries
 ~~~~~~~~~
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index ff57e8a..cd4c324 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -163,7 +163,7 @@ i40e_fdir_rx_queue_init(struct i40e_rx_queue *rxq)
 	rx_ctx.lrxqthresh = 2;
 	rx_ctx.crcstrip = 0;
 	rx_ctx.l2tsel = 1;
-	rx_ctx.showiv = 1;
+	rx_ctx.showiv = 0;
 	rx_ctx.prefena = 1;
 
 	err = i40e_clear_lan_rx_queue_context(hw, rxq->reg_idx);
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index 4d35d83..a69fde1 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -2904,7 +2904,12 @@ i40e_rx_queue_init(struct i40e_rx_queue *rxq)
 	rx_ctx.lrxqthresh = 2;
 	rx_ctx.crcstrip = (rxq->crc_len == 0) ? 1 : 0;
 	rx_ctx.l2tsel = 1;
-	rx_ctx.showiv = 1;
+	/* showiv indicates if inner VLAN is stripped inside of tunnel
+	 * packet. When set it to 1, vlan information is stripped from
+	 * the inner header, but the hardware does not put it in the
+	 * descriptor. So set it zero by default.
+	 */
+	rx_ctx.showiv = 0;
 	rx_ctx.prefena = 1;
 
 	err = i40e_clear_lan_rx_queue_context(hw, pf_q);
-- 
2.4.0

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

* Re: [dpdk-dev] [PATCH] i40e: fix vlan stripping from inner header
  2016-05-04  5:42 [dpdk-dev] [PATCH] i40e: fix vlan stripping from inner header Jingjing Wu
@ 2016-05-06 14:59 ` Bruce Richardson
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Richardson @ 2016-05-06 14:59 UTC (permalink / raw)
  To: Jingjing Wu; +Cc: helin.zhang, andrey.chilikin, dev

On Wed, May 04, 2016 at 01:42:25PM +0800, Jingjing Wu wrote:
> Previously, for tunnel packets, such as VXLAN/NVGRE, the vlan
> tags of the inner header will be stripped without putting vlan
> info to descriptor, what is not expected behaviour.
> This patch fixes it by changing hardware configuration to leave
> the inner packet alone.
> 
> Fixes: 4861cde46116 ("i40e: new poll mode driver")
> Fixes: a778a1fa2e4e ("i40e: set up and initialize flow director")
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Applied for dpdk-next-net/rel_16_07

/Bruce

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

end of thread, other threads:[~2016-05-06 14:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-04  5:42 [dpdk-dev] [PATCH] i40e: fix vlan stripping from inner header Jingjing Wu
2016-05-06 14:59 ` 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).