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 52CAEA04AB; Fri, 1 May 2020 11:53:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D5EDE1D9E6; Fri, 1 May 2020 11:53:39 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id D46DF1D9C6 for ; Fri, 1 May 2020 11:53:37 +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 0419qJCe012501 for ; Fri, 1 May 2020 02:53:36 -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=1Hndbsh+lj6HMarhSXayAwtOpU2l4pTX3RyGlsLeW18=; b=F/PmtlnHrHG3jjTBzL5f132wdBcwPgoaFbvkMtA1PPnag4m7CrhoZiPG7TX6eDsHrXn5 4vsZDKOh9KFTAZDtSLN7UCYrVkB5huxRpoIKM5g/hdwgOyOfi4StRwJ4DtTzSM7DLFca oo+VxwEF0fnbG3eCwuvj44Ehq1gfW77gi4LssHig1cA+k9uXbAdfpxxvNF2yQz97hkJf OczTq5uY3W9ZTF9Y5URUWJrwSfJVGoWeFHrJC0+mIqOm9coTIBH29eJs4V3+g9+jqfBG m6GUDMBB7d4Ftz4Ve18QmsJJWHJ1/pukhmbs1LST2Lk8qP1Ep/8lHlykcOgdRpU09t8d zQ== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 30r7em20wa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 01 May 2020 02:53:36 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 1 May 2020 02:53:35 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 1 May 2020 02:53:35 -0700 Received: from dc7-eodlnx05.marvell.com (dc7-eodlnx05.marvell.com [10.28.113.55]) by maili.marvell.com (Postfix) with ESMTP id 4BF2E3F703F; Fri, 1 May 2020 02:53:33 -0700 (PDT) From: To: Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K CC: , Amit Gupta Date: Fri, 1 May 2020 15:23:28 +0530 Message-ID: <1588326809-17372-1-git-send-email-agupta3@marvell.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-05-01_03:2020-04-30, 2020-05-01 signatures=0 Subject: [dpdk-dev] [PATCH] net/octeontx2: offload bad L4 checksum detection 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" From: Amit Gupta On detecting outer L4 checksum as bad, both outer and inner checksums are marked as bad. No need to explicitly check inner L4 checksum in this case. Outer L4 UDP checksum error => PKT_RX_OUTER_L4_CKSUM_BAD and PKT_RX_L4_CKSUM_BAD Inner L4 UDP checksum error => PKT_RX_L4_CKSUM_BAD Fixes: 41fe7a3a11fd ("net/octeontx2: offload bad L2/L3/L4 UDP lengths detection") Signed-off-by: Amit Gupta --- drivers/net/octeontx2/otx2_lookup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/octeontx2/otx2_lookup.c b/drivers/net/octeontx2/otx2_lookup.c index 9dcfc75..10944bc 100644 --- a/drivers/net/octeontx2/otx2_lookup.c +++ b/drivers/net/octeontx2/otx2_lookup.c @@ -301,6 +301,7 @@ errcode == NIX_RX_PERRCODE_OL4_LEN || errcode == NIX_RX_PERRCODE_OL4_PORT) { val |= PKT_RX_IP_CKSUM_GOOD; + val |= PKT_RX_L4_CKSUM_BAD; val |= PKT_RX_OUTER_L4_CKSUM_BAD; } else if (errcode == NIX_RX_PERRCODE_IL4_CHK || errcode == NIX_RX_PERRCODE_IL4_LEN || -- 1.8.3.1