RE: [PATCH] IPoIB: Stop lying about hard_header_len and use skb->cb to stash LL addresses

2 messages, 2 authors, 2012-02-08 · open the first message on its own page

RE: [PATCH] IPoIB: Stop lying about hard_header_len and use skb->cb to stash LL addresses

From: Eric Dumazet <hidden>
Date: 2012-02-08 07:50:24

Le mercredi 08 février 2012 à 07:29 +0000, Hefty, Sean a écrit :
quoted
OK, this works for me.  Definitely looks cleaner and also looks
obvious enough that it's probably even correct.
I tested this with Dave's patch and Eric's first patch against Linus' latest tree 3.3-rc2+, and things look good so far.

Thanks,
- Sean
Thanks for testing, I'll resend my (updated) patch today.



--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH] IPoIB: Stop lying about hard_header_len and use skb->cb to stash LL addresses

From: Or Gerlitz <hidden>
Date: 2012-02-08 14:34:17

On 2/8/2012 9:50 AM, Eric Dumazet wrote:
Le mercredi 08 février 2012 à 07:29 +0000, Hefty, Sean a écrit :
quoted
I tested this with Dave's patch and Eric's first patch against Linus' latest tree 3.3-rc2+, and things look good so far.
Thanks for testing, I'll resend my (updated) patch today.
same here, I used Roland's patch on top of net-next plus the below patch 
and got GRO to aggregate okay,
great doing! Eric, could you please post your work to Dave after 
Roland's patch is applied?

Or.
quoted hunk
diff --git a/net/core/dev.c b/net/core/dev.c
index f124947..9b8e2fa 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3491,14 +3491,20 @@ static inline gro_result_t
 __napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
 {
        struct sk_buff *p;
+       unsigned int maclen = skb->dev->hard_header_len;

        for (p = napi->gro_list; p; p = p->next) {
                unsigned long diffs;

                diffs = (unsigned long)p->dev ^ (unsigned long)skb->dev;
                diffs |= p->vlan_tci ^ skb->vlan_tci;
-               diffs |= compare_ether_header(skb_mac_header(p),
-                                             skb_gro_mac_header(skb));
+               if (maclen == ETH_HLEN)
+                       diffs |= compare_ether_header(skb_mac_header(p),
+                                                     
skb_gro_mac_header(skb));
+               else if (!diffs)
+                       diffs = memcmp(skb_mac_header(p),
+                                       skb_gro_mac_header(skb),
+                                       maclen);
                NAPI_GRO_CB(p)->same_flow = !diffs;
                NAPI_GRO_CB(p)->flush = 0;
        }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help