[ovs-dev] [ovn-controller-vtep V6 6/7] ovn-controller-vtep: Extend vtep module to install Ucast_Macs_Remote.

Alex Wang alexw at nicira.com
Mon Aug 17 16:06:03 UTC 2015


On Mon, Aug 17, 2015 at 6:37 AM, Russell Bryant <rbryant at redhat.com> wrote:

> On 08/16/2015 07:24 PM, Alex Wang wrote:
> >
> >
> > On Sun, Aug 16, 2015 at 3:26 PM, Russell Bryant <rbryant at redhat.com
> > <mailto:rbryant at redhat.com>> wrote:
> >
> >     On 08/09/2015 10:50 PM, Alex Wang wrote:
> >     > +        tnl_key = port_binding_rec->datapath->tunnel_key;
> >     > +        HMAP_FOR_EACH_WITH_HASH (ls_node, hmap_node,
> >     > +                                 hash_uint64((uint64_t) tnl_key),
> >     > +                                 &ls_map) {
> >     > +            if (ls_node->vtep_ls->tunnel_key[0] == tnl_key) {
> >     > +                break;
> >     > +            }
> >     > +        }
> >     > +        /* If 'ls_node' is NULL, that means no vtep logical
> switch is
> >     > +         * attached to the corresponding ovn logical datapath, so
> pass. */
> >     > +        if (!ls_node) {
> >     > +            continue;
> >     > +        }
> >
> >     I don't think ls_node is guaranteed to be NULL here, even when the
> loop
> >     ends normally (without a break).
> >
> >
> > Could you explain more about this concern?  From the comments in
> > lib/hmap.h, this looks okay to me.
>
> Ah, you're right.  It's fine since hmap_node is the first member in the
> struct.  Thanks.
>
> It might be worth a comment in your struct definition saying that
> hmap_node must remain the first struct member.
>
>
Yeah, I really should do that!  Thx,





> --
> Russell Bryant
>



More information about the dev mailing list