Commit 563d9192 authored by Nimrod Andy's avatar Nimrod Andy Committed by Sasha Levin

net: fec: fix receive VLAN CTAG HW acceleration issue

[ Upstream commit af5cbc98 ]

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: default avatarMichael Grzeschik <m.grzeschik@pengutronix.de>
Fixes: 1b7bde6d ("net: fec: implement rx_copybreak to improve rx performance")
Signed-off-by: default avatarFugang Duan <B38611@freescale.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 06e0dd73
...@@ -1464,8 +1464,7 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id) ...@@ -1464,8 +1464,7 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id)
vlan_packet_rcvd = true; vlan_packet_rcvd = true;
skb_copy_to_linear_data_offset(skb, VLAN_HLEN, memmove(skb->data + VLAN_HLEN, data, ETH_ALEN * 2);
data, (2 * ETH_ALEN));
skb_pull(skb, VLAN_HLEN); skb_pull(skb, VLAN_HLEN);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment