diff options
author | Sean Anderson <sean.anderson@linux.dev> | 2024-09-09 12:10:16 -0400 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-09-10 18:34:51 -0700 |
commit | 736f0c7a8ec2d1d39aed0b3fb67127a37eb5311b (patch) | |
tree | 0483934282e7d5ad2b4bb2b84321c885b261cf1e | |
parent | 06c069ff2f7013f85bd071e8bfccc4808ac59da4 (diff) | |
download | linux-736f0c7a8ec2d1d39aed0b3fb67127a37eb5311b.tar.gz linux-736f0c7a8ec2d1d39aed0b3fb67127a37eb5311b.tar.bz2 linux-736f0c7a8ec2d1d39aed0b3fb67127a37eb5311b.zip |
net: xilinx: axienet: Relax partial rx checksum checks
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 <sean.anderson@linux.dev>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20240909161016.1149119-5-sean.anderson@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 86f17c44ae90..ea7d7c03f48e 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; } |