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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c2f10515-b484-2965-ac1f-c46ad9705bd3@intel.com>
Date:   Fri, 14 Sep 2018 18:31:22 -0700
From:   "Nambiar, Amritha" <amritha.nambiar@...el.com>
To:     Jiri Pirko <jiri@...nulli.us>
Cc:     netdev@...r.kernel.org, davem@...emloft.net,
        alexander.h.duyck@...el.com, jakub.kicinski@...ronome.com,
        sridhar.samudrala@...el.com, jhs@...atatu.com,
        jesse.brandeburg@...el.com, xiyou.wangcong@...il.com
Subject: Re: [net-next, RFC PATCH] net: sched: cls_range: Introduce Range
 classifier

On 9/14/2018 2:58 AM, Jiri Pirko wrote:
> Thu, Sep 13, 2018 at 10:52:06PM CEST, amritha.nambiar@...el.com wrote:
> 
> [...]
> 
>> +static struct cls_range_filter *range_lookup(struct cls_range_head *head,
>> +					     struct range_flow_key *key,
>> +					     struct range_flow_key *mkey,
>> +					     bool is_skb)
>> +{
>> +	struct cls_range_filter *filter, *next_filter;
>> +	struct range_params range;
>> +	int ret;
>> +	size_t cmp_size;
>> +
>> +	list_for_each_entry_safe(filter, next_filter, &head->filters, flist) {
> 
> This really should be list_for_each_entry_rcu()
> 
> also, as I wrote in the previous email, this should be done in
> cls_flower. Look at fl_lookup() it looks-up hashtable. You just need to
> add linked list traversal and range comparison to that function for the
> hit in the hashtable.
> 

I see. Will integrate the range comparison into cls_flower.

> 
>> +		if (!is_skb) {
>> +			/* Existing filter comparison */
>> +			cmp_size = sizeof(filter->mkey);
>> +		} else {
>> +			/* skb classification */
>> +			ret = range_compare_params(&range, filter, key,
>> +						   RANGE_PORT_DST);
>> +			if (ret < 0)
>> +				continue;
>> +
>> +			ret = range_compare_params(&range, filter, key,
>> +						   RANGE_PORT_SRC);
>> +			if (ret < 0)
>> +				continue;
>> +
>> +			/* skb does not have min and max values */
>> +			cmp_size = RANGE_KEY_MEMBER_OFFSET(tp_min);
>> +		}
>> +		if (!memcmp(mkey, &filter->mkey, cmp_size))
>> +			return filter;
>> +	}
>> +	return NULL;
> 
> [...]
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ