[ovs-dev] [PATCH v3] ovn-controller: Fix parsing of OVN tunnel IDs

Dumitru Ceara dceara at redhat.com
Wed Jun 12 16:01:49 UTC 2019


On Wed, Jun 12, 2019 at 5:47 PM Ben Pfaff <blp at ovn.org> wrote:
>
> On Wed, Jun 12, 2019 at 10:05:36AM +0200, Dumitru Ceara wrote:
> > On Tue, Jun 11, 2019 at 12:08 PM Dumitru Ceara <dceara at redhat.com> wrote:
> > >
> > > On Fri, Jun 7, 2019 at 6:42 PM Ben Pfaff <blp at ovn.org> wrote:
> > > >
> > > > On Mon, May 27, 2019 at 10:55:52AM +0200, Dumitru Ceara wrote:
> > > > > Encap tunnel-ids are of the form:
> > > > > <chassis-id><OVN_MVTEP_CHASSISID_DELIM><encap-ip>.
> > > > > In physical_run we were checking if a tunnel-id corresponds
> > > > > to the local chassis-id by searching if the chassis-id string
> > > > > is included in the tunnel-id (strstr). This can break quite
> > > > > easily, for example, if the local chassis-id is a substring
> > > > > of a remote chassis-id. In that case we were wrongfully
> > > > > skipping the tunnel creation.
> > > > >
> > > > > To fix that new tunnel-id creation and parsing functions are added in
> > > > > encaps.[ch]. These functions are now used everywhere where applicable.
> > > > >
> > > > > Acked-by: Venu Iyer <iyervl at ymail.com>
> > > > > Reported-at: https://bugzilla.redhat.com/1708131
> > > > > Reported-by: Haidong Li <haili at redhat.com>
> > > > > Fixes: b520ca7 ("Support for multiple VTEP in OVN")
> > > > > Signed-off-by: Dumitru Ceara <dceara at redhat.com>
> > > > > ---
> > > > >
> > > > > v3: Rebase
> > > > > v2: Update commit message
> > > >
> > > > This seems about right.
> > > >
> > > > Here's an incremental with some suggestions for encaps_tunnel_id_parse()
> > > > and encaps_tunnel_id_match().  I'm pretty happy with the
> > > > encaps_tunnel_id_parse() change; the encaps_tunnel_id_match() one might
> > > > be going over the top.
> > > >
> > > > Let me know what you think.
> > >
> > > Thanks for the suggestions.
> > > I like the new encaps_tunnel_id_parse() as it's more succinct and even
> > > though encaps_tunnel_id_match() might be going a bit over the top it's
> > > the most efficient way to do it indeed.
> > >
> > > Thanks,
> > > Dumitru
> >
> > Hi Ben,
> >
> > Shall I send a v4 incorporating your suggestions or will you directly
> > apply your incremental patch with the changes on top of mine?
>
> If you like the changes, or some of them, you can send a v4
> incorporating them.  If you don't like them, let me know and I'll look
> at v3 again.

Done, just sent a v4:
https://patchwork.ozlabs.org/patch/1114661/

Thanks,
Dumitru


More information about the dev mailing list