This is a note to let you know that I've just added the patch titled
gro: more generic L2 header check
to the 3.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
gro-more-generic-l2-header-check.patch
and it can be found in the queue-3.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 4b2fedcbf6f9a933d4e2b74f2f20edcffe75fdd5 Mon Sep 17 00:00:00 2001
From: Eric Dumazet <[email protected]>
Date: Wed, 8 Feb 2012 08:51:50 +0000
Subject: gro: more generic L2 header check
From: Eric Dumazet <[email protected]>
[ Upstream commit 5ca3b72c5da47d95b83857b768def6172fbc080a ]
Shlomo Pongratz reported GRO L2 header check was suited for Ethernet
only, and failed on IB/ipoib traffic.
He provided a patch faking a zeroed header to let GRO aggregates frames.
Roland Dreier, Herbert Xu, and others suggested we change GRO L2 header
check to be more generic, ie not assuming L2 header is 14 bytes, but
taking into account hard_header_len.
__napi_gro_receive() has special handling for the common case (Ethernet)
to avoid a memcmp() call and use an inline optimized function instead.
Signed-off-by: Eric Dumazet <[email protected]>
Reported-by: Shlomo Pongratz <[email protected]>
Cc: Roland Dreier <[email protected]>
Cc: Or Gerlitz <[email protected]>
Cc: Herbert Xu <[email protected]>
Tested-by: Sean Hefty <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
net/core/dev.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3434,14 +3434,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;
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.0/ipv4-fix-redirect-handling.patch
queue-3.0/gro-more-generic-l2-header-check.patch
queue-3.0/netpoll-netpoll_poll_dev-should-access-dev-flags.patch
queue-3.0/3c59x-shorten-timer-period-for-slave-devices.patch
queue-3.0/ipv4-reset-flowi-parameters-on-route-connect.patch
queue-3.0/tcp_v4_send_reset-binding-oif-to-iif-in-no-sock-case.patch
queue-3.0/net_sched-bug-in-netem-reordering.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html