patches for DPDK stable branches
 help / color / Atom feed
* [dpdk-stable] [PATCH] drivers/octeontx2: fix parser error to ol_flags translation
@ 2019-10-03  6:32 Sunil Kumar Kori
  2019-10-03 14:37 ` [dpdk-stable] [dpdk-dev] " Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: Sunil Kumar Kori @ 2019-10-03  6:32 UTC (permalink / raw)
  To: Jerin Jacob, Nithin Dabilpuram, Vamsi Attunuru, Kiran Kumar K
  Cc: dev, stable, Sunil Kumar Kori

NPC errors were incorrectly translated to ol_flag as
error code enum was not in sync with NPC profile.

Fixes: 371d3212cbed ("common/octeontx2: add build infrastructure and HW definition")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
 drivers/common/octeontx2/hw/otx2_npc.h | 7 ++++---
 drivers/net/octeontx2/otx2_lookup.c    | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/common/octeontx2/hw/otx2_npc.h b/drivers/common/octeontx2/hw/otx2_npc.h
index 0f85d7fdb..8045bed11 100644
--- a/drivers/common/octeontx2/hw/otx2_npc.h
+++ b/drivers/common/octeontx2/hw/otx2_npc.h
@@ -132,6 +132,7 @@ enum npc_kpu_err_code {
 	NPC_EC_NOERR = 0, /* has to be zero */
 	NPC_EC_UNK,
 	NPC_EC_IH_LENGTH,
+	NPC_EC_EDSA_UNK,
 	NPC_EC_L2_K1,
 	NPC_EC_L2_K2,
 	NPC_EC_L2_K3,
@@ -245,9 +246,6 @@ enum npc_kpu_lf_ltype {
 	NPC_LT_LF_TU_3RD_NSH,
 };
 
-/* Don't modify Ltypes upto SCTP, otherwise it will
- * effect flow tag calculation and thus RSS.
- */
 enum npc_kpu_lg_ltype {
 	NPC_LT_LG_TU_IP = 1,
 	NPC_LT_LG_TU_IP6,
@@ -255,6 +253,9 @@ enum npc_kpu_lg_ltype {
 	NPC_LT_LG_TU_ETHER_IN_NSH,
 };
 
+/* Don't modify Ltypes upto SCTP, otherwise it will
+ * effect flow tag calculation and thus RSS.
+ */
 enum npc_kpu_lh_ltype {
 	NPC_LT_LH_TU_TCP = 1,
 	NPC_LT_LH_TU_UDP,
diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/otx2_lookup.c
index 99199d08a..6cdca9b33 100644
--- a/drivers/net/octeontx2/otx2_lookup.c
+++ b/drivers/net/octeontx2/otx2_lookup.c
@@ -272,13 +272,13 @@ nix_create_rx_ol_flags_array(void *mem)
 				val |= PKT_RX_IP_CKSUM_GOOD;
 			break;
 		case NPC_ERRLEV_NIX:
+			val |= PKT_RX_IP_CKSUM_GOOD;
 			if (errcode == NIX_RX_PERRCODE_OL4_CHK) {
 				val |= PKT_RX_OUTER_L4_CKSUM_BAD;
 				val |= PKT_RX_L4_CKSUM_BAD;
 			} else if (errcode == NIX_RX_PERRCODE_IL4_CHK) {
 				val |= PKT_RX_L4_CKSUM_BAD;
 			} else {
-				val |= PKT_RX_IP_CKSUM_GOOD;
 				val |= PKT_RX_L4_CKSUM_GOOD;
 			}
 			break;
-- 
2.17.2


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] drivers/octeontx2: fix parser error to ol_flags translation
  2019-10-03  6:32 [dpdk-stable] [PATCH] drivers/octeontx2: fix parser error to ol_flags translation Sunil Kumar Kori
@ 2019-10-03 14:37 ` " Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2019-10-03 14:37 UTC (permalink / raw)
  To: Sunil Kumar Kori
  Cc: Jerin Jacob, Nithin Dabilpuram, Vamsi Attunuru, Kiran Kumar K,
	dpdk-dev, stable, Ferruh Yigit

On Thu, Oct 3, 2019 at 12:03 PM Sunil Kumar Kori <skori@marvell.com> wrote:
>
> NPC errors were incorrectly translated to ol_flag as
> error code enum was not in sync with NPC profile.
>
> Fixes: 371d3212cbed ("common/octeontx2: add build infrastructure and HW definition")
>
> Signed-off-by: Sunil Kumar Kori <skori@marvell.com>

Changed subject to drivers/octeontx2: fix checksum flag translation

Cc: stable@dpdk.org

Acked-by: Jerin Jacob <jerinj@marvell.com>

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



> ---
>  drivers/common/octeontx2/hw/otx2_npc.h | 7 ++++---
>  drivers/net/octeontx2/otx2_lookup.c    | 2 +-
>  2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/common/octeontx2/hw/otx2_npc.h b/drivers/common/octeontx2/hw/otx2_npc.h
> index 0f85d7fdb..8045bed11 100644
> --- a/drivers/common/octeontx2/hw/otx2_npc.h
> +++ b/drivers/common/octeontx2/hw/otx2_npc.h
> @@ -132,6 +132,7 @@ enum npc_kpu_err_code {
>         NPC_EC_NOERR = 0, /* has to be zero */
>         NPC_EC_UNK,
>         NPC_EC_IH_LENGTH,
> +       NPC_EC_EDSA_UNK,
>         NPC_EC_L2_K1,
>         NPC_EC_L2_K2,
>         NPC_EC_L2_K3,
> @@ -245,9 +246,6 @@ enum npc_kpu_lf_ltype {
>         NPC_LT_LF_TU_3RD_NSH,
>  };
>
> -/* Don't modify Ltypes upto SCTP, otherwise it will
> - * effect flow tag calculation and thus RSS.
> - */
>  enum npc_kpu_lg_ltype {
>         NPC_LT_LG_TU_IP = 1,
>         NPC_LT_LG_TU_IP6,
> @@ -255,6 +253,9 @@ enum npc_kpu_lg_ltype {
>         NPC_LT_LG_TU_ETHER_IN_NSH,
>  };
>
> +/* Don't modify Ltypes upto SCTP, otherwise it will
> + * effect flow tag calculation and thus RSS.
> + */
>  enum npc_kpu_lh_ltype {
>         NPC_LT_LH_TU_TCP = 1,
>         NPC_LT_LH_TU_UDP,
> diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/otx2_lookup.c
> index 99199d08a..6cdca9b33 100644
> --- a/drivers/net/octeontx2/otx2_lookup.c
> +++ b/drivers/net/octeontx2/otx2_lookup.c
> @@ -272,13 +272,13 @@ nix_create_rx_ol_flags_array(void *mem)
>                                 val |= PKT_RX_IP_CKSUM_GOOD;
>                         break;
>                 case NPC_ERRLEV_NIX:
> +                       val |= PKT_RX_IP_CKSUM_GOOD;
>                         if (errcode == NIX_RX_PERRCODE_OL4_CHK) {
>                                 val |= PKT_RX_OUTER_L4_CKSUM_BAD;
>                                 val |= PKT_RX_L4_CKSUM_BAD;
>                         } else if (errcode == NIX_RX_PERRCODE_IL4_CHK) {
>                                 val |= PKT_RX_L4_CKSUM_BAD;
>                         } else {
> -                               val |= PKT_RX_IP_CKSUM_GOOD;
>                                 val |= PKT_RX_L4_CKSUM_GOOD;
>                         }
>                         break;
> --
> 2.17.2
>

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-03  6:32 [dpdk-stable] [PATCH] drivers/octeontx2: fix parser error to ol_flags translation Sunil Kumar Kori
2019-10-03 14:37 ` [dpdk-stable] [dpdk-dev] " Jerin Jacob

patches for DPDK stable branches

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/ public-inbox