aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorJiong Wang <[email protected]>2018-07-06 15:13:22 -0700
committerDaniel Borkmann <[email protected]>2018-07-07 01:45:31 +0200
commit2a952b03d1a011e2e7ddc9ca59cbb21df7dc3525 (patch)
tree65fec3490f3538a15d1f35a89a806aec9cbe495b /tools/perf/scripts/python/export-to-postgresql.py
parentd3d23fdb4688de4421e94227c95b1d54b233f432 (diff)
nfp: bpf: support u32 divide using reciprocal_div.h
NFP doesn't have integer divide instruction, this patch use reciprocal algorithm (the basic one, reciprocal_div) to emulate it. For each u32 divide, we would need 11 instructions to finish the operation. 7 (for multiplication) + 4 (various ALUs) = 11 Given NFP only supports multiplication no bigger than u32, we'd require divisor and dividend no bigger than that as well. Also eBPF doesn't support signed divide and has enforced this on C language level by failing compilation. However LLVM assembler hasn't enforced this, so it is possible for negative constant to leak in as a BPF_K operand through assembly code, we reject such cases as well. Signed-off-by: Jiong Wang <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Acked-by: Song Liu <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions