[ovs-dev] [PATCH 1/1] datapath: add key support to CAPWAP tunnel
Ben Pfaff
blp at nicira.com
Fri Jul 22 21:22:11 UTC 2011
On Fri, Jul 22, 2011 at 2:18 PM, Jesse Gross <jesse at nicira.com> wrote:
> On Wed, Jul 13, 2011 at 10:05 PM, Valient Gough <vgough at pobox.com> wrote:
>> @@ -628,7 +768,8 @@ static int capwap_frag_match(struct inet_frag_queue *ifq, void *a_)
>> struct frag_match *a = a_;
>> struct frag_match *b = &ifq_cast(ifq)->match;
>>
>> - return a->id == b->id && a->saddr == b->saddr && a->daddr == b->daddr;
>> + return a->id == b->id && a->saddr == b->saddr &&
>> + a->daddr == b->daddr && a->key == b->key;
>
> Might as well use memcmp() here now that the struct won't have any
> extra padding in it.
Does memcmp() actually perform better? A generic implementation, at
least, might perform worse because it cannot assume that its arguments
are well aligned. I don't know whether GCC is smarter than that (my
past experience is that it is not).
--
"I don't normally do acked-by's. I think it's my way of avoiding
getting blamed when it all blows up." Andrew Morton
More information about the dev
mailing list