[v2] net/bnxt: fix VLAN strip flags in sse mode

Message ID 20200122231840.37215-1-ajit.khaparde@broadcom.com (mailing list archive)
State Accepted, archived
Delegated to: Ajit Khaparde
Headers
Series [v2] net/bnxt: fix VLAN strip flags in sse mode |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance fail Performance Testing issues
ci/iol-testing success Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/travis-robot success Travis build: passed

Commit Message

Ajit Khaparde Jan. 22, 2020, 11:18 p.m. UTC
  From: Stephen Hemminger <stephen@networkplumber.org>

When the VLAN is stripped from the packet on receive the
driver must set the PKT_RX_VLAN_STRIPPED flag in the mbuf.
This is done correctly for normal receive in the bnxt driver
but was not being handled correctly in the new SSE code.

Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
Cc: lance.richardson@broadcom.com
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
v1->v2: fixed the commit headline

 drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Ajit Khaparde Jan. 22, 2020, 11:23 p.m. UTC | #1
On Wed, Jan 22, 2020 at 3:18 PM Ajit Khaparde <ajit.khaparde@broadcom.com>
wrote:

> From: Stephen Hemminger <stephen@networkplumber.org>
>
> When the VLAN is stripped from the packet on receive the
> driver must set the PKT_RX_VLAN_STRIPPED flag in the mbuf.
> This is done correctly for normal receive in the bnxt driver
> but was not being handled correctly in the new SSE code.
>
> Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
> Cc: lance.richardson@broadcom.com
> Cc: stable@dpdk.org
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
>
Patch applied to dpdk-next-net-brcm. Thanks



> ---
> v1->v2: fixed the commit headline
>
>  drivers/net/bnxt/bnxt_rxtx_vec_sse.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
> b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
> index 22d9f9e84..31457300a 100644
> --- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
> +++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
> @@ -289,7 +289,8 @@ bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf
> **rx_pkts,
>                                         (RX_PKT_CMPL_METADATA_VID_MASK |
>                                         RX_PKT_CMPL_METADATA_DE |
>                                         RX_PKT_CMPL_METADATA_PRI_MASK);
> -                               mbuf->ol_flags |= PKT_RX_VLAN;
> +                               mbuf->ol_flags |=
> +                                       PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
>                         }
>
>                         bnxt_parse_csum(mbuf, rxcmp1);
> --
> 2.21.0 (Apple Git-122.2)
>
>
  

Patch

diff --git a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
index 22d9f9e84..31457300a 100644
--- a/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
+++ b/drivers/net/bnxt/bnxt_rxtx_vec_sse.c
@@ -289,7 +289,8 @@  bnxt_recv_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
 					(RX_PKT_CMPL_METADATA_VID_MASK |
 					RX_PKT_CMPL_METADATA_DE |
 					RX_PKT_CMPL_METADATA_PRI_MASK);
-				mbuf->ol_flags |= PKT_RX_VLAN;
+				mbuf->ol_flags |=
+					PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 			}
 
 			bnxt_parse_csum(mbuf, rxcmp1);