aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/datapath.h
diff options
context:
space:
mode:
authorJoe Stringer <[email protected]>2015-08-26 18:31:45 +0000
committerDavid S. Miller <[email protected]>2015-08-27 18:40:42 +0000
commitbe26b9a88fcee570796c67701f50800039e25aec (patch)
tree4378b79e91b6bc0511217dbe8958ba70bfbac569 /net/openvswitch/datapath.h
parentopenvswitch: Serialize acts with original netlink len (diff)
downloadkernel-be26b9a88fcee570796c67701f50800039e25aec.tar.gz
kernel-be26b9a88fcee570796c67701f50800039e25aec.zip
openvswitch: Move MASKED* macros to datapath.h
This will allow the ovs-conntrack code to reuse these macros. Signed-off-by: Joe Stringer <[email protected]> Acked-by: Thomas Graf <[email protected]> Acked-by: Pravin B Shelar <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/openvswitch/datapath.h')
-rw-r--r--net/openvswitch/datapath.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h
index 6b28c5cedb23..487a85f7d967 100644
--- a/net/openvswitch/datapath.h
+++ b/net/openvswitch/datapath.h
@@ -200,6 +200,10 @@ void ovs_dp_notify_wq(struct work_struct *work);
int action_fifos_init(void);
void action_fifos_exit(void);
+/* 'KEY' must not have any bits set outside of the 'MASK' */
+#define OVS_MASKED(OLD, KEY, MASK) ((KEY) | ((OLD) & ~(MASK)))
+#define OVS_SET_MASKED(OLD, KEY, MASK) ((OLD) = OVS_MASKED(OLD, KEY, MASK))
+
#define OVS_NLERR(logging_allowed, fmt, ...) \
do { \
if (logging_allowed && net_ratelimit()) \