[ovs-dev] [PATCH v2] ovn-northd: support IPAM with externally specified MAC
blp at ovn.org
Thu Oct 6 21:01:59 UTC 2016
On Thu, Oct 06, 2016 at 04:59:32PM -0400, Lance Richardson wrote:
> > 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).
scanf() is weird (and ovs_scan() inherits most of the weirdness).
Maybe we should use the OVN lexer instead. It's more sensible.
More information about the dev