From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: hadi@cyberus.ca, netdev@vger.kernel.org
Subject: Re: mirred, redirect action vs. dev refcount issue
Date: Wed, 21 Jul 2010 17:00:24 -0700 [thread overview]
Message-ID: <20100721170024.60cd9ef4@nehalam> (raw)
In-Reply-To: <20100721.165802.111593910.davem@davemloft.net>
On Wed, 21 Jul 2010 16:58:02 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:
> From: Stephen Hemminger <shemminger@vyatta.com>
> Date: Wed, 21 Jul 2010 16:52:47 -0700
>
> > On Wed, 21 Jul 2010 16:39:55 -0700 (PDT)
> > David Miller <davem@davemloft.net> wrote:
> >
> >> If it is the action rule holding onto the device, it should have
> >> an appropriate netdevice notifier handler.
> >
> > There is no notifier there, and the module doesn't keep track of
> > list of filters. So that is why it has to be done at act api level.
>
> Any rule, or route, or whatever that makes references to devices must
> transparently accomodate the requested removal or downing of a device.
>
> There is no way around this.
>
> So either the action code needs to keep track of it's table entries on
> some global list that can be traversed at notifier time, or we go with
> the ifindex thing.
>
> Whether the ifindex or the global list + delete scheme is better is a
> topic for discussion. Since from the user's perspective it is unclear
> which semantic is less surprising, entries disappearing or suddenly
> stop working (or start applying to a different device which has taken
> a previous one's ifindex!).
ifindex is unique (until integer wraps) so that soft reference
works.
--
next prev parent reply other threads:[~2010-07-22 0:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-21 23:24 mirred, redirect action vs. dev refcount issue Stephen Hemminger
2010-07-21 23:39 ` David Miller
2010-07-21 23:52 ` Stephen Hemminger
2010-07-21 23:58 ` David Miller
2010-07-22 0:00 ` Stephen Hemminger [this message]
2010-07-22 10:11 ` jamal
2010-07-22 17:42 ` Stephen Hemminger
2010-07-22 18:02 ` jamal
2010-07-23 4:45 ` [PATCH] net sched: fix race in mirred device removal Stephen Hemminger
2010-07-25 4:04 ` David Miller
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=20100721170024.60cd9ef4@nehalam \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--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).