Skip to content
Commit 6e98730b authored by Gilad Sever's avatar Gilad Sever Committed by Daniel Borkmann
Browse files

bpf: Factor out socket lookup functions for the TC hookpoint.



Change BPF helper socket lookup functions to use TC specific variants:
bpf_tc_sk_lookup_tcp() / bpf_tc_sk_lookup_udp() / bpf_tc_skc_lookup_tcp()
instead of sharing implementation with the cg / sk_skb hooking points.
This allows introducing a separate logic for the TC flow.

The tc functions are identical to the original code.

Signed-off-by: default avatarGilad Sever <gilad9366@gmail.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Reviewed-by: default avatarShmulik Ladkani <shmulik.ladkani@gmail.com>
Reviewed-by: default avatarEyal Birger <eyal.birger@gmail.com>
Acked-by: default avatarStanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/bpf/20230621104211.301902-2-gilad9366@gmail.com
parent 970308a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment