bnx2x: disable GSO where gso_size is too big for hardware
authorDaniel Axtens <dja@axtens.net>
Wed, 31 Jan 2018 03:15:34 +0000 (14:15 +1100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Feb 2018 14:36:03 +0000 (09:36 -0500)
commit8914a595110a6eca69a5e275b323f5d09e18f4f9
tree0f9864224175e08f9570804f2be150f459cf37e8
parent2b16f048729bf35e6c28a40cbfad07239f9dcd90
bnx2x: disable GSO where gso_size is too big for hardware

If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:

bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT_LIST_INDEX 0x2
bnx2x: [bnx2x_mc_assert:736(enP24p1s0f0)]XSTORM_ASSERT_INDEX 0x0 = 0x00000000 0x25e43e47 0x00463e01 0x00010052
bnx2x: [bnx2x_mc_assert:750(enP24p1s0f0)]Chip Revision: everest3, FW Version: 7_13_1
... (dump of values continues) ...

Detect when the mac length of a GSO packet is greater than the maximum
packet size (9700 bytes) and disable GSO.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c