From: Sean Anderson <sean.anderson@linux.dev>
To: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org
Cc: Michal Simek <michal.simek@amd.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Sean Anderson <sean.anderson@linux.dev>
Subject: [PATCH 3/3] net: xilinx: axienet: Relax partial rx checksum checks
Date: Tue, 3 Sep 2024 14:43:34 -0400 [thread overview]
Message-ID: <20240903184334.4150843-4-sean.anderson@linux.dev> (raw)
In-Reply-To: <20240903184334.4150843-1-sean.anderson@linux.dev>
The partial rx checksum feature computes a checksum over the entire
packet, regardless of the L3 protocol. Remove the check for IPv4.
Additionally, packets under 64 bytes should have been dropped by the
MAC, so we can remove the length check as well.
Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
---
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 74fade5a95c2..99d08a775520 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;
}
--
2.35.1.1320.gc452695387.dirty
next prev parent reply other threads:[~2024-09-03 18:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 18:43 [PATCH 0/3] net: xilinx: axienet: Partial checksum offload improvements Sean Anderson
2024-09-03 18:43 ` [PATCH 1/3] net: xilinx: axienet: Remove unused checksum variables Sean Anderson
2024-09-04 16:19 ` Simon Horman
2024-09-04 17:03 ` Pandey, Radhey Shyam
2024-09-05 14:09 ` Sean Anderson
2024-09-03 18:43 ` [PATCH 2/3] net: xilinx: axienet: Enable NETIF_F_HW_CSUM for partial tx checksumming Sean Anderson
2024-09-04 16:20 ` Simon Horman
2024-09-03 18:43 ` Sean Anderson [this message]
2024-09-04 16:20 ` [PATCH 3/3] net: xilinx: axienet: Relax partial rx checksum checks Simon Horman
2024-09-04 16:30 ` Eric Dumazet
2024-09-05 14:24 ` Sean Anderson
2024-09-05 14:59 ` Eric Dumazet
2024-09-05 16:32 ` Sean Anderson
2024-09-06 21:37 ` Sean Anderson
2024-09-03 18:48 ` [PATCH 0/3] net: xilinx: axienet: Partial checksum offload improvements Sean Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240903184334.4150843-4-sean.anderson@linux.dev \
--to=sean.anderson@linux.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=radhey.shyam.pandey@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).