On 01/27/2016 02:34 AM, Han Zhou wrote: > > > On Mon, Jan 25, 2016 at 2:02 PM, Russell Bryant <russ...@ovn.org > <mailto:russ...@ovn.org>> wrote: >> >> Previously, all ct() actions applied to localnet ports used the default >> conntrack zone. We should allocate a ct zone ID for all localnet ports >> just like we do for all local VIFs so that none of our connection >> tracking interferes with any base system connection tracking in the >> default zone. >> >> Signed-off-by: Russell Bryant <russ...@ovn.org <mailto:russ...@ovn.org>> >> --- >> ovn/controller/binding.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/ovn/controller/binding.c b/ovn/controller/binding.c >> index c9649eb..ce9cccf 100644 >> --- a/ovn/controller/binding.c >> +++ b/ovn/controller/binding.c >> @@ -189,6 +189,13 @@ binding_run(struct controller_ctx *ctx, const > struct ovsrec_bridge *br_int, >> sbrec_port_binding_set_chassis(binding_rec, chassis_rec); >> } else if (binding_rec->chassis == chassis_rec) { >> sbrec_port_binding_set_chassis(binding_rec, NULL); >> + } else if (!binding_rec->chassis >> + && !strcmp(binding_rec->type, "localnet")) { >> + /* localnet ports will never be bound to a chassis, but > we want >> + * to list them in all_lports because we want to allocate >> + * a conntrack zone ID for each one, as we'll be creating >> + * a patch port for each one. */ >> + sset_add(&all_lports, binding_rec->logical_port); > > Shall we add it ONLY IF it is on a local datapath (which means it is > realized as a patch port on current chassis)?
The same loop is building up the set of local datapaths. To use that we'd have to loop through all port bindings again, which seems more harmful overall, I think. -- Russell Bryant _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev