net/bnxt: fix ptype index calculation

Message ID 20210118215709.4720-1-lance.richardson@broadcom.com (mailing list archive)
State Accepted, archived
Delegated to: Ajit Khaparde
Headers
Series net/bnxt: fix ptype index calculation |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-testing warning Testing issues

Commit Message

Lance Richardson Jan. 18, 2021, 9:57 p.m. UTC
  Fix mask to include all four bits of hardware packet type
field.

Fixes: 97b1db288dd0 ("net/bnxt: use table based packet type translation")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
---
 drivers/net/bnxt/bnxt_rxr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ajit Khaparde Jan. 21, 2021, 7:11 a.m. UTC | #1
On Mon, Jan 18, 2021 at 1:57 PM Lance Richardson
<lance.richardson@broadcom.com> wrote:
>
> Fix mask to include all four bits of hardware packet type
> field.
>
> Fixes: 97b1db288dd0 ("net/bnxt: use table based packet type translation")
> Cc: stable@dpdk.org
> Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Patch applied to dpdk-next-net-brcm.

> ---
>  drivers/net/bnxt/bnxt_rxr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
> index a195bf1187..969cae19fc 100644
> --- a/drivers/net/bnxt/bnxt_rxr.c
> +++ b/drivers/net/bnxt/bnxt_rxr.c
> @@ -402,7 +402,7 @@ bnxt_init_ptype_table(void)
>
>                 ip6 = i & (RX_PKT_CMPL_FLAGS2_IP_TYPE >> 7);
>                 tun = i & (RX_PKT_CMPL_FLAGS2_T_IP_CS_CALC >> 2);
> -               type = (i & 0x38) << 9;
> +               type = (i & 0x78) << 9;
>
>                 if (!tun && !ip6)
>                         l3 = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
> --
> 2.25.1
>
  

Patch

diff --git a/drivers/net/bnxt/bnxt_rxr.c b/drivers/net/bnxt/bnxt_rxr.c
index a195bf1187..969cae19fc 100644
--- a/drivers/net/bnxt/bnxt_rxr.c
+++ b/drivers/net/bnxt/bnxt_rxr.c
@@ -402,7 +402,7 @@  bnxt_init_ptype_table(void)
 
 		ip6 = i & (RX_PKT_CMPL_FLAGS2_IP_TYPE >> 7);
 		tun = i & (RX_PKT_CMPL_FLAGS2_T_IP_CS_CALC >> 2);
-		type = (i & 0x38) << 9;
+		type = (i & 0x78) << 9;
 
 		if (!tun && !ip6)
 			l3 = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;