summaryrefslogtreecommitdiff
path: root/lib/ct-dpif.h
diff options
context:
space:
mode:
authorPaolo Valerio <pvalerio@redhat.com>2022-10-12 16:36:13 +0200
committerIlya Maximets <i.maximets@ovn.org>2022-10-25 23:29:14 +0200
commit9c27bd230f7f108974157d858e71b3eda2139d08 (patch)
treea835dc3e8e93b23bfb1eae36055c2ae3ec46322f /lib/ct-dpif.h
parentf7ae3f93c8511962c0198984004b7c10eb574c9c (diff)
downloadopenvswitch-9c27bd230f7f108974157d858e71b3eda2139d08.tar.gz
ct-dpif: Replace ct_dpif_format_flags() with format_flags_masked().
This patch removes ct_dpif_format_flags() in favor of the existing format_flags_masked(). This has the extra bonus of showing keys with empty values as "key=0", instead of showing "key=". E.g., the following: NEW tcp,orig=([...]),reply=([...]),id=1800618864, status=CONFIRMED|SRC_NAT_DONE|DST_NAT_DONE,timeout=120, protoinfo=(state_orig=SYN_SENT,state_reply=SYN_SENT,wscale_orig=7, wscale_reply=0,flags_orig=WINDOW_SCALE|SACK_PERM,flags_reply=) becomes: NEW tcp,orig=([...]),reply=([...]),id=1800618864, status=CONFIRMED|SRC_NAT_DONE|DST_NAT_DONE,timeout=120, protoinfo=(state_orig=SYN_SENT,state_reply=SYN_SENT,wscale_orig=7, wscale_reply=0,flags_orig=WINDOW_SCALE|SACK_PERM,flags_reply=0) Signed-off-by: Paolo Valerio <pvalerio@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'lib/ct-dpif.h')
-rw-r--r--lib/ct-dpif.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ct-dpif.h b/lib/ct-dpif.h
index b59cba962..2848549b0 100644
--- a/lib/ct-dpif.h
+++ b/lib/ct-dpif.h
@@ -103,6 +103,8 @@ enum ct_dpif_tcp_flags {
#undef CT_DPIF_TCP_FLAG
};
+#define CT_DPIF_TCPF_MASK ((CT_DPIF_TCPF_MAXACK_SET << 1) - 1)
+
extern const char *ct_dpif_sctp_state_string[];
#define CT_DPIF_SCTP_STATES \
@@ -173,6 +175,8 @@ enum ct_dpif_status_flags {
#undef CT_DPIF_STATUS_FLAG
};
+#define CT_DPIF_STATUS_MASK ((CT_DPIF_STATUS_UNTRACKED << 1) - 1)
+
struct ct_dpif_entry {
/* Const members. */
struct ct_dpif_tuple tuple_orig;