Message ID | 1449614080-25705-1-git-send-email-russell@ovn.org |
---|---|
State | Superseded |
Headers | show |
On 8 December 2015 at 14:34, Russell Bryant <russell@ovn.org> wrote: > 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@ovn.org> Thanks for figuring this out! Is there a way for these to use the correct constants from OVS? Maybe they're not exported in an appropriate header right now.. Fixes: 63bc9fb1c69f ("packets: Reorder CS_* flags to remove gap.") Acked-by: Joe Stringer <joe@ovn.org>
On 12/08/2015 06:20 PM, Joe Stringer wrote: > On 8 December 2015 at 14:34, Russell Bryant <russell@ovn.org> wrote: >> 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@ovn.org> > > Thanks for figuring this out! > > Is there a way for these to use the correct constants from OVS? Maybe > they're not exported in an appropriate header right now.. I guess I was assuming they weren't going to change again. :-) I'll look at another patch for this. > Fixes: 63bc9fb1c69f ("packets: Reorder CS_* flags to remove gap.") > Acked-by: Joe Stringer <joe@ovn.org> Thanks! I applied this patch to master and branch-2.5.
On 9 December 2015 at 08:19, Russell Bryant <russell@ovn.org> wrote: > On 12/08/2015 06:20 PM, Joe Stringer wrote: >> On 8 December 2015 at 14:34, Russell Bryant <russell@ovn.org> wrote: >>> 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@ovn.org> >> >> Thanks for figuring this out! >> >> Is there a way for these to use the correct constants from OVS? Maybe >> they're not exported in an appropriate header right now.. > > I guess I was assuming they weren't going to change again. :-) I thought that before they changed recently ;) It's more a matter of style and greppability.
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);
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@ovn.org> --- ovn/controller/lflow.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)