[PATCH] selftests/bpf: Fix bpf-iter-tcp4 test to print correctly the dest IP

Subsystems: bpf [general] (safe dynamic programs and tools), bpf [selftests] (test runners & infrastructure), kernel selftest framework, the rest

STALE1824d LANDED

Landed in mainline as 277b13405703 on 2021-08-06.

3 messages, 3 authors, 2021-08-06 · open the first message on its own page

[PATCH] selftests/bpf: Fix bpf-iter-tcp4 test to print correctly the dest IP

From: Jose Blanquicet <hidden>
Date: 2021-08-05 16:42:06

Currently, this test is incorrectly printing the destination port
in place of the destination IP.

Signed-off-by: Jose Blanquicet <redacted>
---
 tools/testing/selftests/bpf/progs/bpf_iter_tcp4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/progs/bpf_iter_tcp4.c b/tools/testing/selftests/bpf/progs/bpf_iter_tcp4.c
index 2e4775c35414..92267abb462f 100644
--- a/tools/testing/selftests/bpf/progs/bpf_iter_tcp4.c
+++ b/tools/testing/selftests/bpf/progs/bpf_iter_tcp4.c
@@ -121,7 +121,7 @@ static int dump_tcp_sock(struct seq_file *seq, struct tcp_sock *tp,
 	}
 
 	BPF_SEQ_PRINTF(seq, "%4d: %08X:%04X %08X:%04X ",
-		       seq_num, src, srcp, destp, destp);
+		       seq_num, src, srcp, dest, destp);
 	BPF_SEQ_PRINTF(seq, "%02X %08X:%08X %02X:%08lX %08X %5u %8d %lu %d ",
 		       state,
 		       tp->write_seq - tp->snd_una, rx_queue,
-- 
2.25.1

Re: [PATCH] selftests/bpf: Fix bpf-iter-tcp4 test to print correctly the dest IP

From: Yonghong Song <hidden>
Date: 2021-08-05 17:05:26


On 8/5/21 9:40 AM, Jose Blanquicet wrote:
Currently, this test is incorrectly printing the destination port
in place of the destination IP.

Signed-off-by: Jose Blanquicet <redacted>
Thanks for the fix! LGTM.

Acked-by: Yonghong Song <redacted>

Re: [PATCH] selftests/bpf: Fix bpf-iter-tcp4 test to print correctly the dest IP

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-08-06 15:20:09

Hello:

This patch was applied to bpf/bpf-next.git (refs/heads/master):

On Thu,  5 Aug 2021 18:40:36 +0200 you wrote:
Currently, this test is incorrectly printing the destination port
in place of the destination IP.

Signed-off-by: Jose Blanquicet <redacted>
---
 tools/testing/selftests/bpf/progs/bpf_iter_tcp4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
  - selftests/bpf: Fix bpf-iter-tcp4 test to print correctly the dest IP
    https://git.kernel.org/bpf/bpf-next/c/277b13405703

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help