]> git.baikalelectronics.ru Git - kernel.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)
commit656af6844ad692c40ab879f78395ef2d0ea5be61
tree3810344af53c82357478d72b6ab30bcb91a92b1f
parentb5371ce121a0f08669f1836ef07e1a5f6920adc4
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