summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorPetri Gynther <pgynther@google.com>2016-03-24 11:27:21 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-05-10 10:26:25 +0200
commit1ba3fdf2e5b4bcd3ca5707c26cb96a868eb3b5b2 (patch)
treec56dfc83428209b2b231f24351e31fe2fd3d8183 /include/linux/timerqueue.h
parent67146e93e7335f7f8a318e4aec59f3cecccb5943 (diff)
net: bcmgenet: fix skb_len in bcmgenet_xmit_single()
commit 7dd399130efb5a454daf24075b7563d197114e39 upstream. skb_len needs to be skb_headlen(skb) in bcmgenet_xmit_single(). Fragmented skbs can have only Ethernet + IP + TCP headers (14+20+20=54 bytes) in the linear buffer, followed by the rest in fragments. Bumping skb_len to ETH_ZLEN would be incorrect for this case, as it would introduce garbage between TCP header and the fragment data. This also works with regular/non-fragmented small packets < ETH_ZLEN bytes. Successfully tested this on GENETv3 with 42-byte ARP frames. For testing, I used: ethtool -K eth0 tx-checksum-ipv4 off ethtool -K eth0 tx-checksum-ipv6 off echo 0 > /proc/sys/net/ipv4/tcp_timestamps Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Petri Gynther <pgynther@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions