summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRoi Dayan <roid@mellanox.com>2019-11-06 09:34:46 +0200
committerSimon Horman <simon.horman@netronome.com>2019-11-11 11:46:53 +0100
commitc0a1df2e3f209fbf3c61b66a719b90e41636ef52 (patch)
tree0c726724cdd75c837147228884605b29d5b67720 /include/linux
parent9ff24b9c9323652f9dc80ff7928148c4af12da9c (diff)
downloadopenvswitch-c0a1df2e3f209fbf3c61b66a719b90e41636ef52.tar.gz
compat: Add compat fix for old kernels
In kernels older than 4.8, struct tcf_t didn't have the firstuse. If openvswitch is compiled with the compat pkt_cls.h then there is a struct size mismatch between openvswitch and the kernel which cause parsing netlink actions to fail. After this commit parsing the netlink actions pass even if compiled with the compat pkt_cls.h. Signed-off-by: Roi Dayan <roid@mellanox.com> Signed-off-by: Simon Horman <simon.horman@netronome.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pkt_cls.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h
index 4adea59e7..2f7e328c4 100644
--- a/include/linux/pkt_cls.h
+++ b/include/linux/pkt_cls.h
@@ -64,7 +64,9 @@ struct tcf_t {
__u64 install;
__u64 lastuse;
__u64 expires;
+#ifdef HAVE_STRUCT_TCF_T_FIRSTUSE
__u64 firstuse;
+#endif
};
#define tc_gen \