]> git.baikalelectronics.ru Git - kernel.git/commit
gro: more generic L2 header check
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 8 Feb 2012 08:51:50 +0000 (08:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Feb 2012 23:26:54 +0000 (18:26 -0500)
commitec01027ff5b4b34a7b3d054a3d83a6e8514e0967
tree9e1dab3a4e055c313aae8b78747d08c201dc91b6
parenta04a631fb4cabd0b9feab28acd98e4a23767439f
gro: more generic L2 header check

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 <eric.dumazet@gmail.com>
Reported-by: Shlomo Pongratz <shlomop@mellanox.com>
Cc: Roland Dreier <roland@kernel.org>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c