[ovs-dev] [PATCH] ovn: Fix ct_state bit mappings in OVN symtab.

Russell Bryant russell at ovn.org
Tue Dec 8 22:34:40 UTC 2015


The OVN symbol table contained outdated mappings between connection
states and the corresponding bit in the ct_state field.  This patch
updates the symbol table with the proper values as defined in
lib/packets.h.

Signed-off-by: Russell Bryant <russell at ovn.org>
---
 ovn/controller/lflow.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ovn/controller/lflow.c b/ovn/controller/lflow.c
index 38c72c1..764a147 100644
--- a/ovn/controller/lflow.c
+++ b/ovn/controller/lflow.c
@@ -58,14 +58,14 @@ symtab_init(void)
     MFF_LOG_REGS;
 #undef MFF_LOG_REG
 
-    /* Connection tracking state. */
+    /* Connection tracking state. See CS_* in lib/packets.h. */
     expr_symtab_add_field(&symtab, "ct_state", MFF_CT_STATE, NULL, false);
-    expr_symtab_add_predicate(&symtab, "ct.trk", "ct_state[7]");
+    expr_symtab_add_predicate(&symtab, "ct.trk", "ct_state[5]");
     expr_symtab_add_subfield(&symtab, "ct.new", "ct.trk", "ct_state[0]");
     expr_symtab_add_subfield(&symtab, "ct.est", "ct.trk", "ct_state[1]");
     expr_symtab_add_subfield(&symtab, "ct.rel", "ct.trk", "ct_state[2]");
-    expr_symtab_add_subfield(&symtab, "ct.inv", "ct.trk", "ct_state[5]");
-    expr_symtab_add_subfield(&symtab, "ct.rpl", "ct.trk", "ct_state[6]");
+    expr_symtab_add_subfield(&symtab, "ct.rpl", "ct.trk", "ct_state[3]");
+    expr_symtab_add_subfield(&symtab, "ct.inv", "ct.trk", "ct_state[4]");
 
     /* Data fields. */
     expr_symtab_add_field(&symtab, "eth.src", MFF_ETH_SRC, NULL, false);
-- 
2.5.0




More information about the dev mailing list