summaryrefslogtreecommitdiff
path: root/include/sparse
diff options
context:
space:
mode:
Diffstat (limited to 'include/sparse')
-rw-r--r--include/sparse/automake.mk3
-rw-r--r--include/sparse/linux/tc_act/tc_pedit.h29
2 files changed, 31 insertions, 1 deletions
diff --git a/include/sparse/automake.mk b/include/sparse/automake.mk
index 985ee6a2f..4c7b17783 100644
--- a/include/sparse/automake.mk
+++ b/include/sparse/automake.mk
@@ -26,4 +26,5 @@ noinst_HEADERS += \
include/sparse/sys/sysmacros.h \
include/sparse/sys/types.h \
include/sparse/sys/wait.h \
- include/sparse/threads.h
+ include/sparse/threads.h \
+ include/sparse/linux/tc_act/tc_pedit.h
diff --git a/include/sparse/linux/tc_act/tc_pedit.h b/include/sparse/linux/tc_act/tc_pedit.h
new file mode 100644
index 000000000..ca5c1f1fe
--- /dev/null
+++ b/include/sparse/linux/tc_act/tc_pedit.h
@@ -0,0 +1,29 @@
+#ifndef FIX_LINUX_TC_PEDIT_H
+#define FIX_LINUX_TC_PEDIT_H
+
+#ifndef __CHECKER__
+#error "Use this header only with sparse. It is not a correct implementation."
+#endif
+
+#include_next <linux/tc_act/tc_pedit.h>
+
+/* Fixes endianness of 'mask' and 'val' members. */
+#define tc_pedit_key rpl_tc_pedit_key
+struct rpl_tc_pedit_key {
+ ovs_be32 mask; /* AND */
+ ovs_be32 val; /* XOR */
+ __u32 off; /* offset */
+ __u32 at;
+ __u32 offmask;
+ __u32 shift;
+};
+
+#define tc_pedit_sel rpl_tc_pedit_sel
+struct rpl_tc_pedit_sel {
+ tc_gen;
+ unsigned char nkeys;
+ unsigned char flags;
+ struct tc_pedit_key keys[0];
+};
+
+#endif