From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D9A96A2F18 for ; Thu, 3 Oct 2019 08:33:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 885301BFCD; Thu, 3 Oct 2019 08:33:19 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 1A8771BFC6; Thu, 3 Oct 2019 08:33:17 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x936Ue6l001241; Wed, 2 Oct 2019 23:33:17 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=1j5rPhmBXktFXyk5mGUyg/lESe2lPpccdmSnjhy30fc=; b=vq8taSWa/yLzkj4zhvjFvJ4uPu5go6cz205drsF196diGh9YliVjiDSZgVDmbu8aZVEn ZC5bKQMCsK5UWhvwXsDXm3v5mHFo/VOEqR+G7lG3nMbepyyoB9fRSw6hCPmf9VYdTh80 ixKSVykhWZU/VDzXOPybYGkJbuE6wALtWnWho3MIdzGX7Vr4N5WJU3+9Rt49IzvzmSFB YRJhyQSV/CumqkPCavlSBoMtv/mM6rvJ0kj8RmhyoVkLdabg68DTN5BnbHhMac34uZW4 my3ueTW8xsvT6JzeHKnUIWBqTva/GQnyPUB7eGWnnbtmiZy84FepGcMbXqojk/CYdZ9P 2A== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2vd0y72c39-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 02 Oct 2019 23:33:17 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 2 Oct 2019 23:33:15 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 2 Oct 2019 23:33:15 -0700 Received: from localhost.localdomain (unknown [10.28.34.13]) by maili.marvell.com (Postfix) with ESMTP id D216C3F7040; Wed, 2 Oct 2019 23:33:13 -0700 (PDT) From: Sunil Kumar Kori To: Jerin Jacob , Nithin Dabilpuram , Vamsi Attunuru , "Kiran Kumar K" CC: , , Sunil Kumar Kori Date: Thu, 3 Oct 2019 12:02:29 +0530 Message-ID: <20191003063229.19892-1-skori@marvell.com> X-Mailer: git-send-email 2.17.2 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-03_03:2019-10-01,2019-10-03 signatures=0 Subject: [dpdk-dev] [PATCH] drivers/octeontx2: fix parser error to ol_flags translation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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