[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170516.173404.1930033807247247443.davem@davemloft.net>
Date: Tue, 16 May 2017 17:34:04 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: xiyou.wangcong@...il.com
Cc: jiri@...nulli.us, netdev@...r.kernel.org, jhs@...atatu.com,
dsa@...ulusnetworks.com, edumazet@...gle.com,
stephen@...workplumber.org, daniel@...earbox.net,
alexander.h.duyck@...el.com, simon.horman@...ronome.com,
mlxsw@...lanox.com
Subject: Re: [patch net-next v3 02/10] net: sched: introduce tcf block
infractructure
From: Cong Wang <xiyou.wangcong@...il.com>
Date: Tue, 16 May 2017 13:51:30 -0700
> On Tue, May 16, 2017 at 10:27 AM, Jiri Pirko <jiri@...nulli.us> 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.
Powered by blists - more mailing lists