-
- Downloads
sock: Introduce sk->sk_prot->psock_update_sk_prot()
Currently sockmap calls into each protocol to update the struct proto and replace it. This certainly won't work when the protocol is implemented as a module, for example, AF_UNIX. Introduce a new ops sk->sk_prot->psock_update_sk_prot(), so each protocol can implement its own way to replace the struct proto. This also helps get rid of symbol dependencies on CONFIG_INET. Signed-off-by:Cong Wang <cong.wang@bytedance.com> Signed-off-by:
Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210331023237.41094-11-xiyou.wangcong@gmail.com
Showing
- include/linux/skmsg.h 3 additions, 15 deletionsinclude/linux/skmsg.h
- include/net/sock.h 3 additions, 0 deletionsinclude/net/sock.h
- include/net/tcp.h 1 addition, 0 deletionsinclude/net/tcp.h
- include/net/udp.h 1 addition, 0 deletionsinclude/net/udp.h
- net/core/skmsg.c 0 additions, 5 deletionsnet/core/skmsg.c
- net/core/sock_map.c 4 additions, 20 deletionsnet/core/sock_map.c
- net/ipv4/tcp_bpf.c 21 additions, 3 deletionsnet/ipv4/tcp_bpf.c
- net/ipv4/tcp_ipv4.c 3 additions, 0 deletionsnet/ipv4/tcp_ipv4.c
- net/ipv4/udp.c 3 additions, 0 deletionsnet/ipv4/udp.c
- net/ipv4/udp_bpf.c 13 additions, 2 deletionsnet/ipv4/udp_bpf.c
- net/ipv6/tcp_ipv6.c 3 additions, 0 deletionsnet/ipv6/tcp_ipv6.c
- net/ipv6/udp.c 3 additions, 0 deletionsnet/ipv6/udp.c
Loading
Please register or sign in to comment