On Thu, Jul 26, 2018 at 9:33 AM Jiri Pirko <j...@resnulli.us> wrote: > > From: Jiri Pirko <j...@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.
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.