]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: bpf: read from packet data cache for PTR_TO_PACKET
authorJiong Wang <jiong.wang@netronome.com>
Thu, 29 Mar 2018 00:48:25 +0000 (17:48 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 29 Mar 2018 02:36:12 +0000 (19:36 -0700)
commit1123cebc540d7bfa1702f6682fc117ec822199c5
tree30e4964b10004950731a37c8f8ff3dd550bec108
parentcbc96134be2565f8e9f6ff255901703350bbc3af
nfp: bpf: read from packet data cache for PTR_TO_PACKET

This patch assumes there is a packet data cache, and would try to read
packet data from the cache instead of from memory.

This patch only implements the optimisation "backend", it doesn't build
the packet data cache, so this optimisation is not enabled.

This patch has only enabled aligned packet data read, i.e. when the read
offset to the start of cache is REG_WIDTH aligned.

Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
drivers/net/ethernet/netronome/nfp/bpf/jit.c
drivers/net/ethernet/netronome/nfp/bpf/main.h
drivers/net/ethernet/netronome/nfp/nfp_asm.h