Patch "samples/bpf: xdp1 and xdp2 reduce XDPBUFSIZE to 60" has been added to the 6.4-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

    samples/bpf: xdp1 and xdp2 reduce XDPBUFSIZE to 60

to the 6.4-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:
     samples-bpf-xdp1-and-xdp2-reduce-xdpbufsize-to-60.patch
and it can be found in the queue-6.4 subdirectory.

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



commit 82e19d1a3127e7e25ce68f4372ae2dcf4dfb559a
Author: Jesper Dangaard Brouer <brouer@xxxxxxxxxx>
Date:   Tue May 30 16:30:41 2023 +0200

    samples/bpf: xdp1 and xdp2 reduce XDPBUFSIZE to 60
    
    [ Upstream commit 60548b825b082cedf89b275c21c28b1e1d030e50 ]
    
    Default samples/pktgen scripts send 60 byte packets as hardware adds
    4-bytes FCS checksum, which fulfils minimum Ethernet 64 bytes frame
    size.
    
    XDP layer will not necessary have access to the 4-bytes FCS checksum.
    
    This leads to bpf_xdp_load_bytes() failing as it tries to copy 64-bytes
    from an XDP packet that only have 60-bytes available.
    
    Fixes: 772251742262 ("samples/bpf: fixup some tools to be able to support xdp multibuffer")
    Signed-off-by: Jesper Dangaard Brouer <brouer@xxxxxxxxxx>
    Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
    Reviewed-by: Tariq Toukan <tariqt@xxxxxxxxxx>
    Link: https://lore.kernel.org/bpf/168545704139.2996228.2516528552939485216.stgit@firesoul
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/samples/bpf/xdp1_kern.c b/samples/bpf/xdp1_kern.c
index 0a5c704badd00..d91f27cbcfa99 100644
--- a/samples/bpf/xdp1_kern.c
+++ b/samples/bpf/xdp1_kern.c
@@ -39,7 +39,7 @@ static int parse_ipv6(void *data, u64 nh_off, void *data_end)
 	return ip6h->nexthdr;
 }
 
-#define XDPBUFSIZE	64
+#define XDPBUFSIZE	60
 SEC("xdp.frags")
 int xdp_prog1(struct xdp_md *ctx)
 {
diff --git a/samples/bpf/xdp2_kern.c b/samples/bpf/xdp2_kern.c
index 67804ecf7ce37..8bca674451ed1 100644
--- a/samples/bpf/xdp2_kern.c
+++ b/samples/bpf/xdp2_kern.c
@@ -55,7 +55,7 @@ static int parse_ipv6(void *data, u64 nh_off, void *data_end)
 	return ip6h->nexthdr;
 }
 
-#define XDPBUFSIZE	64
+#define XDPBUFSIZE	60
 SEC("xdp.frags")
 int xdp_prog1(struct xdp_md *ctx)
 {



[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