From: Dan Williams <dcbw@redhat.com>
To: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Cc: Zoltan Kiss <zoltan.kiss@citrix.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
xen-devel@lists.xenproject.org, kvm@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
James Morris <jmorris@namei.org>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
Patrick McHardy <kaber@trash.net>
Subject: Re: [RFC v2 2/4] net: enables interface option to skip IP
Date: Wed, 19 Feb 2014 18:56:17 -0600 [thread overview]
Message-ID: <1392857777.22693.14.camel@dcbw.local> (raw)
In-Reply-To: <CAB=NE6VpUqwNNY4pgbS6du2VsZ6dH0TzQYXmiw6GGN-EiOsV6g@mail.gmail.com>
On Wed, 2014-02-19 at 09:20 -0800, Luis R. Rodriguez wrote:
> On Wed, Feb 19, 2014 at 8:45 AM, Dan Williams <dcbw@redhat.com> wrote:
> > On Tue, 2014-02-18 at 13:19 -0800, Luis R. Rodriguez wrote:
> >> On Mon, Feb 17, 2014 at 12:23 PM, Dan Williams <dcbw@redhat.com> wrote:
> >> > On Fri, 2014-02-14 at 18:59 -0800, Luis R. Rodriguez wrote:
> >> >> From: "Luis R. Rodriguez" <mcgrof@suse.com>
> >> >>
> >> >> Some interfaces do not need to have any IPv4 or IPv6
> >> >> addresses, so enable an option to specify this. One
> >> >> example where this is observed are virtualization
> >> >> backend interfaces which just use the net_device
> >> >> constructs to help with their respective frontends.
> >> >>
> >> >> This should optimize boot time and complexity on
> >> >> virtualization environments for each backend interface
> >> >> while also avoiding triggering SLAAC and DAD, which is
> >> >> simply pointless for these type of interfaces.
> >> >
> >> > Would it not be better/cleaner to use disable_ipv6 and then add a
> >> > disable_ipv4 sysctl, then use those with that interface?
> >>
> >> Sure, but note that the both disable_ipv6 and accept_dada sysctl
> >> parameters are global. ipv4 and ipv6 interfaces are created upon
> >> NETDEVICE_REGISTER, which will get triggered when a driver calls
> >> register_netdev(). The goal of this patch was to enable an early
> >> optimization for drivers that have no need ever for ipv4 or ipv6
> >> interfaces.
> >
> > Each interface gets override sysctls too though, eg:
> >
> > /proc/sys/net/ipv6/conf/enp0s25/disable_ipv6
>
> I hadn't seen those, thanks!
Note that there isn't yet a disable_ipv4 knob though, I was
perhaps-too-subtly trying to get you to send a patch for it, since I can
use it too :)
Dan
> > which is the one I meant; you're obviously right that the global ones
> > aren't what you want here. But the specific ones should be suitable?
>
> Under the approach Stephen mentioned by first ensuring the interface
> is down yes. There's one use case I can consider to still want the
> patch though, more on that below.
>
> > If you set that on a per-interface basis, then you'll get EPERM or
> > something whenever you try to add IPv6 addresses or do IPv6 routing.
>
> Neat, thanks.
>
> >> Zoltan has noted though some use cases of IPv4 or IPv6 addresses on
> >> backends though, as such this is no longer applicable as a
> >> requirement. The ipv4 sysctl however still seems like a reasonable
> >> approach to enable optimizations of the network in topologies where
> >> its known we won't need them but -- we'd need to consider a much more
> >> granular solution, not just global as it is now for disable_ipv6, and
> >> we'd also have to figure out a clean way to do this to not incur the
> >> cost of early address interface addition upon register_netdev().
> >>
> >> Given that we have a use case for ipv4 and ipv6 addresses on
> >> xen-netback we no longer have an immediate use case for such early
> >> optimization primitives though, so I'll drop this.
> >>
> >> > The IFF_SKIP_IP seems to duplicate at least part of what disable_ipv6 is
> >> > already doing.
> >>
> >> disable_ipv6 is global, the goal was to make this granular and skip
> >> the cost upon early boot, but its been clarified we don't need this.
> >
> > Like Stephen says, you need to make sure you set them before IFF_UP, but
> > beyond that, wouldn't the interface-specific sysctls work?
>
> Yeah that'll do it, unless there is a measurable run time benefit cost
> to never even add these in the first place. Consider a host with tons
> of guests, not sure how many is 'a lot' these days. One would have to
> measure the cost of reducing the amount of time it takes to boot these
> up. As discussed in the other threads though there *is* some use cases
> of assigning IPv4 or IPv6 addresses to the backend interfaces though:
> routing them (although its unclear to me if iptables can be used
> instead, Zoltan?). So at least now there no clear requirement to
> remove these interfaces or not have them at all. The boot time cost
> savings should be considered though if this is ultimately desirable. I
> saw tons of timers and events that'd get triggered with any IPv4 or
> IPv6 interface laying around.
>
> Luis
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-02-20 0:56 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-15 2:59 [RFC v2 0/4] net: bridge / ip optimizations for virtual net backends Luis R. Rodriguez
2014-02-15 2:59 ` [RFC v2 1/4] bridge: enable interfaces to opt out from becoming the root bridge Luis R. Rodriguez
2014-02-16 18:56 ` Ben Hutchings
2014-02-16 18:57 ` Stephen Hemminger
2014-02-18 21:02 ` Luis R. Rodriguez
2014-02-19 9:52 ` [Xen-devel] " Ian Campbell
2014-02-19 14:35 ` Zoltan Kiss
2014-02-19 17:02 ` Luis R. Rodriguez
2014-02-19 17:08 ` Stephen Hemminger
2014-02-19 17:59 ` Luis R. Rodriguez
2014-02-20 17:19 ` Stephen Hemminger
2014-02-20 20:24 ` Luis R. Rodriguez
2014-02-21 13:02 ` Zoltan Kiss
2014-02-21 16:01 ` Luis R. Rodriguez
2014-02-22 1:38 ` Luis R. Rodriguez
2014-02-20 13:19 ` Zoltan Kiss
2014-02-20 20:01 ` Luis R. Rodriguez
2014-02-21 13:02 ` Zoltan Kiss
2014-02-21 15:59 ` Luis R. Rodriguez
2014-02-17 17:52 ` Zoltan Kiss
2014-02-19 16:45 ` Luis R. Rodriguez
2014-02-20 14:47 ` Zoltan Kiss
2014-02-20 20:28 ` Luis R. Rodriguez
2014-02-15 2:59 ` [RFC v2 2/4] net: enables interface option to skip IP Luis R. Rodriguez
2014-02-17 20:23 ` Dan Williams
2014-02-18 21:19 ` Luis R. Rodriguez
2014-02-18 21:42 ` Stephen Hemminger
2014-02-19 17:13 ` Luis R. Rodriguez
2014-02-19 16:45 ` Dan Williams
2014-02-19 17:20 ` Luis R. Rodriguez
2014-02-19 19:13 ` Zoltan Kiss
2014-02-20 20:39 ` Luis R. Rodriguez
2014-02-21 13:02 ` Zoltan Kiss
2014-02-22 1:40 ` Luis R. Rodriguez
2014-02-20 0:56 ` Dan Williams [this message]
2014-02-20 0:58 ` Hannes Frederic Sowa
2014-02-20 1:02 ` Dan Williams
2014-02-20 20:31 ` Luis R. Rodriguez
2014-02-24 18:22 ` Dan Williams
2014-02-24 20:33 ` Luis R. Rodriguez
2014-02-24 23:04 ` David Miller
2014-02-25 0:02 ` Ben Hutchings
2014-02-25 0:12 ` David Miller
2014-02-25 2:01 ` Ben Hutchings
2014-02-25 2:23 ` Hannes Frederic Sowa
2014-02-25 19:50 ` Paul Marks
2014-02-25 21:07 ` Dan Williams
2014-02-25 21:18 ` David Miller
2014-02-26 1:29 ` Hannes Frederic Sowa
2014-02-15 2:59 ` [RFC v2 3/4] xen-netback: use a random MAC address Luis R. Rodriguez
2014-02-17 10:29 ` [Xen-devel] " David Vrabel
2014-02-18 11:22 ` Ian Campbell
2014-02-18 21:30 ` Luis R. Rodriguez
2014-02-15 2:59 ` [RFC v2 4/4] xen-netback: skip IPv4 and IPv6 interfaces Luis R. Rodriguez
2014-02-17 14:36 ` [Xen-devel] " Zoltan Kiss
2014-02-18 20:16 ` Luis R. Rodriguez
2014-02-19 9:47 ` Ian Campbell
2014-02-17 10:27 ` [Xen-devel] [RFC v2 0/4] net: bridge / ip optimizations for virtual net backends David Vrabel
2014-02-18 19:43 ` Luis R. Rodriguez
2014-02-19 9:48 ` Ian Campbell
2014-02-19 17:10 ` Luis R. Rodriguez
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=1392857777.22693.14.camel@dcbw.local \
--to=dcbw@redhat.com \
--cc=davem@davemloft.net \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@do-not-panic.com \
--cc=netdev@vger.kernel.org \
--cc=xen-devel@lists.xenproject.org \
--cc=yoshfuji@linux-ipv6.org \
--cc=zoltan.kiss@citrix.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).