From patchwork Mon Sep 9 16:10:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13797262 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 424E5ECE579 for ; Mon, 9 Sep 2024 16:11:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=tqlLT/Hh20witXiI7FRrOr1inVlCff2bwtrhyondFxg=; b=jAkcoDz32BioKMu+Ltm3fhsnMR xki/nxPVOjFQA5K+Z7335YgpaxI7jkoPJc+KNCR65Si7HTg/45PBTJMb5Uf10497IdpAk80ATXtcq VUc3pgYNhPXh8dpiEsW43JDiY1RsVQcpN+fsIw5IjKBgYVjkn1wf6FtldE6yFZlkvtLsc8fpjhhZG xNxrNdvUxIOUnIEJpWLFQvNVta/GlfbScrUk2WVyJSS74DjSxRAnjBQj8ZdxzTtuZz1d6+snyM7Pd 6TA4/wgOQJjbNWLri1gWKTy75TxW9bs0tkhRbR2vBmCwBfr6peqIOaDs3tUFtXFoQC2R+F2wpdvSI A/E7Vz5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sngzC-00000002bi3-37gq; Mon, 09 Sep 2024 16:11:30 +0000 Received: from out-186.mta1.migadu.com ([95.215.58.186]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sngyB-00000002bQ0-3H9x for linux-arm-kernel@lists.infradead.org; Mon, 09 Sep 2024 16:10:29 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1725898224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tqlLT/Hh20witXiI7FRrOr1inVlCff2bwtrhyondFxg=; b=du//2mr3O0O9PxG9nGWD5CwEvtu5tqp/zl7s9xAgi/UhdCNIDX0jRYiQlFqCE1l8NIEKUa ds8wd6n1vdaCavzEWJxKAQsUnpLAXzvg1hNyZLtrD8Koj8iNEBklt+llZhWMQzCDOjazi1 0e6/yDaZD//6i7QIrk54Tvwvx1COE+M= From: Sean Anderson To: Radhey Shyam Pandey , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Michal Simek , Sean Anderson , Simon Horman Subject: [PATCH net-next v2 1/4] net: xilinx: axienet: Remove unused checksum variables Date: Mon, 9 Sep 2024 12:10:13 -0400 Message-Id: <20240909161016.1149119-2-sean.anderson@linux.dev> In-Reply-To: <20240909161016.1149119-1-sean.anderson@linux.dev> References: <20240909161016.1149119-1-sean.anderson@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240909_091027_992259_140F1ED6 X-CRM114-Status: UNSURE ( 9.43 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org These variables are set but never used. Remove them. Signed-off-by: Sean Anderson Reviewed-by: Simon Horman Reviewed-by: Radhey Shyam Pandey --- (no changes since v1) drivers/net/ethernet/xilinx/xilinx_axienet.h | 5 ----- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 12 ------------ 2 files changed, 17 deletions(-) diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet.h b/drivers/net/ethernet/xilinx/xilinx_axienet.h index c301dd2ee083..b9d2d7319220 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet.h +++ b/drivers/net/ethernet/xilinx/xilinx_axienet.h @@ -527,8 +527,6 @@ struct skbuf_dma_descriptor { * supported, the maximum frame size would be 9k. Else it is * 1522 bytes (assuming support for basic VLAN) * @rxmem: Stores rx memory size for jumbo frame handling. - * @csum_offload_on_tx_path: Stores the checksum selection on TX side. - * @csum_offload_on_rx_path: Stores the checksum selection on RX side. * @coalesce_count_rx: Store the irq coalesce on RX side. * @coalesce_usec_rx: IRQ coalesce delay for RX * @coalesce_count_tx: Store the irq coalesce on TX side. @@ -606,9 +604,6 @@ struct axienet_local { u32 max_frm_size; u32 rxmem; - int csum_offload_on_tx_path; - int csum_offload_on_rx_path; - u32 coalesce_count_rx; u32 coalesce_usec_rx; u32 coalesce_count_tx; diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index fe6a0e2e463f..60ec430f3eb0 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -2631,38 +2631,26 @@ static int axienet_probe(struct platform_device *pdev) if (!ret) { switch (value) { case 1: - lp->csum_offload_on_tx_path = - XAE_FEATURE_PARTIAL_TX_CSUM; lp->features |= XAE_FEATURE_PARTIAL_TX_CSUM; /* Can checksum TCP/UDP over IPv4. */ ndev->features |= NETIF_F_IP_CSUM; break; case 2: - lp->csum_offload_on_tx_path = - XAE_FEATURE_FULL_TX_CSUM; lp->features |= XAE_FEATURE_FULL_TX_CSUM; /* Can checksum TCP/UDP over IPv4. */ ndev->features |= NETIF_F_IP_CSUM; break; - default: - lp->csum_offload_on_tx_path = XAE_NO_CSUM_OFFLOAD; } } ret = of_property_read_u32(pdev->dev.of_node, "xlnx,rxcsum", &value); if (!ret) { switch (value) { case 1: - lp->csum_offload_on_rx_path = - XAE_FEATURE_PARTIAL_RX_CSUM; lp->features |= XAE_FEATURE_PARTIAL_RX_CSUM; break; case 2: - lp->csum_offload_on_rx_path = - XAE_FEATURE_FULL_RX_CSUM; lp->features |= XAE_FEATURE_FULL_RX_CSUM; break; - default: - lp->csum_offload_on_rx_path = XAE_NO_CSUM_OFFLOAD; } } /* For supporting jumbo frames, the Axi Ethernet hardware must have From patchwork Mon Sep 9 16:10:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13797263 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4BB79ECE577 for ; Mon, 9 Sep 2024 16:12:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uMGpZzRVl3cnTirggChhJzILzss8nbtBZB80hg8Yk5I=; b=nlZSVk5umq3+Nnmkmw2hnCckVK AVss/SEXUBjJHb/FwEWZU74qhYWiI4IY1YgvB7bko6hOlbvPn7Rxr0p5TQFckrCcIgUVr1I5nDwNs NZDtsIZxkGmCcR71oLH8u0Z+JXeUEVnlTBINGNcA+LLcyrLgltGT1MrcMoRWfLZ7RVyYE0ZW8evI2 YvM4Ya/YASTFkyMPD15k0705cwegtT9Sw48ZoFG+Nz64IAgVbEn349mJltIzTptlwErlSKgBmewbL w1KaC4n0emC3WjyPyZR6f6Uanm4a2LkDgEEyKYzZe3MgxeBlIw9ocAmQC0ENsGl8CO3XqWHND5od2 L2XUn1cw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1snh0B-00000002bre-1TCI; Mon, 09 Sep 2024 16:12:31 +0000 Received: from out-184.mta1.migadu.com ([2001:41d0:203:375::b8]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sngyC-00000002bQL-2RRw for linux-arm-kernel@lists.infradead.org; Mon, 09 Sep 2024 16:10:30 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1725898225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uMGpZzRVl3cnTirggChhJzILzss8nbtBZB80hg8Yk5I=; b=VDXSUXZaJtjoEYkXI6+e0AyWJ1BxqXymHllkD0Q8foYU3h9SHSCt20qSkug7p5t6JSmk/K zFtyfRtpmc6Ul28NRKYqFeq3CdJjA8DL5I0afYX4pDwmdU7LSW0KopS2d3bqv/9uAZHrVA xkvBYrgDoagwqWCgCjkiZXl97P4TiHc= From: Sean Anderson To: Radhey Shyam Pandey , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Michal Simek , Sean Anderson , Simon Horman Subject: [PATCH net-next v2 2/4] net: xilinx: axienet: Enable NETIF_F_HW_CSUM for partial tx checksumming Date: Mon, 9 Sep 2024 12:10:14 -0400 Message-Id: <20240909161016.1149119-3-sean.anderson@linux.dev> In-Reply-To: <20240909161016.1149119-1-sean.anderson@linux.dev> References: <20240909161016.1149119-1-sean.anderson@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240909_091028_779352_626384EE X-CRM114-Status: GOOD ( 10.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Partial tx chechsumming is completely generic and does not depend on the L3/L4 protocol. Signal this to the net subsystem by enabling the more-generic offload feature (instead of restricting ourselves to TCP/UDP over IPv4 checksumming only like is necessary with full checksumming). Signed-off-by: Sean Anderson Reviewed-by: Simon Horman --- (no changes since v1) drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 60ec430f3eb0..74fade5a95c2 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -2632,8 +2632,8 @@ static int axienet_probe(struct platform_device *pdev) switch (value) { case 1: lp->features |= XAE_FEATURE_PARTIAL_TX_CSUM; - /* Can checksum TCP/UDP over IPv4. */ - ndev->features |= NETIF_F_IP_CSUM; + /* Can checksum any contiguous range */ + ndev->features |= NETIF_F_HW_CSUM; break; case 2: lp->features |= XAE_FEATURE_FULL_TX_CSUM; From patchwork Mon Sep 9 16:10:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13797264 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C8489ECE577 for ; Mon, 9 Sep 2024 16:13:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=19quJ8EY+Cd/sjvlTdES6J8MCKiXC6Ag5+CEkCU5nos=; b=ANT8AnuCfwUenlKNSUaf1XYzj9 N+qCltsl+KLjlM3Md2Wb5XCIYJ6c3Z3NCc57+eNByQmsDo98NICMUDvFEHjgd/GwZv3MjFtbknjDE 4D4LTqp/XBHeE5lnZg7XUFdCBCLFYIvRucdbzrbkk8anzKllMcoTPnyLCX5LUwq98pGZANSMNzVr1 uT1US/+aOW/G/4JjXlQxp7tKjHHWKnF9R/+fn9q4PG8mpwbXPkou8BUSi2DmDNMYlj4AlzcvOOI/T OLvyV2XzA6Y9FNgwm6Agn9dLCiLVnyNi/dkDLzhdYBebGSL7NkA+xPUHvj7nDoIB+IfEASK+3UPAK fJ7JxFog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1snh1A-00000002c3b-0JWQ; Mon, 09 Sep 2024 16:13:32 +0000 Received: from out-182.mta1.migadu.com ([95.215.58.182]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sngyE-00000002bQs-0yzz for linux-arm-kernel@lists.infradead.org; Mon, 09 Sep 2024 16:10:31 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1725898227; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=19quJ8EY+Cd/sjvlTdES6J8MCKiXC6Ag5+CEkCU5nos=; b=WMwpFzo0pw4JmPy1X46W/muKBh4whAMOfVtsKIzGGVe8CB6S1tZR2gvzgdGXNSEDmFxOBw BfdMByBIN0Fql23i1D/jaiyy4wb77jPzNdATlalFUontaQQdzq1AnFElzzML/TzxRJsAna m0OpznsksfqzjgbAlg5ZPnM+O+SunN4= From: Sean Anderson To: Radhey Shyam Pandey , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Michal Simek , Sean Anderson Subject: [PATCH net-next v2 3/4] net: xilinx: axienet: Set RXCSUM in features Date: Mon, 9 Sep 2024 12:10:15 -0400 Message-Id: <20240909161016.1149119-4-sean.anderson@linux.dev> In-Reply-To: <20240909161016.1149119-1-sean.anderson@linux.dev> References: <20240909161016.1149119-1-sean.anderson@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240909_091030_438155_1DBC5F2E X-CRM114-Status: UNSURE ( 9.09 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When it is supported by hardware, we enable receive checksum offload unconditionally. Update features to reflect this. Signed-off-by: Sean Anderson --- Changes in v2: - New drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 74fade5a95c2..2f7ab0922aed 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -2647,9 +2647,11 @@ static int axienet_probe(struct platform_device *pdev) switch (value) { case 1: lp->features |= XAE_FEATURE_PARTIAL_RX_CSUM; + ndev->features |= NETIF_F_RXCSUM; break; case 2: lp->features |= XAE_FEATURE_FULL_RX_CSUM; + ndev->features |= NETIF_F_RXCSUM; break; } } From patchwork Mon Sep 9 16:10:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Anderson X-Patchwork-Id: 13797287 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2333DECE579 for ; Mon, 9 Sep 2024 16:23:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HYLjaJjab8lWILZwaUDKtxHDlmqX2R9MWPau9VCILks=; b=YHX7imlWI8ViD72Q5PIHpRyGCC 8MzM+pppIFhEGe63qikMelzS4YmdKaChjbvpe2QClHludbuf5ImW/cNXG1nu0WUDmiCk5xa8LMm4u WAgXhztWAksMkTOUBA5JH0oaF3z7WD7JiKGpQkGa62QvjgMCDSiZ77fL9QSqwAUHFqyf6x3VeF+bX KIbFtwV8T4dT6vqvKk5QMwlOnHO+VW0QWTyUB5dHUCo/WvnVfqplYdTHfc5A83p7fz8bi2a/s5pab GCiDmdtDEQE16OqBVlh18w5wcxMb7zwhUhgCbBV44XBvPTJe4akV/bBGHcFhyOkMsMOt4g7GERTKy 386FWNJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1snhAg-00000002dU9-29m5; Mon, 09 Sep 2024 16:23:22 +0000 Received: from out-176.mta1.migadu.com ([2001:41d0:203:375::b0]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sngyG-00000002bRN-0ar2 for linux-arm-kernel@lists.infradead.org; Mon, 09 Sep 2024 16:10:33 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1725898229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HYLjaJjab8lWILZwaUDKtxHDlmqX2R9MWPau9VCILks=; b=T5/7VLwhGGEvLhNjsfyIe+LzHATEMF010ZU8OMtFrSM2z6VgninQV+HPMNdauzWTsk4jUw qxWNEs3FZK4I8mkDV7pYmGdnmyC9b5YaAyubV/f4PvnyR1zySgs2ULqnAJ0W2TOZFBV89A 4SXKZnNml7VJZTYNvWxV4Lnyk46GTPw= From: Sean Anderson To: Radhey Shyam Pandey , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Michal Simek , Sean Anderson , Simon Horman Subject: [PATCH net-next v2 4/4] net: xilinx: axienet: Relax partial rx checksum checks Date: Mon, 9 Sep 2024 12:10:16 -0400 Message-Id: <20240909161016.1149119-5-sean.anderson@linux.dev> In-Reply-To: <20240909161016.1149119-1-sean.anderson@linux.dev> References: <20240909161016.1149119-1-sean.anderson@linux.dev> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240909_091032_338511_C730025E X-CRM114-Status: GOOD ( 11.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The partial rx checksum feature computes a checksum over the entire packet, regardless of the L3 protocol. Remove the check for IPv4. Additionally, testing with csum.py (from kselftests) shows no anomalies with 64-byte packets, so we can remove that check as well. Signed-off-by: Sean Anderson Reviewed-by: Simon Horman --- Testing was performed with csum.py between two axienet netdevs. I also tested with a macb netdev, but I saw some errors due to 007e4ba3ee13 ("net: macb: initialize checksum when using checksum offloading"). I also tested manually with a dpaa netdev, but I wasn't set up for ssh. Changes in v2: - Expand commit message with testing methodology drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 2f7ab0922aed..4185c5708742 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -1188,9 +1188,7 @@ static int axienet_rx_poll(struct napi_struct *napi, int budget) csumstatus == XAE_IP_UDP_CSUM_VALIDATED) { skb->ip_summed = CHECKSUM_UNNECESSARY; } - } else if ((lp->features & XAE_FEATURE_PARTIAL_RX_CSUM) != 0 && - skb->protocol == htons(ETH_P_IP) && - skb->len > 64) { + } else if (lp->features & XAE_FEATURE_PARTIAL_RX_CSUM) { skb->csum = be32_to_cpu(cur_p->app3 & 0xFFFF); skb->ip_summed = CHECKSUM_COMPLETE; }