netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julian Anastasov <ja@ssi.bg>
To: Andy Gospodarek <gospo@cumulusnetworks.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCHv2 net 2/2] ipv4: update RTNH_F_LINKDOWN flag on UP event
Date: Thu, 29 Oct 2015 22:15:51 +0200 (EET)	[thread overview]
Message-ID: <alpine.LFD.2.11.1510292135550.2300@ja.home.ssi.bg> (raw)
In-Reply-To: <20151027183737.GH3567@gospo.home.greyhouse.net>


	Hello,

On Tue, 27 Oct 2015, Andy Gospodarek wrote:

> > 	Of course, we have a semantic problem when setting
> > RTNH_F_LINKDOWN on last address removal, i.e. this event
> > has nothing to do with the link state. But it works because
> > RTNH_F_LINKDOWN is valid for lookups only when DEAD flag
> > is not set, so that is why my patch looks this way.
> The problem you describe here was a concern of mine as well.  I would
> really like the output of 'ip route show' to properly reflect the link
> state and fix the problem you describe, but it seems like it will not in
> this case with your current patch.  I'll do a bit more testing and let
> you know.

	Another option is to remove the RTNH_F_LINKDOWN
usage from any event, from FIB structs. In case only
netif_carrier_ok check is needed, it looks cheap to just
call it after the IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN check.
When showing it to user space we can again use netif_carrier_ok.

	The new fib_rebalance() is special, it still
needs to be called, just like now on NETDEV_CHANGE
event but only when ignore_routes_with_linkdown=1, i.e.
we can avoid calling fib_sync_up/fib_sync_down_dev in
fib_netdev_event if the flag is not set, guarded by 
CONFIG_IP_ROUTE_MULTIPATH check.

	To make this work we can also call somehow
fib_rebalance() from devinet_conf_proc() context when
the flag is changed, all this is for the
CONFIG_IP_ROUTE_MULTIPATH case.

Regards

--
Julian Anastasov <ja@ssi.bg>

      reply	other threads:[~2015-10-29 20:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26 21:59 [PATCHv2 net 0/2] ipv4: fix problems from the RTNH_F_LINKDOWN introduction Julian Anastasov
2015-10-26 21:59 ` [PATCHv2 net 1/2] ipv4: fix to not remove local route on link down Julian Anastasov
2015-10-30  3:18   ` David Miller
2015-10-26 21:59 ` [PATCHv2 net 2/2] ipv4: update RTNH_F_LINKDOWN flag on UP event Julian Anastasov
2015-10-27  4:52   ` Andy Gospodarek
2015-10-27  7:42     ` Julian Anastasov
2015-10-27 18:37       ` Andy Gospodarek
2015-10-29 20:15         ` Julian Anastasov [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=alpine.LFD.2.11.1510292135550.2300@ja.home.ssi.bg \
    --to=ja@ssi.bg \
    --cc=davem@davemloft.net \
    --cc=gospo@cumulusnetworks.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).