Thread (13 messages) flat view 13 messages, 3 authors, 2014-01-09

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

From: Or Gerlitz <hidden>
Date: 2014-01-09 07:14:40

On 09/01/2014 09:09, Tom Herbert wrote:
quoted
+       for (p = *head; p; p = p->next) {
quoted
+               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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help