diff options
author | Joe Stringer <joestringer@nicira.com> | 2015-08-26 14:31:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-27 14:40:42 -0400 |
commit | be26b9a88fcee570796c67701f50800039e25aec (patch) | |
tree | 4378b79e91b6bc0511217dbe8958ba70bfbac569 /net/openvswitch/datapath.h | |
parent | 8e2fed1c0cfbb29995a4301060acc0ef4ee84420 (diff) |
openvswitch: Move MASKED* macros to datapath.h
This will allow the ovs-conntrack code to reuse these macros.
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/datapath.h')
-rw-r--r-- | net/openvswitch/datapath.h | 4 |
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); | |||
200 | int action_fifos_init(void); | 200 | int action_fifos_init(void); |
201 | void action_fifos_exit(void); | 201 | void action_fifos_exit(void); |
202 | 202 | ||
203 | /* 'KEY' must not have any bits set outside of the 'MASK' */ | ||
204 | #define OVS_MASKED(OLD, KEY, MASK) ((KEY) | ((OLD) & ~(MASK))) | ||
205 | #define OVS_SET_MASKED(OLD, KEY, MASK) ((OLD) = OVS_MASKED(OLD, KEY, MASK)) | ||
206 | |||
203 | #define OVS_NLERR(logging_allowed, fmt, ...) \ | 207 | #define OVS_NLERR(logging_allowed, fmt, ...) \ |
204 | do { \ | 208 | do { \ |
205 | if (logging_allowed && net_ratelimit()) \ | 209 | if (logging_allowed && net_ratelimit()) \ |