netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mahesh Bandewar <maheshb@google.com>
To: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: linux-netdev <netdev@vger.kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jiri Benc <jbenc@redhat.com>
Subject: Re: [PATCH v2 4/5] ipvlan: protect addresses with internal spinlock
Date: Tue, 7 Jul 2015 21:05:00 -0700	[thread overview]
Message-ID: <CAF2d9jipwzVPNcaiQduPkDyoy3OXQG4UW=VB4HyVPjyrU2bU1w@mail.gmail.com> (raw)
In-Reply-To: <20150703125840.24121.91556.stgit@buzz>

On Fri, Jul 3, 2015 at 5:58 AM, Konstantin Khlebnikov
<khlebnikov@yandex-team.ru> wrote:
> Inet6addr notifier is atomic and runs in bh context without RTNL when
> ipv6 receives router advertisement packet and performs autoconfiguration.
>
> This patch adds ipvl_port->addr_lock and helpers: ipvlan_addr_lock_bh,
> ipvlan_addr_unlock_bh for protecting ipvlan addresses and hash table.
>
Frankly I'm not comfortable adding spin-locks all over. I think any
config that mostly takes place with RTNL makes sense but this
inet6addr needs to be thought through and implanting spin-locks in
IPvlan is a work-around for a problem some where else.
Why can't a work-queue that takes RTNL to call inet6addr-notifier be
implemented when called from bh?

> Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
> ---
>  drivers/net/ipvlan/ipvlan.h      |   11 +++++++++++
>  drivers/net/ipvlan/ipvlan_core.c |    2 --
>  drivers/net/ipvlan/ipvlan_main.c |   33 ++++++++++++++++++++++++++++++---
>  3 files changed, 41 insertions(+), 5 deletions(-)
>
[snip]

  reply	other threads:[~2015-07-08  4:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-03 12:58 [PATCH v2 0/5] ipvlan: fix ipv6 autoconfiguration Konstantin Khlebnikov
2015-07-03 12:58 ` [PATCH v2 1/5] ipvlan: remove counters of ipv4 and ipv6 addresses Konstantin Khlebnikov
2015-07-08  3:59   ` Mahesh Bandewar
2015-07-03 12:58 ` [PATCH v2 2/5] ipvlan: plug memory leak in ipvlan_link_delete Konstantin Khlebnikov
2015-07-03 12:58 ` [PATCH v2 3/5] ipvlan: unhash addresses without synchronize_rcu Konstantin Khlebnikov
2015-07-03 12:58 ` [PATCH v2 4/5] ipvlan: protect addresses with internal spinlock Konstantin Khlebnikov
2015-07-08  4:05   ` Mahesh Bandewar [this message]
2015-07-10 12:08     ` Konstantin Khlebnikov
2015-07-03 12:58 ` [PATCH v2 5/5] ipvlan: set dev_id for l2 ports to generate unique IPv6 addresses Konstantin Khlebnikov

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='CAF2d9jipwzVPNcaiQduPkDyoy3OXQG4UW=VB4HyVPjyrU2bU1w@mail.gmail.com' \
    --to=maheshb@google.com \
    --cc=davem@davemloft.net \
    --cc=jbenc@redhat.com \
    --cc=khlebnikov@yandex-team.ru \
    --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).