From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D5121C35274 for ; Mon, 18 Dec 2023 16:24:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :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=kICt1Oh70daeotgQ6X5StrrfDKTN47T9/tv/jNHmyO8=; b=0rlpfjbsyIuzpn cW+sSLLj5wem7/RK+Muc26Zu3P8h2YgCpxN97Vhd+uV0UP83YqSn2CNV86N0ozVHjXs6nvvzFvt/v kAjqeWsYNmS9NlVpkDu99IJqbUWjO3K+VV6YfqvGrS37rr9iWIj0cOyanoIA5ri6n/bD6P2XTpdA/ N/Q1EZlLIEEChJR2IpHM1OQe912eOWbYp7qc9Op2porz6RGO0eEG9eLieKvYxChZl/yTv4DafOMHy rLlC0uW6E+FPUXczFKUYX91wEuB/z+U7yq0xm+l3iYKYJEBDkRl+IhLAsJ9WF6ry6ITsYz66gK8Pf Tg93m/4S6EioIGJGrkmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rFGP5-00BQvW-0m; Mon, 18 Dec 2023 16:23:39 +0000 Received: from relay5-d.mail.gandi.net ([2001:4b98:dc4:8::225]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rFGOw-00BQqz-2y for linux-arm-kernel@lists.infradead.org; Mon, 18 Dec 2023 16:23:32 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id AAF2B1C000F; Mon, 18 Dec 2023 16:23:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702916597; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=zAEs7W5BJdH6/zjSmegRrvrb82LpsDg5zlUYcijXjOc=; b=eanC8c+7R5g0+7Ngr4tE6l+5Ch6wDBHCAs7+WP8jSaGfxj2bbKcsV7kAI0FIE49LK2jdA7 E49bqvJs6EA/cSu85otAKm5zXWNFqRrv+PckBRFhLWRMPRKoVyFoxC2Lu5VhoaGbdp3nFL lzBhJbhxuOVta0HFgjmo8g8zHDWQ7ksZGqPpxdBd7Ynvxqp3ODo7oQklDvruUECRoXStLT QhoWbTPq0p79G6kKqG65eJer673lisH/fHxj7GntFd7TnMxrzNkgrpTlVGMG8TtHJbTixO 77i7FJom1jahZQjmEyPO4ZrGLjC/ijPOJUoKB2xtaZvrN/FbNiMEbbmzNpEjcg== From: Romain Gantois To: Alexandre Torgue , Jose Abreu Cc: Romain Gantois , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Miquel Raynal , Maxime Chevallier , Sylvain Girard , Pascal EBERHARD , Richard Tresidder , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH net 0/1] Prevent DSA tags from breaking COE Date: Mon, 18 Dec 2023 17:23:22 +0100 Message-ID: <20231218162326.173127-1-romain.gantois@bootlin.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-GND-Sasl: romain.gantois@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231218_082331_112200_030016DD X-CRM114-Status: GOOD ( 10.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello everyone, This is a bugfix for an issue that was recently brought up in two reports: https://lore.kernel.org/netdev/c57283ed-6b9b-b0e6-ee12-5655c1c54495@bootlin.com/ https://lore.kernel.org/netdev/e5c6c75f-2dfa-4e50-a1fb-6bf4cdb617c2@electromag.com.au/ The Checksum Offloading Engine of some stmmac cores (e.g. DWMAC1000) computes an incorrect checksum when presented with DSA-tagged packets. This causes all TCP/UDP transfers to break when the stmmac device is connected to the CPU port of a DSA switch. The main change introduced by this series is a new stmmac dma feature that stmmac_mac_link_up() can check to detect cores that have DSA-incompatible COEs. If the flag is set and the netdevice uses DSA, stmmac_xmit() will complete checksumming in software instead of offloading it. I've run some iperf3 tests and the TX hotpath performance doesn't seem to be degraded by the field added to dma_features. Best Regards, Romain Romain Gantois (1): net: stmmac: Prevent DSA tags from breaking COE drivers/net/ethernet/stmicro/stmmac/common.h | 1 + .../net/ethernet/stmicro/stmmac/dwmac1000_dma.c | 1 + .../net/ethernet/stmicro/stmmac/stmmac_main.c | 16 +++++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) -- 2.43.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel