From patchwork Mon Sep 30 16:08:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Barker X-Patchwork-Id: 13816651 X-Patchwork-Delegate: kuba@kernel.org Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EAA2219309C; Mon, 30 Sep 2024 16:09:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727712569; cv=none; b=Xz/DE/wnOLpS+0LFZ3HCrhw5aw9JeP+mO8nhUmLGKS2f9cEe7MgiIryCD224XHV5g1NgMmdsj/AoHU1nUF9KS0lnUIzsgyaaRPjQ0dUlPODpzHx68yapN6zBJDMEFchciY/3CT8SSG6pB0TDRuOqqu5TBdTGKUk14cR5e89qJIM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727712569; c=relaxed/simple; bh=GzmTAqGiA1JIN0S7y4kJ5+tKoxXPYz/HRSBLWMDxsG8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CWZ0UdSR7EbxUP8NK7G872OV0kp3rISjr2qvjZYeOPvzkHIc3PFTwO1GXK7gx5GqJBCWjoIWywp4tDKA7beOnTBt1eQmfYU0TNcYeoVDFa2GmPVgmh0NIgiFhTHR7FqFTB0Q53UfeC5Q3odSdh9PPlvOl8R5q7p/pwJHierCPfs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pbarker.dev; spf=fail smtp.mailfrom=pbarker.dev; arc=none smtp.client-ip=210.160.252.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pbarker.dev Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=pbarker.dev X-IronPort-AV: E=Sophos;i="6.11,166,1725289200"; d="scan'208";a="220371951" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 01 Oct 2024 01:09:24 +0900 Received: from GBR-5CG2373LKG.adwin.renesas.com (unknown [10.226.93.43]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 21E8140156B5; Tue, 1 Oct 2024 01:09:11 +0900 (JST) From: Paul Barker To: Sergey Shtylyov , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Paul Barker , Geert Uytterhoeven , =?utf-8?q?Niklas_S=C3=B6derlu?= =?utf-8?q?nd?= , Biju Das , Claudiu Beznea , netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [net-next PATCH 03/11] net: ravb: Drop IP protocol check from RX csum verification Date: Mon, 30 Sep 2024 17:08:37 +0100 Message-Id: <20240930160845.8520-4-paul@pbarker.dev> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240930160845.8520-1-paul@pbarker.dev> References: <20240930160845.8520-1-paul@pbarker.dev> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Paul Barker We do not need to confirm that the protocol is IPv4. If the hardware encounters an unsupported protocol, it will set the checksum value to 0xFFFF. Signed-off-by: Paul Barker Reviewed-by: Sergey Shtylyov --- drivers/net/ethernet/renesas/ravb_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index f1b487152555..f3913c164161 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -781,8 +781,7 @@ static void ravb_rx_csum_gbeth(struct sk_buff *skb) else skb_trim(skb, skb->len - 2 * sizeof(__sum16)); - /* TODO: IPV6 Rx checksum */ - if (skb->protocol == htons(ETH_P_IP) && !csum_proto) + if (!csum_proto) skb->ip_summed = CHECKSUM_UNNECESSARY; }