Skip to contentSkip to conversation

selftests/bpf: Initialize tc in xdp_synproxy

PATCH Applied Ilya Leoshkevich 2 participants 2 messages Feb 2, 2023 – Feb 3, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests/bpf: Initialize tc in xdp_synproxy

xdp_synproxy/xdp fails in CI with:

Error: bpf_tc_hook_create: File exists

The XDP version of the test should not be calling bpf_tc_hook_create(); the reason it's happening anyway is that if we don't specify --tc on the command line, tc variable remains uninitialized.

Fixes 784d5dc0efc2 ("selftests/bpf: Add selftests for raw syncookie helpers in TC mode")
---
 tools/testing/selftests/bpf/xdp_synproxy.c | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/bpf/xdp_synproxy.c +1 -0
index 410a1385a01d..6dbe0b745198 100644
@@ -116,6 +116,7 @@ static void parse_options(int argc, char *argv[], unsigned int *ifindex, __u32 *
 	*tcpipopts = 0;
 	*ports = NULL;
 	*single = false;
+	*tc = false;
 
 	while (true) {
 		int opt;
Signature · 1 line
2.39.1
#1 lore raw
This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:

Hello:

This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov <[email protected]>:

Quoted 9 lines · On Fri, 3 Feb 2023 00:53:35 +0100 you wrote:

xdp_synproxy/xdp fails in CI with:

Error: bpf_tc_hook_create: File exists

The XDP version of the test should not be calling bpf_tc_hook_create(); the reason it's happening anyway is that if we don't specify --tc on the command line, tc variable remains uninitialized.

[...]

Here is the summary with links:
- [bpf-next] selftests/bpf: Initialize tc in xdp_synproxy

    https://git.kernel.org/bpf/bpf-next/c/354bb4a0e0b6

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html