From: David Ahern <dsa@cumulusnetworks.com>
To: David Miller <davem@davemloft.net>
Cc: hannes@stressinduktion.org, netdev@vger.kernel.org,
hannes@redhat.com, nicolas.dichtel@6wind.com
Subject: Re: [PATCH net-next v5] net: ipv6: Make address flushing on ifdown optional
Date: Wed, 14 Oct 2015 20:46:35 -0600 [thread overview]
Message-ID: <561F138B.8060007@cumulusnetworks.com> (raw)
In-Reply-To: <20151014.180659.1860914575436401565.davem@davemloft.net>
On 10/14/15 7:06 PM, David Miller wrote:
> From: David Ahern <dsa@cumulusnetworks.com>
> Date: Wed, 14 Oct 2015 10:09:59 -0600
>
>> This latest patch makes IPv6 static addresses on par with IPv4,
>> including error paths.
>
> I don't agree with ipv4's behavior... and just because ipv4 does
> something poorly doesn't mean we get a free pass to replicate that
> lazyness in ipv6.
>
As I stated this patch makes IPv6 on par with IPv4 with regards to
saving the address and lack of error handling back to the user should a
failure happen on a link up. Yes, it is best to give the user
notification of a failure, but step back for a moment and look at the
bigger picture:
At best the address is saved and restored on a link up (the expected
outcome for 99.999999...% of the time). At worst the address is removed
because the prefix route fails a memory allocation and the user is not
notified. But that is exactly what happens today - the address is
dropped and the user has to restore it.
As for the 1 failure path -- it's a GFP_ATOMIC memory allocation
failure. Frankly if that happens lack of an address on an interface is
the least of the user's problems.
As for the options to fix this existing shortcoming:
1. The existing call_netdevice_notifiers infra does not allow a notifier
to 'fail' the transaction and roll it back or even to give the user an
error message.
2. Stashing the prefix route has its merits but it has to deal with
error paths as well. What if the address is deleted? What if the mask is
changed while the device is a down state? What if the device is deleted?
Sure, handle those cases but what other paths are missing from that list?
Both paths introduce a lot of complexity all b/c we want to save the
address on a link and restore the route on a link up.
Why not take this as a start point that at least does the right thing
almost every time?
David
prev parent reply other threads:[~2015-10-15 2:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-12 16:33 [PATCH net-next v5] net: ipv6: Make address flushing on ifdown optional David Ahern
2015-10-14 1:45 ` David Miller
2015-10-14 9:34 ` Hannes Frederic Sowa
2015-10-14 10:08 ` Nicolas Dichtel
2015-10-14 11:03 ` Hannes Frederic Sowa
2015-10-14 12:18 ` David Miller
2015-10-14 12:14 ` Hannes Frederic Sowa
2015-10-14 13:00 ` David Miller
2015-10-14 16:09 ` David Ahern
2015-10-15 1:06 ` David Miller
2015-10-15 2:46 ` David Ahern [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=561F138B.8060007@cumulusnetworks.com \
--to=dsa@cumulusnetworks.com \
--cc=davem@davemloft.net \
--cc=hannes@redhat.com \
--cc=hannes@stressinduktion.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
/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).