Subject: Re: [patch net-next v3 02/10] net: sched: introduce tcf block infractructure

From: Jiri Pirko <[email-masked]>
Date: Wed, 17 May 2017 07:42:51 +0200

Wed, May 17, 2017 at 12:34:04AM CEST, [email-masked] wrote:
>On Tue, May 16, 2017 at 2:34 PM, David Miller <[email-masked]> wrote:
>> From: Cong Wang <[email-masked]>
>> Date: Tue, 16 May 2017 13:51:30 -0700
>>
>>> On Tue, May 16, 2017 at 10:27 AM, Jiri Pirko <[email-masked]> wrote:
>>>> +int tcf_block_get(struct tcf_block **p_block,
>>>> +                 struct tcf_proto __rcu **p_filter_chain)
>>>> +{
>>>> +       struct tcf_block *block = kzalloc(sizeof(*block), GFP_KERNEL);
>>>> +
>>>> +       if (!block)
>>>> +               return -ENOMEM;
>>>> +       block->p_filter_chain = p_filter_chain;
>>>> +       *p_block = block;
>>>> +       return 0;
>>>> +}
>>>> +EXPORT_SYMBOL(tcf_block_get);
>>>
>>>
>>> XXX_get() is usually for refcnt'ing, here you only allocate
>>> a block, so please rename it to tcf_block_alloc().
>>
>> Later in the series he adds refcounting to these objects.
>>
>> He explained this to Jamal too.
>
>I have read all patches, unless I miss something, block itself
>is not refcn'ted, only chains are, so it makes no sense to get
>a block, right?

It's not in this series. I just prepare the design so later on I can
easily add the block sharing between qdiscs.