Skip to content

Commit 736f0c7

Browse files
Sean Andersonkuba-moo
authored andcommitted
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>
1 parent 06c069f commit 736f0c7

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/net/ethernet/xilinx/xilinx_axienet_main.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,9 +1188,7 @@ static int axienet_rx_poll(struct napi_struct *napi, int budget)
11881188
csumstatus == XAE_IP_UDP_CSUM_VALIDATED) {
11891189
skb->ip_summed = CHECKSUM_UNNECESSARY;
11901190
}
1191-
} else if ((lp->features & XAE_FEATURE_PARTIAL_RX_CSUM) != 0 &&
1192-
skb->protocol == htons(ETH_P_IP) &&
1193-
skb->len > 64) {
1191+
} else if (lp->features & XAE_FEATURE_PARTIAL_RX_CSUM) {
11941192
skb->csum = be32_to_cpu(cur_p->app3 & 0xFFFF);
11951193
skb->ip_summed = CHECKSUM_COMPLETE;
11961194
}

0 commit comments

Comments
 (0)