> On Aug 12, 2015, at 4:51 PM, Joe Stringer <joestrin...@nicira.com> wrote:
> 
> On 12 August 2015 at 16:48, Jarno Rajahalme <jrajaha...@nicira.com 
> <mailto:jrajaha...@nicira.com>> wrote:
>> 
>> On Aug 12, 2015, at 2:18 PM, Joe Stringer <joestrin...@nicira.com> wrote:
>> 
>> On 7 August 2015 at 16:57, Jarno Rajahalme <jrajaha...@nicira.com> wrote:
>> 
>> mf_value has grown bigger than needed for storing the biggest
>> supported prefix (IPv6 address length).  Define a new type to be used
>> instead of mf_value.
>> 
>> This makes classifier lookups a bit faster.
>> 
>> Signed-off-by: Jarno Rajahalme <jrajaha...@nicira.com>
>> ---
>> lib/classifier.c | 14 ++++++++++----
>> 1 file changed, 10 insertions(+), 4 deletions(-)
>> 
>> diff --git a/lib/classifier.c b/lib/classifier.c
>> index 4adee2d..040d04f 100644
>> --- a/lib/classifier.c
>> +++ b/lib/classifier.c
>> @@ -138,12 +138,18 @@ next_visible_rule_in_list(const struct cls_match
>> *rule, cls_version_t version)
>>    return rule;
>> }
>> 
>> +/* Type with maximum supported prefix length. */
>> +typedef union {
>> +    struct in6_addr ipv6;  /* For sizing. */
>> +    ovs_be32 be32;         /* For access. */
>> +} trie_prefix_t;
>> 
>> 
>> Typically I believe that we try to avoid typedefs, instead using the
>> expanded "union trie_prefix" so that the actual type can be determined
>> at a glance (See CodingStyle.md for more explanation).
>> 
>> 
>> OK, changed to “union trie_prefix”.
>> 
>> Other than that, this change seems to make sense.
>> 
>> 
>> Is this an Acked-by?
> 
> Sorry, yeah this is fine. I thought it might be dependent on an
> earlier change, but it seems like it's good by itself.
> 
> Acked-by: Joe Stringer <joestrin...@nicira.com 
> <mailto:joestrin...@nicira.com>>

Pushed to master,

  Jarno

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to