From patchwork Wed Oct 28 00:10:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Bauer X-Patchwork-Id: 1389071 X-Patchwork-Delegate: mail@david-bauer.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=david-bauer.net Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=UXtrStOU; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CLTXv33Rlz9s0b for ; Wed, 28 Oct 2020 11:12:30 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=oIhYpn4ig0dm6g9BQlfQuHUZZZqPTcvL1DNS1LTIdnc=; b=UXtrStOUP9jo8c7Ck1AiDeDkDa +OE73WHdwHEi4AMTwJZYynQWZDaEOf/DRxoq8JuKm+RGlsB81HVcWM9xt/ETSdwSKtQL7Syofh6Jl yIdCPfv0QJVbNblgjr/UouU/s9O2WMSYCLZf82DJ5OM4spidNeGNzSM7JmRwrYRouGGkZeH974sMB P3iT8JS2aUwKENW/4wn/zqHI46hslA8H48DI4gWnDbaX5LVusTu6Rn4z2OBE+iaK7BJm3+Miw+k1g uxHIqtG6zoz5g98CWUB7XXEpgHbEmmuY/7HAIbzQ2QfWd7eX0GYqorw+qJFs6ijwPkeAe8lCBEz/I 33X2mLPw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXZ2p-0006c9-Lm; Wed, 28 Oct 2020 00:10:27 +0000 Received: from mars.blocktrron.ovh ([51.254.112.43] helo=mail.blocktrron.ovh) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXZ2m-0006bh-V9 for openwrt-devel@lists.openwrt.org; Wed, 28 Oct 2020 00:10:26 +0000 Received: from localhost.localdomain (p200300e53f0ed40016457e6f36a720c8.dip0.t-ipconnect.de [IPv6:2003:e5:3f0e:d400:1645:7e6f:36a7:20c8]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.blocktrron.ovh (Postfix) with ESMTPSA id 0709222AE0; Wed, 28 Oct 2020 01:10:20 +0100 (CET) From: David Bauer To: openwrt-devel@lists.openwrt.org Subject: [PATCH] ipq40xx: enable RX hash / CTAG TX offloading for single-phy Date: Wed, 28 Oct 2020 01:10:10 +0100 Message-Id: <20201028001010.93459-1-mail@david-bauer.net> X-Mailer: git-send-email 2.29.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201027_201025_137654_AF61003C X-CRM114-Status: GOOD ( 11.07 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jannis Pinter Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org 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 Signed-off-by: David Bauer --- .../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]);