mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-22 00:39:33 -05:00
selftests/net: Print TCP flags in more common format
Before: ># 13145[lib/ftrace-tcp.c:427] trace event filter tcp_ao_key_not_found [2001:db8:1::1:-1 => 2001:db8:254::1:7010, L3index 0, flags: !FS!R!P!., keyid: 100, rnext: 100, maclen: -1, sne: -1] = 1 After: ># 13487[lib/ftrace-tcp.c:427] trace event filter tcp_ao_key_not_found [2001:db8:1::1:-1 => 2001:db8:254::1:7010, L3index 0, flags: S, keyid: 100, rnext: 100, maclen: -1, sne: -1] = 1 For the history, I think the initial format was to emphasize the absence of flags as well as their presence (!R meant no RST flag). But looking again, it's just unreadable and hard to understand. Make it the standard/expected one. Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com> Link: https://patch.msgid.link/20250319-tcp-ao-selftests-polling-v2-1-da48040153d1@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
3e25c1a7c0
commit
65ffdf31be
@@ -427,11 +427,8 @@ static void dump_trace_event(struct expected_trace_point *e)
|
||||
test_print("trace event filter %s [%s:%d => %s:%d, L3index %d, flags: %s%s%s%s%s, keyid: %d, rnext: %d, maclen: %d, sne: %d] = %zu",
|
||||
trace_event_names[e->type],
|
||||
src, e->src_port, dst, e->dst_port, e->L3index,
|
||||
(e->fin > 0) ? "F" : (e->fin == 0) ? "!F" : "",
|
||||
(e->syn > 0) ? "S" : (e->syn == 0) ? "!S" : "",
|
||||
(e->rst > 0) ? "R" : (e->rst == 0) ? "!R" : "",
|
||||
(e->psh > 0) ? "P" : (e->psh == 0) ? "!P" : "",
|
||||
(e->ack > 0) ? "." : (e->ack == 0) ? "!." : "",
|
||||
e->fin ? "F" : "", e->syn ? "S" : "", e->rst ? "R" : "",
|
||||
e->psh ? "P" : "", e->ack ? "." : "",
|
||||
e->keyid, e->rnext, e->maclen, e->sne, e->matched);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user