Re: [ovs-dev] [PATCH] ovn-northd: Avoid duplicate logical flows in SB db

2018-01-09 Thread Ben Pfaff
On Tue, Jan 09, 2018 at 12:12:14PM +0100, Daniel Alvarez Sanchez wrote: > Thanks Ben, Han, Miguel. > > > On Tue, Jan 9, 2018 at 11:59 AM, Miguel Angel Ajo Pelayo < > majop...@redhat.com> wrote: > > > You're probably right, it's probably not worth increasing the complexity > > of ovn-northd when

Re: [ovs-dev] [PATCH] ovn-northd: Avoid duplicate logical flows in SB db

2018-01-09 Thread Han Zhou
On Tue, Jan 9, 2018 at 3:12 AM, Daniel Alvarez Sanchez wrote: > > Thanks Ben, Han, Miguel. > > > On Tue, Jan 9, 2018 at 11:59 AM, Miguel Angel Ajo Pelayo < > majop...@redhat.com> wrote: > > > You're probably right, it's probably not worth increasing the complexity > > of

Re: [ovs-dev] [PATCH] ovn-northd: Avoid duplicate logical flows in SB db

2018-01-09 Thread Daniel Alvarez Sanchez
Thanks Ben, Han, Miguel. On Tue, Jan 9, 2018 at 11:59 AM, Miguel Angel Ajo Pelayo < majop...@redhat.com> wrote: > You're probably right, it's probably not worth increasing the complexity > of ovn-northd when we can check this in the low level, and suppress > the final OpenFlow duplicates, the

Re: [ovs-dev] [PATCH] ovn-northd: Avoid duplicate logical flows in SB db

2018-01-08 Thread Ben Pfaff
Let's step back and consider the options. Duplicate flow matches can happen, either because of bugs at any given level of the code, or because of user-provided data that can't practically be validated before it is passed down to the next level. Consider just the ovn-northd level. ovn-northd can

Re: [ovs-dev] [PATCH] ovn-northd: Avoid duplicate logical flows in SB db

2018-01-08 Thread Han Zhou
If both ACLs have same priority, match, ..., but different actions, it is a misconfiguration in NB. What could northd do here besides raising an error log? Another point, would this type of check increase the difficulty of probably future incremental-processing in northd? >From my point of view,

Re: [ovs-dev] [PATCH] ovn-northd: Avoid duplicate logical flows in SB db

2018-01-08 Thread Miguel Angel Ajo Pelayo
Right! We didn't hit that issue, but it'd make sense to fix in this patch I guess. We could modify the hashing function to not include the action (not sure if it does now..), and also have a separate search function that ignores the action. On Mon, Jan 8, 2018 at 5:39 PM Ben Pfaff

Re: [ovs-dev] [PATCH] ovn-northd: Avoid duplicate logical flows in SB db

2018-01-08 Thread Ben Pfaff
I suspect that this doesn't go far enough, because it includes actions in the hash, so that it would fail to deduplicate two identical ACLs with different actions (e.g. "drop" versus "allow"). On Fri, Jan 05, 2018 at 10:43:16AM +, Daniel Alvarez wrote: > When there are two ACLs in a Logical

Re: [ovs-dev] [PATCH] ovn-northd: Avoid duplicate logical flows in SB db

2018-01-08 Thread Miguel Angel Ajo Pelayo
Acked-By: Miguel Angel Ajo On Fri, Jan 5, 2018 at 11:44 AM Daniel Alvarez wrote: > When there are two ACLs in a Logical Switch with same direction, > priority, match and action fields, ovn-northd will generate the > exact same logical flow for them

[ovs-dev] [PATCH] ovn-northd: Avoid duplicate logical flows in SB db

2018-01-05 Thread Daniel Alvarez
When there are two ACLs in a Logical Switch with same direction, priority, match and action fields, ovn-northd will generate the exact same logical flow for them into SB database. This will make ovn-controller log messages (INFO) saying that the duplicate flow is going to be dropped. This patch