]> git.droids-corp.org - dpdk.git/commitdiff
i40e: fix VLAN stripping from inner header
authorJingjing Wu <jingjing.wu@intel.com>
Wed, 4 May 2016 05:42:25 +0000 (13:42 +0800)
committerBruce Richardson <bruce.richardson@intel.com>
Fri, 6 May 2016 13:51:22 +0000 (15:51 +0200)
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
drivers/net/i40e/i40e_fdir.c
drivers/net/i40e/i40e_rxtx.c

index 83c841ba671b36ffbf2a069efa39a57a771f0864..f6d543c39491f9b928c0945757161bd02d693594 100644 (file)
@@ -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
 ~~~~~~~~~
index 429d89437fed627c7d2b720f2d188a9a04f2558d..8aa41e5294486b6a7d8eed673bbc562c353b6ca0 100644 (file)
@@ -145,7 +145,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);
index 4d35d83f9106e98117f457dff0d6e26055794b70..a69fde15888fb1dd24f2612de47fe4985ee06b16 100644 (file)
@@ -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);