summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/netronome/nfp/nfp_asm.h
diff options
context:
space:
mode:
authorJakub Kicinski2017-12-15 06:29:18 +0100
committerDaniel Borkmann2017-12-15 14:18:18 +0100
commit0d49eaf4db2ad18489ff1cfceba17006c1d17b7e (patch)
treedfa5b9c1859a1657d4f61838b165ba8786000bc7 /drivers/net/ethernet/netronome/nfp/nfp_asm.h
parentnfp: bpf: prepare for call support (diff)
downloadkernel-qcow2-linux-0d49eaf4db2ad18489ff1cfceba17006c1d17b7e.tar.gz
kernel-qcow2-linux-0d49eaf4db2ad18489ff1cfceba17006c1d17b7e.tar.xz
kernel-qcow2-linux-0d49eaf4db2ad18489ff1cfceba17006c1d17b7e.zip
nfp: bpf: add basic support for adjust head call
Support bpf_xdp_adjust_head(). We need to check whether the packet offset after adjustment is within datapath's limits. We also check if the frame is at least ETH_HLEN long (similar to the kernel implementation). Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/nfp_asm.h')
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfp_asm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_asm.h b/drivers/net/ethernet/netronome/nfp/nfp_asm.h
index 3387e6926eb0..a24daeab1a77 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_asm.h
+++ b/drivers/net/ethernet/netronome/nfp/nfp_asm.h
@@ -77,6 +77,7 @@
enum br_mask {
BR_BEQ = 0x00,
BR_BNE = 0x01,
+ BR_BMI = 0x02,
BR_BHS = 0x04,
BR_BLO = 0x05,
BR_BGE = 0x08,
@@ -175,6 +176,7 @@ enum alu_op {
ALU_OP_NONE = 0x00,
ALU_OP_ADD = 0x01,
ALU_OP_NOT = 0x04,
+ ALU_OP_ADD_2B = 0x05,
ALU_OP_AND = 0x08,
ALU_OP_SUB_C = 0x0d,
ALU_OP_ADD_C = 0x11,