From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [patch net-next] net: sched: don't dump chains only held by actions Date: Sun, 29 Jul 2018 09:51:46 +0200 Message-ID: <20180729075146.GA2260@nanopsycho.orion> References: <20180727074505.855-1-jiri@resnulli.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Linux Kernel Network Developers , David Miller , Jamal Hadi Salim , Jakub Kicinski , mlxsw@mellanox.com To: Cong Wang Return-path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:39593 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726102AbeG2JXw (ORCPT ); Sun, 29 Jul 2018 05:23:52 -0400 Received: by mail-wm0-f65.google.com with SMTP id h20-v6so10090224wmb.4 for ; Sun, 29 Jul 2018 00:54:19 -0700 (PDT) Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: 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 wrote: >> >> On Fri, Jul 27, 2018 at 12:47 AM Jiri Pirko wrote: >> > >> > From: Jiri Pirko >> > >> > 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 >> >> Looks reasonable to me. >> >> Acked-by: Cong Wang > >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