diff options
author | Jiong Wang <jiong.wang@netronome.com> | 2018-03-29 02:48:25 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-03-29 04:36:12 +0200 |
commit | be75923786aa28774bf2b5ef8184590a52429103 (patch) | |
tree | 30e4964b10004950731a37c8f8ff3dd550bec108 /drivers/net/ethernet/netronome/nfp/nfp_asm.h | |
parent | Merge branch 'bpf-raw-tracepoints' (diff) | |
download | linux-be75923786aa28774bf2b5ef8184590a52429103.tar.xz linux-be75923786aa28774bf2b5ef8184590a52429103.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_asm.h')
-rw-r--r-- | drivers/net/ethernet/netronome/nfp/nfp_asm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_asm.h b/drivers/net/ethernet/netronome/nfp/nfp_asm.h index 5f9291db98e0..150d28f9cd52 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_asm.h +++ b/drivers/net/ethernet/netronome/nfp/nfp_asm.h @@ -39,6 +39,7 @@ #include <linux/types.h> #define REG_NONE 0 +#define REG_WIDTH 4 #define RE_REG_NO_DST 0x020 #define RE_REG_IMM 0x020 |