]> asedeno.scripts.mit.edu Git - linux.git/commit
nfp: bpf: rewrite map pointers with NFP TIDs
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 4 May 2018 01:37:13 +0000 (18:37 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 4 May 2018 21:41:03 +0000 (23:41 +0200)
commitb4264c96b5cbc00c4c07deb9fbab928d43dffcf9
tree3810344af53c82357478d72b6ab30bcb91a92b1f
parent9816dd35ececc095f3e3be29d30d3adc755908d9
nfp: bpf: rewrite map pointers with NFP TIDs

Kernel will now replace map fds with actual pointer before
calling the offload prepare.  We can identify those pointers
and replace them with NFP table IDs instead of loading the
table ID in code generated for CALL instruction.

This allows us to support having the same CALL being used with
different maps.

Since we don't want to change the FW ABI we still need to
move the TID from R1 to portion of R0 before the jump.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jiong Wang <jiong.wang@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
drivers/net/ethernet/netronome/nfp/bpf/jit.c
drivers/net/ethernet/netronome/nfp/bpf/verifier.c