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

Ben Pfaff blp at ovn.org
Mon Oct 3 20:24:22 UTC 2016


On Mon, Oct 03, 2016 at 04:13:15PM -0400, Russell Bryant wrote:
> On Thu, Sep 22, 2016 at 10:16 AM, Lance Richardson <lrichard at redhat.com>
> 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"
> >
> > Signed-off-by: Lance Richardson <lrichard at redhat.com>
> >
> 
> Acked-by: Russell Bryant <russell at ovn.org>
> 
> This looks good to me.  It's probably worth adding a line to NEWS to
> document the improvement.  We could just do that before pushing it, though.
> 
> Ben, I believe you reviewed the original IPAM support.  Do you want to
> review this?

Seems OK to me.

Acked-by: Ben Pfaff <blp at ovn.org>

is_dynamic_lsp_address() can be dramatically simplified to just:

bool
is_dynamic_lsp_address(const char *address)
{
    struct eth_addr ea;
    int n;
    return (!strcmp(address, "dynamic")
            || (ovs_scan(address, ETH_ADDR_SCAN_FMT" dynamic %n",
                         ETH_ADDR_SCAN_ARGS(ea), &n) && address[n] == '\0'));
}



More information about the dev mailing list