]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: Extract the correct ethtype from the skb for tx csum offload
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Fri, 5 Oct 2018 07:04:40 +0000 (09:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Oct 2018 21:52:43 +0000 (14:52 -0700)
commit62b3243808185c64041b0623a96334c34971c9bf
treeb6e41c36935045703f589f169f1f6a3554adc272
parent632bb67f95fddf2d626331877f34604f37c82ab8
net: mvpp2: Extract the correct ethtype from the skb for tx csum offload

When offloading the L3 and L4 csum computation on TX, we need to extract
the l3_proto from the ethtype, independently of the presence of a vlan
tag.

The actual driver uses skb->protocol as-is, resulting in packets with
the wrong L4 checksum being sent when there's a vlan tag in the packet
header and checksum offloading is enabled.

This commit makes use of vlan_protocol_get() to get the correct ethtype
regardless the presence of a vlan tag.

Fixes: dc37d05f9885 ("ethernet: Add new driver for Marvell Armada 375 network unit")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c