bpf: fix the xdp_adjust_tail sample prog issue
Subsystems (4)
PATCH v2 1/1 bpf: fix the xdp_adjust_tail sample prog issue
From: Yuan Chen <[email protected]>
During the xdp_adjust_tail test, probabilistic failure occurs and SKB package is discarded by the kernel. After checking the issues by tracking SKB package, it is identified that they were caused by checksum errors. Refer to checksum of the arch/arm64/include/asm/checksum.h for fixing.
v2: Based on Alexei Starovoitov's suggestions, it is necessary to keep the code
implementation consistent.
--- samples/bpf/xdp_adjust_tail_kern.c | 1 + 1 file changed, 1 insertion(+)
samples/bpf/xdp_adjust_tail_kern.c +1 -0
@@ -57,6 +57,7 @@ static __always_inline void swap_mac(void *data, struct ethhdr *orig_eth) static __always_inline __u16 csum_fold_helper(__u32 csum) { + csum = (csum &0xffff ) + (csum >>16 );return ~((csum &0xffff ) + (csum >>16 )); }
Signature · 1 line
2.46.0
This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:
Hello:
This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:
Quoted 8 lines · On Mon, 30 Sep 2024 10:41:15 +0800 you wrote:
From: Yuan Chen <[email protected]>
During the
xdp_adjust_tailtest, probabilistic failure occurs and SKB package is discarded by the kernel. After checking the issues by tracking SKB package, it is identified that they were caused by checksum errors. Refer to checksum of thearch/arm64/include/asm/checksum.hfor fixing.[...]
Here is the summary with links:
- [v2] bpf: fix the xdp_adjust_tail sample prog issue
https://git.kernel.org/bpf/bpf-next/c/4236f114a3ff
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html