Re: [PATCH net] selftests/bpf: fix pointer arithmetic in test_xdp_do_redirect

2024-05-07 Thread Alexander Lobakin
From: Michal Schmidt Date: Mon, 6 May 2024 16:50:22 +0200 > Cast operation has a higher precedence than addition. The code here > wants to zero the 2nd half of the 64-bit metadata, but due to a pointer > arithmetic mistake, it writes the zero at offset 16 instead. > > Just adding parentheses ar

Re: [PATCH net] selftests/bpf: fix pointer arithmetic in test_xdp_do_redirect

2024-05-06 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko : On Mon, 6 May 2024 16:50:22 +0200 you wrote: > Cast operation has a higher precedence than addition. The code here > wants to zero the 2nd half of the 64-bit metadata, but due to a pointer > arithmetic mistake, it wr

Re: [PATCH net] selftests/bpf: fix pointer arithmetic in test_xdp_do_redirect

2024-05-06 Thread Toke Høiland-Jørgensen
Michal Schmidt writes: > Cast operation has a higher precedence than addition. The code here > wants to zero the 2nd half of the 64-bit metadata, but due to a pointer > arithmetic mistake, it writes the zero at offset 16 instead. > > Just adding parentheses around "data + 4" would fix this, but I

[PATCH net] selftests/bpf: fix pointer arithmetic in test_xdp_do_redirect

2024-05-06 Thread Michal Schmidt
Cast operation has a higher precedence than addition. The code here wants to zero the 2nd half of the 64-bit metadata, but due to a pointer arithmetic mistake, it writes the zero at offset 16 instead. Just adding parentheses around "data + 4" would fix this, but I think this will be slightly bette