eal: fix 32-bit structure marker
[dpdk.git] / lib / librte_bpf / bpf_def.h
index 6b69de3..d399929 100644 (file)
@@ -120,6 +120,14 @@ enum {
        EBPF_REG_NUM,
 };
 
+/*
+ * When EBPF_CALL instruction has src_reg == EBPF_PSEUDO_CALL,
+ * it should be treated as pseudo-call instruction, where
+ * imm value contains pc-relative offset to another EBPF function.
+ * Right now DPDK EBPF library doesn't support it.
+ */
+#define        EBPF_PSEUDO_CALL        EBPF_REG_1
+
 /*
  * eBPF instruction format
  */
@@ -131,6 +139,11 @@ struct ebpf_insn {
        int32_t imm;
 };
 
+/*
+ * eBPF allows functions with R1-R5 as arguments.
+ */
+#define        EBPF_FUNC_MAX_ARGS      (EBPF_REG_6 - EBPF_REG_1)
+
 #ifdef __cplusplus
 }
 #endif