Subject: Re: [PATCH net-next V3 1/3] net: Add GRO support for UDP encapsulating protocols

From: Or Gerlitz <[email-masked]>
Date: Thu, 9 Jan 2014 09:14:31 +0200

On 09/01/2014 09:09, Tom Herbert wrote:
>> +       for (p = *head; p; p = p->next) {
>> >+               if (!NAPI_GRO_CB(p)->same_flow)
>> >+                       continue;
>> >+
>> >+               uh2 = (struct udphdr   *)(p->data + off);
>> >+               if ((*(u32 *)&uh->source != *(u32 *)&uh2->source)) {
>> >+                       NAPI_GRO_CB(p)->same_flow = 0;
>> >+                       continue;
>> >+               }
>> >+               goto found;
> I don't believe this is correct. If you exit on the first match, skb's
> that follow in the list can still be marked as same_flow. You need to
> walk the whole list I believe (just get rid of the goto).
>

Good catch, will fix.

Looking on the ipv4 and gre gro_receive callbacks they indeed go over 
all the list where the tcp gro_receive code does allow itself do goto 
found, probably b/c they are last in the chain?