lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0ec3fa5-8746-0c1f-27e8-cb8960c7d01f@mojatatu.com>
Date:   Tue, 16 May 2017 08:52:31 -0400
From:   Jamal Hadi Salim <jhs@...atatu.com>
To:     Jiri Pirko <jiri@...nulli.us>
Cc:     netdev@...r.kernel.org, davem@...emloft.net,
        xiyou.wangcong@...il.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 v2 02/10] net: sched: introduce tcf block
 infractructure

On 17-05-16 08:23 AM, Jiri Pirko wrote:
> Tue, May 16, 2017 at 02:07:25PM CEST, jhs@...atatu.com wrote:
>>
>> Jiri,
>>
>> I am sorry i am tied up elsewhere but will respond in chunks.
>>
>> On 17-05-15 04:38 AM, Jiri Pirko wrote:
>>
>>
>>>  static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz)
>>>  {
>>>  	struct qdisc_skb_cb *qcb;
>>
>>
>>> +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;
>>> +}
>>
>> tcf_block_get() sounds odd. tcf_block_create()?
>
> I used get/put because I plan to allow sharing of block between qdiscs
> in future. Then there will be a refcount.
>

Ok, I guess I should read further into the patches..


>>> -static struct tcf_proto __rcu **atm_tc_find_tcf(struct Qdisc *sch,
>>> -						unsigned long cl)
>>> +static struct tcf_block *atm_tc_tcf_block(struct Qdisc *sch, unsigned long cl)
>>
>> Any reason you removed the verb "find" from all these calls?
>> eg above: better to have atm_tc_tcf_block_find()?
>
> Yeah, I was thinking about it. The thing is, the callback does not do
> any lookup so "find" is not accurate. Also without "find" this is
> shorter so I decided for this naming variant.
>

They do select some chain - at least that was the intent.
Are you not planning to use this to pick a chain in a block?

cheers,
jamal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ