]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Allow the new syncookie helpers to work with SKBs
authorMaxim Mikityanskiy <maximmi@nvidia.com>
Wed, 15 Jun 2022 13:48:46 +0000 (16:48 +0300)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 17 Jun 2022 04:20:30 +0000 (21:20 -0700)
commit81167dbb5339978bda070040e9e65429d79de583
tree77f8cf9d5a7a4aaa82b255f3e199b1760b7d181e
parentb5eb6fb52e7dc55d7988e16d4c8763a83f57d50a
bpf: Allow the new syncookie helpers to work with SKBs

This commit allows the new BPF helpers to work in SKB context (in TC
BPF programs): bpf_tcp_raw_{gen,check}_syncookie_ipv{4,6}.

Using these helpers in TC BPF programs is not recommended, because it's
unlikely that the BPF program will provide any substantional speedup
compared to regular SYN cookies or synproxy, after the SKB is already
created.

Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://lore.kernel.org/r/20220615134847.3753567-6-maximmi@nvidia.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
net/core/filter.c