]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, selftests: Adapt cls_redirect to call csum_level helper
authorDaniel Borkmann <daniel@iogearbox.net>
Tue, 2 Jun 2020 14:58:34 +0000 (16:58 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 2 Jun 2020 18:50:23 +0000 (11:50 -0700)
commit46537cc956b5e92f804ab8b101592e3f13b56d3b
tree47088e7997d1baf81e988db64874164ff5bbe234
parent712b218eabbe4b20124a3f0a27dff4a902656e93
bpf, selftests: Adapt cls_redirect to call csum_level helper

Adapt bpf_skb_adjust_room() to pass in BPF_F_ADJ_ROOM_NO_CSUM_RESET flag and
use the new bpf_csum_level() helper to inc/dec the checksum level by one after
the encap/decap.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Lorenz Bauer <lmb@cloudflare.com>
Link: https://lore.kernel.org/bpf/e7458f10e3f3d795307cbc5ad870112671d9c6f7.1591108731.git.daniel@iogearbox.net
tools/testing/selftests/bpf/progs/test_cls_redirect.c