[ovs-dev] [PATCH v2] ovn-northd: support IPAM with externally specified MAC

Lance Richardson lrichard at redhat.com
Thu Oct 6 20:59:32 UTC 2016

> From: "Ben Pfaff" <blp at ovn.org>
> To: "Lance Richardson" <lrichard at redhat.com>
> Cc: dev at openvswitch.org, russell at ovn.org
> Sent: Thursday, October 6, 2016 4:48:45 PM
> Subject: Re: [PATCH v2] ovn-northd: support IPAM with externally specified MAC
> On Thu, Oct 06, 2016 at 03:58:51PM -0400, Lance Richardson wrote:
> > The current IPAM implementation allocates both a MAC address and
> > an IPv4 address when dynamic address allocation is requested. This
> > patch adds the ability to specify a fixed MAC address for use with
> > dynamic IPv4 address allocation.
> > 
> > Example:
> >    ovn-nbctl lsp-set-addresses p1 "00:01:02:03:04:05 dynamic"
> > 
> > Acked-by: Ben Pfaff <blp at ovn.org>
> > Acked-by: Russell Bryant <russell at ovn.org>
> > Signed-off-by: Lance Richardson <lrichard at redhat.com>
> > ---
> > v2: - Simplified is_dynamic_lsp_address() using implementation by
> >       Ben Pfaff (with minor adjustment, removed a space from scan
> >       string).
> For what it's worth, the space had semantic meaning: it prevented a
> string with trailing white space from being rejected.  Maybe that is
> undesirable, so I didn't add it back in.

Oops, I had taken it to mean "one or more whitespace character", not
"zero or more" when things were initially not working after rebasing,
but that was before I realized that eth_addr_from_string() had changed,
and never revisited. Thanks for clarifying (I think it's OK to disallow
trailing whitespace here unless it's generally allowed in similar contexts).

> >     - Use ovs_scan() to extract static MAC in ipam_alloc_addresses()
> >       instead of eth_addr_from_string() since the latter function
> >       no longer allows trailing characters.
> Thanks, I added a NEWS item and applied this.

More information about the dev mailing list