mirror of
https://github.com/torvalds/linux.git
synced 2026-11-26 16:33:17 +00:00
Cover new TCP-BPF callback in test_tcpbpf: when listen() is called on socket, set BPF_SOCK_OPS_STATE_CB_FLAG so that BPF_SOCK_OPS_STATE_CB callback can be called on future state transition, and when such a transition happens (TCP_LISTEN -> TCP_CLOSE), track it in the map and verify it in user space later. Signed-off-by: Andrey Ignatov <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
18 lines
310 B
C
18 lines
310 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#ifndef _TEST_TCPBPF_H
|
|
#define _TEST_TCPBPF_H
|
|
|
|
struct tcpbpf_globals {
|
|
__u32 event_map;
|
|
__u32 total_retrans;
|
|
__u32 data_segs_in;
|
|
__u32 data_segs_out;
|
|
__u32 bad_cb_test_rv;
|
|
__u32 good_cb_test_rv;
|
|
__u64 bytes_received;
|
|
__u64 bytes_acked;
|
|
__u32 num_listen;
|
|
};
|
|
#endif
|