netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Jakub Kicinski <jakub.kicinski@netronome.com>,
	mlxsw@mellanox.com
Subject: Re: [patch net-next] net: sched: don't dump chains only held by actions
Date: Tue, 31 Jul 2018 08:32:58 +0200	[thread overview]
Message-ID: <20180731063258.GA2154@nanopsycho> (raw)
In-Reply-To: <CAM_iQpWE1SW44dQGASSwB6UHD_tBCM+K_N2=y6-JcO9ANOSiww@mail.gmail.com>

Mon, Jul 30, 2018 at 08:19:56PM CEST, xiyou.wangcong@gmail.com wrote:
>On Sun, Jul 29, 2018 at 12:54 AM Jiri Pirko <jiri@resnulli.us> wrote:
>>
>> Sat, Jul 28, 2018 at 07:39:36PM CEST, xiyou.wangcong@gmail.com wrote:
>> >On Sat, Jul 28, 2018 at 10:20 AM Cong Wang <xiyou.wangcong@gmail.com> wrote:
>> >>
>> >> On Fri, Jul 27, 2018 at 12:47 AM Jiri Pirko <jiri@resnulli.us> wrote:
>> >> >
>> >> > From: Jiri Pirko <jiri@mellanox.com>
>> >> >
>> >> > 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 <jiri@mellanox.com>
>> >>
>> >> Looks reasonable to me.
>> >>
>> >> Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
>> >
>> >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?

>
>Also, tcf_chain_get_by_act() could send out RTM_NEWCHAIN too,
>which is confusing too as it is still a "zombie".

Will check.

  reply	other threads:[~2018-07-31  8:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27  7:45 [patch net-next] net: sched: don't dump chains only held by actions Jiri Pirko
2018-07-28 17:20 ` Cong Wang
2018-07-28 17:39   ` Cong Wang
2018-07-29  7:51     ` Jiri Pirko
2018-07-30 18:19       ` Cong Wang
2018-07-31  6:32         ` Jiri Pirko [this message]
2018-07-31  8:01           ` Jakub Kicinski
2018-07-31  8:48             ` Jiri Pirko

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=20180731063258.GA2154@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=jhs@mojatatu.com \
    --cc=mlxsw@mellanox.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).