diff options
author | Yonghong Song <yonghong.song@linux.dev> | 2024-04-09 21:35:27 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-04-10 19:52:25 -0700 |
commit | 699c23f02c65cbfc3e638f14ce0d70c23a2e1f02 (patch) | |
tree | 070b277b3ca08c33c240a73d794ce2226dd6a719 /include/linux/skmsg.h | |
parent | d0a2ba197bcbeaa795c5c961d927bcaf55964669 (diff) |
bpf: Add bpf_link support for sk_msg and sk_skb progs
Add bpf_link support for sk_msg and sk_skb programs. We have an
internal request to support bpf_link for sk_msg programs so user
space can have a uniform handling with bpf_link based libbpf
APIs. Using bpf_link based libbpf API also has a benefit which
makes system robust by decoupling prog life cycle and
attachment life cycle.
Reviewed-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20240410043527.3737160-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux/skmsg.h')
-rw-r--r-- | include/linux/skmsg.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h index e65ec3fd2799..9c8dd4c01412 100644 --- a/include/linux/skmsg.h +++ b/include/linux/skmsg.h @@ -58,6 +58,10 @@ struct sk_psock_progs { struct bpf_prog *stream_parser; struct bpf_prog *stream_verdict; struct bpf_prog *skb_verdict; + struct bpf_link *msg_parser_link; + struct bpf_link *stream_parser_link; + struct bpf_link *stream_verdict_link; + struct bpf_link *skb_verdict_link; }; enum sk_psock_state_bits { |