lkml.org 
[lkml]   [2023]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH bpf-next v4] bpf, test_run: fix &xdp_frame misplacement for LIVE_FRAMES
From
On 2/15/23 10:54 AM, Alexander Lobakin wrote:
> +#if BITS_PER_LONG == 64 && PAGE_SIZE == SZ_4K
> +/* tools/testing/selftests/bpf/prog_tests/xdp_do_redirect.c:%MAX_PKT_SIZE
> + * must be updated accordingly when any of these changes, otherwise BPF
> + * selftests will fail.
> + */
> +#ifdef __s390x__
> +#define TEST_MAX_PKT_SIZE 3216
> +#else
> +#define TEST_MAX_PKT_SIZE 3408

I have to revert this patch for now. It is not right to assume cache line size:
https://lore.kernel.org/bpf/50c35055-afa9-d01e-9a05-ea5351280e4f@intel.com/

Please resubmit and consider if this static_assert is really needed in the
kernel test_run.c.

> +#endif
> +static_assert(SKB_WITH_OVERHEAD(TEST_XDP_FRAME_SIZE - XDP_PACKET_HEADROOM) ==
> + TEST_MAX_PKT_SIZE);
> +#endif

\
 
 \ /
  Last update: 2023-03-27 00:27    [W:0.064 / U:1.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site