Patch "bpf: Fix the xdp_adjust_tail sample prog issue" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    bpf: Fix the xdp_adjust_tail sample prog issue

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     bpf-fix-the-xdp_adjust_tail-sample-prog-issue.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 2a7f254ced814fe40e9a6e4e4d387797c214433b
Author: Yuan Chen <chenyuan@xxxxxxxxxx>
Date:   Mon Sep 30 10:41:15 2024 +0800

    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@xxxxxxxxxx>
    Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
    Link: https://lore.kernel.org/bpf/20240930024115.52841-1-chenyuan_fl@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/samples/bpf/xdp_adjust_tail_kern.c b/samples/bpf/xdp_adjust_tail_kern.c
index ffdd548627f0a..da67bcad1c638 100644
--- a/samples/bpf/xdp_adjust_tail_kern.c
+++ b/samples/bpf/xdp_adjust_tail_kern.c
@@ -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));
 }
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux