net/bnx2x: fix to set stripped flag for VLAN packet
diff mbox series

Message ID 20200129014313.18108-1-rmody@marvell.com
State Accepted
Delegated to: Jerin Jacob
Headers show
Series
  • net/bnx2x: fix to set stripped flag for VLAN packet
Related show

Checks

Context Check Description
ci/Intel-compilation fail apply issues
ci/iol-testing success Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Rasesh Mody Jan. 29, 2020, 1:43 a.m. UTC
For VLAN packet the tci is saved in rx_mb->vlan_tci, however the
STRIPPED offload flag is not set along with PKT_RX_VLAN flag.
Set the PKT_RX_VLAN_STRIPPED flag as well.

Fixes: 380a7aab1ae2 ("mbuf: rename deprecated VLAN flags")
Fixes: b37b528d957c ("mbuf: add new Rx flags for stripped VLAN")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/bnx2x/bnx2x_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jerin Jacob Jan. 29, 2020, 2:17 p.m. UTC | #1
On Wed, Jan 29, 2020 at 7:13 AM Rasesh Mody <rmody@marvell.com> wrote:
>
> For VLAN packet the tci is saved in rx_mb->vlan_tci, however the
> STRIPPED offload flag is not set along with PKT_RX_VLAN flag.
> Set the PKT_RX_VLAN_STRIPPED flag as well.
>
> Fixes: 380a7aab1ae2 ("mbuf: rename deprecated VLAN flags")
> Fixes: b37b528d957c ("mbuf: add new Rx flags for stripped VLAN")
> Cc: stable@dpdk.org
> Signed-off-by: Rasesh Mody <rmody@marvell.com>

Applied to dpdk-next-net-mrvl/master. Thanks

> ---
>  drivers/net/bnx2x/bnx2x_rxtx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c
> index ae97dfee36..ea2b53dff8 100644
> --- a/drivers/net/bnx2x/bnx2x_rxtx.c
> +++ b/drivers/net/bnx2x/bnx2x_rxtx.c
> @@ -414,7 +414,7 @@ bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
>                  */
>                 if (cqe_fp->pars_flags.flags & PARSING_FLAGS_VLAN) {
>                         rx_mb->vlan_tci = cqe_fp->vlan_tag;
> -                       rx_mb->ol_flags |= PKT_RX_VLAN;
> +                       rx_mb->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
>                 }
>
>                 rx_pkts[nb_rx] = rx_mb;
> --
> 2.18.0
>

Patch
diff mbox series

diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/net/bnx2x/bnx2x_rxtx.c
index ae97dfee36..ea2b53dff8 100644
--- a/drivers/net/bnx2x/bnx2x_rxtx.c
+++ b/drivers/net/bnx2x/bnx2x_rxtx.c
@@ -414,7 +414,7 @@  bnx2x_recv_pkts(void *p_rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		 */
 		if (cqe_fp->pars_flags.flags & PARSING_FLAGS_VLAN) {
 			rx_mb->vlan_tci = cqe_fp->vlan_tag;
-			rx_mb->ol_flags |= PKT_RX_VLAN;
+			rx_mb->ol_flags |= PKT_RX_VLAN | PKT_RX_VLAN_STRIPPED;
 		}
 
 		rx_pkts[nb_rx] = rx_mb;