]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
bpf: Fix the xdp_adjust_tail sample prog issue
authorYuan Chen <chenyuan@kylinos.cn>
Mon, 30 Sep 2024 02:41:15 +0000 (10:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 09:59:32 +0000 (10:59 +0100)
commit9635f7f4d45a12a747d0a241450d677dcf3bb696
treeda82c67236403eebb8b46117fb17ce9bfbdb9a63
parentbb43628a780669ca28e8d6157c2e2fe433b0b8d9
bpf: Fix the xdp_adjust_tail sample prog issue

[ Upstream commit 4236f114a3ffbbfd217436c08852e94cae372f57 ]

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.

Fixes: c6ffd1ff7856 (bpf: add bpf_xdp_adjust_tail sample prog)
Signed-off-by: Yuan Chen <chenyuan@kylinos.cn>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20240930024115.52841-1-chenyuan_fl@163.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
samples/bpf/xdp_adjust_tail_kern.c