Subject: Re: mirred, redirect action vs. dev refcount issue

From: Stephen Hemminger <[email-masked]>
Date: Wed, 21 Jul 2010 17:00:24 -0700

On Wed, 21 Jul 2010 16:58:02 -0700 (PDT)
David Miller <[email-masked]> wrote:

> From: Stephen Hemminger <[email-masked]>
> Date: Wed, 21 Jul 2010 16:52:47 -0700
> 
> > On Wed, 21 Jul 2010 16:39:55 -0700 (PDT)
> > David Miller <[email-masked]> 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.

--