[openwrt/openwrt] ipq40xx: enable RX hash / CTAG TX offloading for single-phy

LEDE Commits lede-commits at lists.infradead.org
Sun Nov 1 09:31:31 EST 2020


blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/e73d866c6fc7dfad2fb7dd87345c90029bbda59d

commit e73d866c6fc7dfad2fb7dd87345c90029bbda59d
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Mon Oct 26 21:59:47 2020 +0100

    ipq40xx: enable RX hash / CTAG TX offloading for single-phy
    
    This re-enables offloading features disabled by
    commit 9da2b567605b ("ipq40xx: fix ethernet vlan double tagging").
    
    Single-PHY devices use port-based VLANs on the switch, therefore no
    S-TAG magic is involved here. Re-enabling these features restores
    throughput back to 950 Mbit/s.
    
    Reported-by: Jannis Pinter <jannis at pinterjann.is>
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 .../files/drivers/net/ethernet/qualcomm/essedma/edma_axi.c       | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma_axi.c b/target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma_axi.c
index 50335b0d14..49ee31a1bd 100644
--- a/target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma_axi.c
+++ b/target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma_axi.c
@@ -978,11 +978,20 @@ static int edma_axi_probe(struct platform_device *pdev)
 		edma_netdev[i]->wanted_features = NETIF_F_HW_CSUM | NETIF_F_SG |
 					     NETIF_F_TSO | NETIF_F_GRO;
 
+		if (of_property_read_bool(np, "qcom,single-phy") && edma_cinfo->num_gmac == 1)
+			edma_netdev[i]->features |= NETIF_F_HW_VLAN_CTAG_TX;
+
 #ifdef CONFIG_RFS_ACCEL
 		edma_netdev[i]->features |=  NETIF_F_NTUPLE;
 		edma_netdev[i]->hw_features |=  NETIF_F_NTUPLE;
 		edma_netdev[i]->vlan_features |= NETIF_F_NTUPLE;
 		edma_netdev[i]->wanted_features |= NETIF_F_NTUPLE;
+		if (of_property_read_bool(np, "qcom,single-phy") && edma_cinfo->num_gmac == 1) {
+			edma_netdev[i]->features |= NETIF_F_RXHASH;
+			edma_netdev[i]->hw_features |= NETIF_F_RXHASH;
+			edma_netdev[i]->vlan_features |= NETIF_F_RXHASH;
+			edma_netdev[i]->wanted_features |= NETIF_F_RXHASH;
+		}
 #endif
 		edma_set_ethtool_ops(edma_netdev[i]);
 



More information about the lede-commits mailing list