1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Sun, 13 Sep 2020 08:27:24 +0200
3 Subject: [PATCH] net: ethernet: mtk_eth_soc: set PPE flow hash as skb hash
6 This improves GRO performance
8 Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
12 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
13 @@ -1316,6 +1316,10 @@ static int mtk_poll_rx(struct napi_struc
14 skb->protocol = eth_type_trans(skb, netdev);
17 + hash = trxd.rxd4 & GENMASK(13, 0);
18 + if (hash != GENMASK(13, 0))
19 + skb_set_hash(skb, hash, PKT_HASH_TYPE_L4);
21 if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX &&
22 (trxd.rxd2 & RX_DMA_VTAG))
23 __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),