mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: "Christopher Friesen" <cfriesen@nortelnetworks.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: RFC: ethernet links should remember routes the same as addresses
Date: 29 Nov 2001 20:55:17 +0100	[thread overview]
Message-ID: <p73r8qhqrmi.fsf@amdsim2.suse.de> (raw)
In-Reply-To: <3C068ED1.D5E2F536@nortelnetworks.com.suse.lists.linux.kernel>
In-Reply-To: "Christopher Friesen"'s message of "29 Nov 2001 20:43:02 +0100"

"Christopher Friesen" <cfriesen@nortelnetworks.com> writes:

> Suppose I have a fancy routing setup, dynamically configured by different
> binaries, scripts, etc, complete with multiple addresses per link, additional
> routing rules and tables specified using iproute2, etc.
> 
> An ethernet driver hangs.  Could be a software bug, an intermittent hardware
> issue, whatever.  It can be fixed up by setting the link down and up.
> 
> Currently, if I run "ip link set dev ethX down", all routes associated with that
> IP address in the additional routing tables are lost.  This is somewhat
> understandable, as the addresses are not actually available anymore.  However,
> the addresses are still visible associated with the link.  Then I run "ip link
> set dev ethX up".  The route in the main routing table comes back, but none of
> the other routes do.  Somehow, all of those additional routes must be re-added.

ip route list dev device > BACKUP

...

while read i ; do ip route add $i ; done < BACKUP


> 
> Wouldn't it be nice if we could keep track of these additional routes?  Then you
> could simply 'down' and 'up' the link and everything would be back the way it
> was before.
> 
> Does this sound like a good idea?  How hard would this be to implement (not
> knowing what the current code looks like, I don't know how this would be done)?

In kernel very easy. The IP addresses and the driver init/cleanup are 
completely separated and can be easily done independent. You may need
some way to prevent packets getting submitted to the driver (e.g. a
netif_carrier_off but make sure to not confuse it with a real 
netif_carrier_off done by the driver, so you'll likely need a new flag) 

I'm not sure it it worth it though given how easily it is to simulate
in user space. If you really wanted it I guess best would be to add new 
ioctls for it. Coding should be easy.

-Andi

       reply	other threads:[~2001-11-29 19:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3C068ED1.D5E2F536@nortelnetworks.com.suse.lists.linux.kernel>
2001-11-29 19:55 ` Andi Kleen [this message]
2001-11-29 20:59   ` Christopher Friesen
2001-11-29 21:03     ` Ben Greear
2001-11-29 21:18       ` Christopher Friesen
2001-11-29 21:18     ` Andi Kleen
2001-11-29 23:04 Julian Anastasov
     [not found] <9u64q7$46m$1@phoenix.clouddancer.com>
2001-11-29 19:38 ` Christopher Friesen
2001-11-29 20:58   ` Colonel

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=p73r8qhqrmi.fsf@amdsim2.suse.de \
    --to=ak@suse.de \
    --cc=cfriesen@nortelnetworks.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®