bpf: Expand map key argument of bpf_redirect_map to u64
authorToke Høiland-Jørgensen <toke@redhat.com>
Tue, 8 Nov 2022 14:06:00 +0000 (15:06 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 15 Nov 2022 17:00:27 +0000 (09:00 -0800)
commit32637e33003f36e75e9147788cc0e2f21706ef99
tree09e56a8e4d56b66a1ccc4c0b357b6da65ff1ab5d
parent14d898f3c1b3bf9c4375ee3255ec9e9b89a35578
bpf: Expand map key argument of bpf_redirect_map to u64

For queueing packets in XDP we want to add a new redirect map type with
support for 64-bit indexes. To prepare fore this, expand the width of the
'key' argument to the bpf_redirect_map() helper. Since BPF registers are
always 64-bit, this should be safe to do after the fact.

Acked-by: Song Liu <song@kernel.org>
Reviewed-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/r/20221108140601.149971-3-toke@redhat.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf.h
include/linux/filter.h
include/uapi/linux/bpf.h
kernel/bpf/cpumap.c
kernel/bpf/devmap.c
kernel/bpf/verifier.c
net/core/filter.c
net/xdp/xskmap.c