From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [patch net-next RFC] net: sched: don't dump chains only held by actions Date: Fri, 27 Jul 2018 08:13:54 +0200 Message-ID: <20180727061354.GB11576@nanopsycho> References: <20180726163101.19718-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 , mlxsw@mellanox.com To: Cong Wang Return-path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:39815 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729480AbeG0Hgj (ORCPT ); Fri, 27 Jul 2018 03:36:39 -0400 Received: by mail-wm0-f65.google.com with SMTP id h20-v6so4198903wmb.4 for ; Thu, 26 Jul 2018 23:16:21 -0700 (PDT) Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: Fri, Jul 27, 2018 at 06:18:14AM CEST, xiyou.wangcong@gmail.com wrote: >On Thu, Jul 26, 2018 at 9:33 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. > >Hiding it makes sense. But you still need to make sure >user can't find it by ID, hiding it merely means user can't >see it. > >Also, I don't understand why you increase the refcnt >for a hiding chain either, like Jakub mentioned. > >If user can't see it, it must not be found by ID either. Ack. Will do that.