netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: mahesh@bandewar.net
Cc: netdev@vger.kernel.org, maheshb@google.com, edumazet@google.com,
	davem@davemloft.org
Subject: Re: [PATCH next v2] ipvlan: improvise dev_id generation logic in IPvlan
Date: Tue, 10 Jan 2017 20:47:41 -0500 (EST)	[thread overview]
Message-ID: <20170110.204741.1506942846730150633.davem@davemloft.net> (raw)
In-Reply-To: <20170109230554.38328-1-mahesh@bandewar.net>

From: Mahesh Bandewar <mahesh@bandewar.net>
Date: Mon,  9 Jan 2017 15:05:54 -0800

> From: Mahesh Bandewar <maheshb@google.com>
> 
> The patch 009146d117b ("ipvlan: assign unique dev-id for each slave
> device.") used ida_simple_get() to generate dev_ids assigned to the
> slave devices. However (Eric has pointed out that) there is a shortcoming
> with that approach as it always uses the first available ID. This
> becomes a problem when a slave gets deleted and a new slave gets added.
> The ID gets reassigned causing the new slave to get the same link-local
> address. This side-effect is undesirable.
> 
> This patch adds a per-port variable that keeps track of the IDs
> assigned and used as the stat-base for the IDR api. This base will be
> wrapped around when it reaches the MAX (0xFFFE) value possibly on a
> busy system where slaves are added and deleted routinely.
> 
> Fixes: 009146d117b ("ipvlan: assign unique dev-id for each slave device.")
> Signed-off-by: Mahesh Bandewar <maheshb@google.com>
> CC: Eric Dumazet <edumazet@google.com>
> CC: David Miller <davem@davemloft.org>
> ---
> v1 -> v2
>   Implemented Dave's comments and reinstated IDR API.

Applied, thanks.

      reply	other threads:[~2017-01-11  1:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09 23:05 [PATCH next v2] ipvlan: improvise dev_id generation logic in IPvlan Mahesh Bandewar
2017-01-11  1:47 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170110.204741.1506942846730150633.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=davem@davemloft.org \
    --cc=edumazet@google.com \
    --cc=mahesh@bandewar.net \
    --cc=maheshb@google.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).