This patch implements a new struct bpf_func_proto, named bpf_skc_to_mptcp_sock_proto. Define a new bpf_id BTF_SOCK_TYPE_MPTCP, and a new helper bpf_skc_to_mptcp_sock(), which invokes another new helper bpf_mptcp_sock_from_subflow() in net/mptcp/bpf.c to get struct mptcp_sock from a given subflow socket. v2: Emit BTF type, add func_id checks in verifier.c and bpf_trace.c, remove build check for CONFIG_BPF_JIT v5: Drop EXPORT_SYMBOL (Martin)
Showing the changes to scripts (1 of 11 files). Show all
Unified · Split
| @@ -633,6 +633,7 @@ class PrinterHelpers(Printer): · 632 unmodified lines | |||
| 633 | 'struct socket', | 633 | 'struct socket', |
| 634 | 'struct file', | 634 | 'struct file', |
| 635 | 'struct bpf_timer', | 635 | 'struct bpf_timer', |
| 636 | 'struct mptcp_sock', | ||
| 636 | ] | 637 | ] |
| 637 | known_types = { | 638 | known_types = { |
| 638 | '...', | 639 | '...', |
| @@ -682,6 +683,7 @@ class PrinterHelpers(Printer): · 43 unmodified lines | |||
| 682 | 'struct socket', | 683 | 'struct socket', |
| 683 | 'struct file', | 684 | 'struct file', |
| 684 | 'struct bpf_timer', | 685 | 'struct bpf_timer', |
| 686 | 'struct mptcp_sock', | ||
| 685 | } | 687 | } |
| 686 | mapped_types = { | 688 | mapped_types = { |
| 687 | 'u8': '__u8', | 689 | 'u8': '__u8', |