]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: bpf: allow control message sizing for map ops
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 2 Oct 2018 01:30:34 +0000 (18:30 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 2 Oct 2018 12:39:59 +0000 (14:39 +0200)
commitb4cc9ec643b551f8cb792b67742c2a381a9d12c2
treecf6d33223aaf040bbca061a7b37ca2e0469811ea
parente56a1707a0a8632f74742018885b18d02dbc9442
nfp: bpf: allow control message sizing for map ops

In current ABI the size of the messages carrying map elements was
statically defined to at most 16 words of key and 16 words of value
(NFP word is 4 bytes).  We should not make this assumption and use
the max key and value sizes from the BPF capability instead.

To make sure old kernels don't get surprised with larger (or smaller)
messages bump the FW ABI version to 3 when key/value size is different
than 16 words.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
drivers/net/ethernet/netronome/nfp/bpf/cmsg.c
drivers/net/ethernet/netronome/nfp/bpf/fw.h
drivers/net/ethernet/netronome/nfp/bpf/main.c
drivers/net/ethernet/netronome/nfp/bpf/main.h
drivers/net/ethernet/netronome/nfp/nfp_net_ctrl.h