From patchwork Mon Nov 28 09:54:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithin Dabilpuram X-Patchwork-Id: 120206 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6B47DA00C3; Mon, 28 Nov 2022 10:55:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B817442D36; Mon, 28 Nov 2022 10:55:20 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 233FC42D36 for ; Mon, 28 Nov 2022 10:55:18 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AS5ihPR025017 for ; Mon, 28 Nov 2022 01:55:18 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=W1TKgD+JqJhBWpdygLqbAvqoxQMyb0o331iTw9EivaI=; b=CBXrqzZyeS8zACaKqzNWIn7+2XqNZYJfDpVd78yyI3Nv1XB+mSeP5vWx7dzCFM5N936o Pyob9sOjIml9/8470BWUPWKFRNyHazrlIBOMh4/46VuDsRpDvK2XauOqChMpjb0ORLAW ljX5pqOYgwlB6gaYpTXoksM992ki32FfVptx8mgWtlMndhqfTRPz+asMHNbvsIBRAiiX EmSjGyNY7hN4rltE7Ep9DDqONkjy+98s7reYt/kS16FnTdhOsTQ2BoYDul9KXPKa0Qri 2QYIgT/sxNt+UxDfrycTJadupAm2Rm68+oMp6I10d+04obAjUYF4mzvgKxAmbB8QyxE2 1w== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3m4q3srsgk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 28 Nov 2022 01:55:18 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 28 Nov 2022 01:55:16 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 28 Nov 2022 01:55:16 -0800 Received: from hyd1588t430.caveonetworks.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 107AE3F7063; Mon, 28 Nov 2022 01:55:13 -0800 (PST) From: Nithin Dabilpuram To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , , Pavan Nikhilesh Subject: [PATCH 10/11] net/cnxk: mark HW errors as bad checksum Date: Mon, 28 Nov 2022 15:24:41 +0530 Message-ID: <20221128095442.3185112-10-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221128095442.3185112-1-ndabilpuram@marvell.com> References: <20221128095442.3185112-1-ndabilpuram@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: -qDIIIHwm7c4p5LGG9FeB0g_TIGgGYF1 X-Proofpoint-GUID: -qDIIIHwm7c4p5LGG9FeB0g_TIGgGYF1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-28_07,2022-11-25_01,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Pavan Nikhilesh Mark NIX packet parsing errors due to NPC/NPA errors as bad packets by setting L3/L4 checksum as BAD in olflags. Application can decide the fate of these packets. Signed-off-by: Pavan Nikhilesh --- drivers/net/cnxk/cnxk_lookup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/cnxk/cnxk_lookup.c b/drivers/net/cnxk/cnxk_lookup.c index f36fb8f27a..e1f69b4f34 100644 --- a/drivers/net/cnxk/cnxk_lookup.c +++ b/drivers/net/cnxk/cnxk_lookup.c @@ -286,8 +286,8 @@ nix_create_rx_ol_flags_array(void *mem) errcode == NIX_RX_PERRCODE_OL3_LEN) { val |= RTE_MBUF_F_RX_IP_CKSUM_BAD; } else { - val |= RTE_MBUF_F_RX_IP_CKSUM_GOOD; - val |= RTE_MBUF_F_RX_L4_CKSUM_GOOD; + val |= RTE_MBUF_F_RX_IP_CKSUM_BAD; + val |= RTE_MBUF_F_RX_L4_CKSUM_BAD; } break; }