netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: xiyou.wangcong@gmail.com
Cc: jhs@mojatatu.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v4 3/8] net_sched: mirred: remove action when the target device is gone
Date: Wed, 18 Dec 2013 13:50:46 -0500 (EST)	[thread overview]
Message-ID: <20131218.135046.1384071193262360018.davem@davemloft.net> (raw)
In-Reply-To: <CAM_iQpUDZa-=H53Csg8476xOL0xP+rn85O8eB1O39-eF_Jo+uw@mail.gmail.com>

From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Wed, 18 Dec 2013 10:36:06 -0800

> On Wed, Dec 18, 2013 at 6:31 AM, Jamal Hadi Salim <jhs@mojatatu.com> wrote:
>> On 12/15/13 23:15, Cong Wang wrote:
>>>
>>> When the target device is removed, the mirred action is
>>> still there but with the dev pointer setting to NULL.
>>> This makes the output from 'tc filter' ugly. There is no
>>> reason to keep it.
>>>
>>
>> Sorry - this one i have problems with.
>> actions may be referenced from multiple filters,
>> you cant just delete it (that would leave other users
>> pointing to it dangling). Destroying would eventually
>> delete it when the refcount goes to 0.
> 
> How? tcf_action_init() always allocates a new action,
> it doesn't even look for an existing one.
> 
>> [And when we delete actions we send netlink events to announce
>> that]. The proper solution would require i.e tag it as to be
>> deleted and implement some form of garbage collection.
> 
> It doesn't worth to have a GC for this...
> 
> Even if what you said is true, we should just make a copy
> for each of the filters. I just tried to create two different filters
> with same and different mirred actions, my patch works
> perfectly.

Indeed, I think Jamal is confusing how he intended the code to work
vs. how it actually does :-)

  reply	other threads:[~2013-12-18 18:50 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-16  4:15 [PATCH net-next v4 0/8] net_sched: some cleanup and improvments Cong Wang
2013-12-16  4:15 ` [PATCH net-next v4 1/8] net_sched: remove get_stats from tc_action_ops Cong Wang
2013-12-18 14:14   ` Jamal Hadi Salim
2013-12-16  4:15 ` [PATCH net-next v4 2/8] net_sched: act: use standard struct list_head Cong Wang
2013-12-18 14:22   ` Jamal Hadi Salim
2013-12-16  4:15 ` [PATCH net-next v4 3/8] net_sched: mirred: remove action when the target device is gone Cong Wang
2013-12-18 14:31   ` Jamal Hadi Salim
2013-12-18 18:36     ` Cong Wang
2013-12-18 18:50       ` David Miller [this message]
2013-12-18 19:50       ` Jamal Hadi Salim
2013-12-18 21:42         ` Cong Wang
2013-12-22 16:15           ` Jamal Hadi Salim
2013-12-22 19:42             ` Cong Wang
2013-12-22 20:31               ` Jamal Hadi Salim
2013-12-22 21:11                 ` Cong Wang
2013-12-23 12:41                   ` Jamal Hadi Salim
2013-12-23 18:50                     ` Cong Wang
2013-12-23 20:41                       ` Jamal Hadi Salim
2013-12-23 22:14                         ` Cong Wang
2013-12-23 22:30                           ` Jamal Hadi Salim
2013-12-23 22:51                             ` Cong Wang
2013-12-23 23:05                               ` Jamal Hadi Salim
2013-12-23 23:14                                 ` Cong Wang
2013-12-16  4:15 ` [PATCH net-next v4 4/8] net_sched: cls: refactor out struct tcf_ext_map Cong Wang
2013-12-18 14:36   ` Jamal Hadi Salim
2013-12-16  4:15 ` [PATCH net-next v4 5/8] net_sched: init struct tcf_hashinfo at register time Cong Wang
2013-12-18 14:37   ` Jamal Hadi Salim
2013-12-16  4:15 ` [PATCH net-next v4 6/8] net_sched: convert tcf_hashinfo to hlist and use spinlock Cong Wang
2013-12-18 14:38   ` Jamal Hadi Salim
2013-12-16  4:15 ` [PATCH net-next v4 7/8] net_sched: convert tc_action_ops to use struct list_head Cong Wang
2013-12-18 14:40   ` Jamal Hadi Salim
2013-12-16  4:15 ` [PATCH net-next v4 8/8] net_sched: convert tcf_proto_ops " Cong Wang
2013-12-18 14:41   ` Jamal Hadi Salim
2013-12-16 12:45 ` [PATCH net-next v4 0/8] net_sched: some cleanup and improvments Jamal Hadi Salim
2013-12-17 21:30   ` David Miller
2013-12-18 13:21     ` Jamal Hadi Salim
2013-12-18 14:13 ` Jamal Hadi Salim
2013-12-18 18:51 ` David Miller
2013-12-18 21:40   ` Cong Wang

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=20131218.135046.1384071193262360018.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.com \
    /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).