Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp100749pxb; Mon, 13 Sep 2021 14:06:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbgknDLkXbFl4/VMRFdOdPO2WaHM0xazN7GSKp6aR6URtUqnaBPgq3F3GWpvStbFj08WzT X-Received: by 2002:a05:6602:1845:: with SMTP id d5mr10642760ioi.23.1631567198569; Mon, 13 Sep 2021 14:06:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631567198; cv=none; d=google.com; s=arc-20160816; b=NDYbfW1E1kkmuyPR9CYKtni3/hS5ap5Soy4oVMLQD27guCwq/2UGkll4i5g1n+Xj7S /eiZLLLsmmA5JtwDgvXROkTs6MREVFFq2CmubhrNl3WxtR13gnS/i+eAHOK2Ti2XUMxq MLaN8gglC8pteJ0qaqtVfCH6ZqZgY+tSAzSszQqrEOYb7P1Zshw1t2fzbVSgbzExq+Bb ECYSeJEAReVR0n25yv1ry3vra2I3VMhGVUBP7X6D75aMm+4+pD2gnwW6pb44b0UOKUyH PhW5Ni38x8G6HHDAigf0iQc0/xynQa9qmo5vycOCNThwRPVBzIuhD7oCoF8olrq0zB4m D3GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7XvbYeNu8Lqk/uhQM6mfhnewd7x0ndkFfLfO0sGT5Ww=; b=eRFs0aLk9DBtKzLB233G1wRqrIIEuw4OshzkW4+3pxkDCusZGDy6k9CrUQOPGo8+JE yfIEhtrd4Qu7CtG4wxqC4EmHjbOmOZEd5Y15ZNn7OVCdI6U0hCD3Ejxmz03NvDdOStl0 tiK+0GmHxm7d1gPb/pW1T9gfMW6w3OkvpcUOZKJzyOIKhnY5fZvqb3X7VlhNJs1C3a1w pIJ6ielTR9c45CpdJHt82yOY6KLY/CSc/bSpSKWCwBxNVeNY/w75CgQlm+65lhLkaW3E oRYvJXk8bnSWDktTmSD8TDm99l+2Zyl/4W9Aq9oIfTTvvoYYjr/58YK0bkjbbPtxVnIG 63cQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LacpkuUi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si8054807ile.8.2021.09.13.14.06.26; Mon, 13 Sep 2021 14:06:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LacpkuUi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240292AbhIMNuf (ORCPT + 99 others); Mon, 13 Sep 2021 09:50:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:51542 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242222AbhIMNql (ORCPT ); Mon, 13 Sep 2021 09:46:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C4CA760FC1; Mon, 13 Sep 2021 13:31:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539916; bh=fT292m/SNxuzLY1t+SCsCQsUexxhcXIKN/bPLzBAUks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LacpkuUiwfoNHiNbwhIT8pszVtDWQhMNevtbzNLyr8e6wIborkzUSBfs3TbSoogV2 Orl88soTVXaQeP9gfdSUdX71m+Cu+d3NM73LmrXWOkQ1XTDubV4pRSps8thaCUGq1Y 6SZsCJnOaZm6mhF8yY3WNR4DcnywZwSWJJAb+dhY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sunil Goutham , Subbaraya Sundeep , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 213/236] octeontx2-af: Set proper errorcode for IPv4 checksum errors Date: Mon, 13 Sep 2021 15:15:18 +0200 Message-Id: <20210913131107.617928931@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sunil Goutham [ Upstream commit 1e4428b6dba9b683dc2ec0a56ed7879de3200cce ] With current config, for packets with IPv4 checksum errors, errorcode is being set to UNKNOWN. Hence added a separate errorcodes for outer and inner IPv4 checksum and changed NPC configuration accordingly. Also turn on L2 multicast address check in NPC protocol check block. Fixes: 6b3321bacc5a ("octeontx2-af: Enable packet length and csum validation") Signed-off-by: Sunil Goutham Signed-off-by: Subbaraya Sundeep Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c index a8a515ba1700..6fa9358e6db4 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c @@ -1171,14 +1171,15 @@ int rvu_npc_init(struct rvu *rvu) /* Enable below for Rx pkts. * - Outer IPv4 header checksum validation. - * - Detect outer L2 broadcast address and set NPC_RESULT_S[L2M]. + * - Detect outer L2 broadcast address and set NPC_RESULT_S[L2B]. + * - Detect outer L2 multicast address and set NPC_RESULT_S[L2M]. * - Inner IPv4 header checksum validation. * - Set non zero checksum error code value */ rvu_write64(rvu, blkaddr, NPC_AF_PCK_CFG, rvu_read64(rvu, blkaddr, NPC_AF_PCK_CFG) | - BIT_ULL(32) | BIT_ULL(24) | BIT_ULL(6) | - BIT_ULL(2) | BIT_ULL(1)); + ((u64)NPC_EC_OIP4_CSUM << 32) | (NPC_EC_IIP4_CSUM << 24) | + BIT_ULL(7) | BIT_ULL(6) | BIT_ULL(2) | BIT_ULL(1)); /* Set RX and TX side MCAM search key size. * LA..LD (ltype only) + Channel -- 2.30.2