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

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:

> From: Stephen Hemminger <[email-masked]>
> Date: Wed, 21 Jul 2010 16:24:26 -0700
> 
> > Alternatively, the mirror/redirect could just use ifindex which is
> > a soft reference, so if device is removed, they just drop.
> > 
> > Lazy me favors the later.
> 
> 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.

> If it's a transient reference on receive, it should be transient
> and released eventually.

Kernel doesn't keep transient reference on receive any more.