]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Refactor sockmap redirect code so its easy to reuse
authorJohn Fastabend <john.fastabend@gmail.com>
Fri, 29 May 2020 23:06:41 +0000 (16:06 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 1 Jun 2020 21:48:32 +0000 (14:48 -0700)
commit374b6d6d5d0faade6a599c3c4fe04e71341c3651
tree5aeebc8c7dc5e317b92dfd90bb723bd2d8960f83
parent28b53fbbd814c829b7bd830c11557acbdcddb7d5
bpf: Refactor sockmap redirect code so its easy to reuse

We will need this block of code called from tls context shortly
lets refactor the redirect logic so its easy to use. This also
cleans up the switch stmt so we have fewer fallthrough cases.

No logic changes are intended.

Fixes: 64f52bffa57f2 ("tls: convert to generic sk_msg interface")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/159079360110.5745.7024009076049029819.stgit@john-Precision-5820-Tower
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
net/core/skmsg.c