Thread (8 messages) 8 messages, 3 authors, 2018-07-31

Re: [patch net-next] net: sched: don't dump chains only held by actions

From: Jiri Pirko <jiri@resnulli.us>
Date: 2018-07-31 10:30:10

Tue, Jul 31, 2018 at 10:01:46AM CEST, jakub.kicinski@netronome.com wrote:
On Tue, 31 Jul 2018 08:32:58 +0200, Jiri Pirko wrote:
quoted
Mon, Jul 30, 2018 at 08:19:56PM CEST, xiyou.wangcong@gmail.com wrote:
quoted
On Sun, Jul 29, 2018 at 12:54 AM Jiri Pirko [off-list ref] wrote:  
quoted
Sat, Jul 28, 2018 at 07:39:36PM CEST, xiyou.wangcong@gmail.com wrote:  
quoted
On Sat, Jul 28, 2018 at 10:20 AM Cong Wang [off-list ref] wrote:  
quoted
On Fri, Jul 27, 2018 at 12:47 AM Jiri Pirko [off-list ref] wrote:  
quoted
From: Jiri Pirko <redacted>

In case a chain is empty and not explicitly created by a user,
such chain should not exist. The only exception is if there is
an action "goto chain" pointing to it. In that case, don't show the
chain in the dump. Track the chain references held by actions and
use them to find out if a chain should or should not be shown
in chain dump.

Signed-off-by: Jiri Pirko <redacted>  
Looks reasonable to me.

Acked-by: Cong Wang <redacted>  
Hold on...

If you increase the refcnt for a zombie chain on NEWCHAIN path,
then it would become a non-zombie, this makes sense. However,
if the action_refcnt gets increased again when another action uses it,
it become a zombie again because refcnt==action_refcnt??  
No. action always increases both refcnt and action_refcnt  
Hmm, then the name zombie is confusing, with your definition all
chains implicitly created by actions are zombies, unless touched
by user explicitly. Please find a better name.  
Okay. Perhaps chain_inactive?
FWIW to me active brings to mind that it's handling traffic.  Brining in
my suggestions from an off-list discussion:

tcf_chain_act_refs_only() or tcf_chain_pure_act_target()
:/
or maybe tcf_chain_has_no_filters() ?
That is not accurate, as explicitly created chain does not have any
filters too.

I think this is good:
tcf_chain_held_by_acts_only()
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help