SK_SKB BPF programs are run from the socket/tcp context but early in
the stack before much of the TCP metadata is needed in tcp_skb_cb. So
we can use some unused fields to place BPF metadata needed for SK_SKB
programs when implementing the redirect function.
This allows us to drop the preempt disable logic. It does however
require an API change so sk_redirect_map() has been updated to
additionally provide ctx_ptr to skb. Note, we do however continue to
disable/enable preemption around actual BPF program running to account
for map updates.
Signed-off-by: John Fastabend <email@example.com>
Acked-by: Daniel Borkmann <firstname.lastname@example.org>
Acked-by: Alexei Starovoitov <email@example.com>
Signed-off-by: David S. Miller <firstname.lastname@example.org>