summaryrefslogtreecommitdiff
path: root/include/support
diff options
context:
space:
mode:
author杨威 <[email protected]>2022-07-28 20:43:58 +0800
committer杨威 <[email protected]>2022-08-09 14:35:01 +0800
commit8e0b36e1752b73ead2c01732f135be525f2e8487 (patch)
tree16d0745ae7e62375ba3ecaa1f043e740e15b83dc /include/support
parent599f10684cfb7f26a2bb90364eab9ee4832f577e (diff)
🦄 refactor(tuple4 hash): 增加编译选项,支持rte_crc_hash, 默认为jhash,优化v6地址冲突的问题
Diffstat (limited to 'include/support')
-rw-r--r--include/support/pcap/bpf.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/support/pcap/bpf.h b/include/support/pcap/bpf.h
index d1a7281..752ee09 100644
--- a/include/support/pcap/bpf.h
+++ b/include/support/pcap/bpf.h
@@ -1319,8 +1319,14 @@ struct bpf_insn {
/*
* Macros for insn array initializers.
*/
+#ifndef BPF_STMT
#define BPF_STMT(code, k) { (u_short)(code), 0, 0, k }
+#endif
+
+
+#ifndef BPF_JUMP
#define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k }
+#endif
#if __STDC__ || defined(__cplusplus)
extern int bpf_validate(const struct bpf_insn *, int);