linux/drivers/net/ethernet/broadcom/genet
Petri Gynther 7dd399130e net: bcmgenet: fix skb_len in bcmgenet_xmit_single()
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: 1c1008c793 ("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>
2016-03-24 15:11:40 -04:00
..
bcmgenet_wol.c net: bcmgenet: properly disable password matching 2015-03-05 21:15:21 -05:00
bcmgenet.c net: bcmgenet: fix skb_len in bcmgenet_xmit_single() 2016-03-24 15:11:40 -04:00
bcmgenet.h net: bcmgenet: fix dev->stats.tx_bytes accounting 2016-03-24 15:11:39 -04:00
bcmmii.c net: bcmgenet: Properly configure PHY to ignore interrupt 2016-01-21 10:48:51 -08:00
Makefile net: bcmgenet: add Wake-on-LAN support code 2014-07-21 16:04:31 -07:00