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] [day] [month] [year] [list]
Date:	Wed, 10 Dec 2014 10:29:53 -0800
From:	Pravin Shelar <pshelar@...ira.com>
To:	Joe Stringer <joestringer@...ira.com>
Cc:	"dev@...nvswitch.org" <dev@...nvswitch.org>,
	netdev <netdev@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [ovs-dev] [PATCHv11 net-next 2/2] openvswitch: Add support for
 unique flow IDs.

On Wed, Dec 10, 2014 at 10:15 AM, Joe Stringer <joestringer@...ira.com> wrote:
> On 9 December 2014 at 22:11, Pravin Shelar <pshelar@...ira.com> wrote:
>> On Tue, Dec 9, 2014 at 4:25 PM, Joe Stringer <joestringer@...ira.com> wrote:
>>> On 9 December 2014 at 10:32, Pravin Shelar <pshelar@...ira.com> wrote:
>>>> On Tue, Dec 2, 2014 at 6:56 PM, Joe Stringer <joestringer@...ira.com> wrote:
>>>>> @@ -424,10 +475,9 @@ static struct sw_flow *masked_flow_lookup(struct table_instance *ti,
>>>>>         ovs_flow_mask_key(&masked_key, unmasked, mask);
>>>>>         hash = flow_hash(&masked_key, key_start, key_end);
>>>>>         head = find_bucket(ti, hash);
>>>>> -       hlist_for_each_entry_rcu(flow, head, hash_node[ti->node_ver]) {
>>>>> -               if (flow->mask == mask && flow->hash == hash &&
>>>>> -                   flow_cmp_masked_key(flow, &masked_key,
>>>>> -                                         key_start, key_end))
>>>>> +       hlist_for_each_entry_rcu(flow, head, flow_hash.node[ti->node_ver]) {
>>>>> +               if (flow->mask == mask && flow->flow_hash.hash == hash &&
>>>>> +                   flow_cmp_masked_key(flow, &masked_key, key_start, key_end))
>>>>>                         return flow;
>>>>>         }
>>>>>         return NULL;
>>>>> @@ -469,7 +519,40 @@ struct sw_flow *ovs_flow_tbl_lookup_exact(struct flow_table *tbl,
>>>>>         /* Always called under ovs-mutex. */
>>>>>         list_for_each_entry(mask, &tbl->mask_list, list) {
>>>>>                 flow = masked_flow_lookup(ti, match->key, mask);
>>>>> -               if (flow && ovs_flow_cmp_unmasked_key(flow, match))  /* Found */
>>>>> +               if (flow && !flow->ufid &&
>>>> why not NULL check for flow->unmasked_key here rather than ufid?
>>>
>>> In this version, I tried to consistently use flow->ufid as the switch
>>> for whether UFID exists or not. In the next version, this statement
>>> would refer to flow->id->ufid_len.
>>>
>>> The current approach means that ovs_flow_tbl_lookup_exact() is really
>>> ovs_flow_tbl_lookup_unmasked_key(). Do you think this should remain
>>> specific to unmasked key or should it be made to check that the
>>> identifier (ufid OR unmasked key) is the same?
>>
>> It is easier to read code if we check for flow->unmasked_key here.
>> ovs_flow_cmp_unmasked_key() has assert on ufid anyways.
>
> With the change to put UFID/unmasked key in the same struct, there
> will be no such pointer to check, only ufid_len.
>
right, Lets keep the check for ufid_len.

> However, we could shift this check at the start of the function instead.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists