diff options
author | Jiong Wang <jiong.wang@netronome.com> | 2017-11-30 21:32:50 -0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2017-12-01 20:59:19 +0100 |
commit | 5b674140addc3c863efa227946ad7328f016a7a3 (patch) | |
tree | 5dbc16895a3d7323e13004d6537889e222e8b935 /arch | |
parent | 854dc87d1a7be1f11b2d079a80a822742d6e560e (diff) |
nfp: bpf: record jump destination to simplify jump fixup
eBPF insns are internally organized as dual-list inside NFP offload JIT.
Random access to an insn needs to be done by either forward or backward
traversal along the list.
One place we need to do such traversal is at nfp_fixup_branches where one
traversal is needed for each jump insn to find the destination. Such
traversals could be avoided if jump destinations are collected through a
single travesal in a pre-scan pass, and such information could also be
useful in other places where jump destination info are needed.
This patch adds such jump destination collection in nfp_prog_prepare.
Suggested-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions