Skip to content

Commit af5cbc9

Browse files
Nimrod Andydavem330
authored andcommitted
net: fec: fix receive VLAN CTAG HW acceleration issue
The current driver support receive VLAN CTAG HW acceleration feature (NETIF_F_HW_VLAN_CTAG_RX) through software simulation. There calls the api .skb_copy_to_linear_data_offset() to skip the VLAN tag, but there have overlap between the two memory data point range. The patch just fix the issue. V2: Michael Grzeschik suggest to use memmove() instead of skb_copy_to_linear_data_offset(). Reported-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Fixes: 1b7bde6 ("net: fec: implement rx_copybreak to improve rx performance") Signed-off-by: Fugang Duan <B38611@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 5a3dba7 commit af5cbc9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/ethernet/freescale/fec_main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,8 +1479,7 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id)
14791479

14801480
vlan_packet_rcvd = true;
14811481

1482-
skb_copy_to_linear_data_offset(skb, VLAN_HLEN,
1483-
data, (2 * ETH_ALEN));
1482+
memmove(skb->data + VLAN_HLEN, data, ETH_ALEN * 2);
14841483
skb_pull(skb, VLAN_HLEN);
14851484
}
14861485

0 commit comments

Comments
 (0)