Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp99223iof; Sun, 5 Jun 2022 22:20:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQSbJ0FltpzzHcIDDM3pAq9klp//LkDkHYWQqfGsH1mXPx8WgDAidmSb02VhFhBFoaskWY X-Received: by 2002:a17:90b:4c52:b0:1e8:2af5:901e with SMTP id np18-20020a17090b4c5200b001e82af5901emr17773258pjb.180.1654492807332; Sun, 05 Jun 2022 22:20:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654492807; cv=none; d=google.com; s=arc-20160816; b=yHfZ++QbCKQsaDCP5CzpcK8j71+lyr2Y3GKKaZJIPOzBl/wQRPvuvqVdDMm4pWhF5+ B2dG57wcaViohk2Vp6eRGGRWkfOoMQYeEpEbvxM/DrKn4wktgJjeXi4VGp0e88rpClB3 7iDgEC6TZVmutMjtSZflaR4OmC0Dv2puVEfPHzRY2G5pmV9sSK43BEoiF6Bqmj7q/doh XeXdcVpO9S1Jo0Pe+IDfdNz2e+zMxaTHbrS+ieaGttx1vtzQjw7kutVwzCl5MSFlhTb1 J6IHhuhBD3jrKpQNcZFAqALBdnWOn3xEZO+mM8yGs3twKtxTUWPgSh8Ipr+EDUrHK5ar HdfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8JvwmShK36JbGZpwHMBC+vzAG7jiQCe0Nl092GO9G3o=; b=FVTxyICDPer0y/mr2BYr2xDL9DWihyz97LmxUEBvMN4SV5TM9H/Vay8rbOB07O8phz hj8XEGjZRfxtPN2RiYFeGRW7PwCMka+MtU5vRUZNuiGgayywTDoMd17npaP8J0HEN2p/ l+tYgkngfr4UtDJwoC1SiEdi7mxFRV+UuuYrlH3b0iVA7TXVbxidz3/Ubf/Ar5xRo5DZ pCAPJ0NO7QzyLz3hkzmk55a7yLkihqd8Y5uHFZnJThdafEhrlgGwX3qlnlZvUm813d4C owZf80OBNjKQMNKYr5gCnJ3Csp4jak9M0X12j/QuP0K/Dn14pRzi1D1lw5pdOYqxI/oX WN0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yXRH6WWz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id q17-20020a656851000000b003fcbc8b5e7dsi20532585pgt.811.2022.06.05.22.20.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:20:07 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yXRH6WWz; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 868081C8655; Sun, 5 Jun 2022 21:27:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345677AbiFCRyh (ORCPT + 99 others); Fri, 3 Jun 2022 13:54:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345936AbiFCRue (ORCPT ); Fri, 3 Jun 2022 13:50:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A2B95643D; Fri, 3 Jun 2022 10:46:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 84EF960C3D; Fri, 3 Jun 2022 17:46:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97A3FC385B8; Fri, 3 Jun 2022 17:46:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654278401; bh=zzK0D5fYTBTycaZxn6iEpDan7mnQBFt5zYd/KNuOLdE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yXRH6WWzonvqhOthkE8lpFbHEJ0Im6NEbZZnz8mNoIUDrdzunNxDkSaShC0Bp62zs cmull4fF3UsTPO6CvvbU3CeG9I5g4XWVPDpJvN2Hcrw7fWgnEO3dJklRJnonfhLhQC byO6r5zT9Vz5Ny4DjF8sx0MGVavpT7N7Ntj9PJfs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Wilder , Dylan Hung , Joel Stanley , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 05/53] net: ftgmac100: Disable hardware checksum on AST2600 Date: Fri, 3 Jun 2022 19:42:50 +0200 Message-Id: <20220603173818.875263971@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220603173818.716010877@linuxfoundation.org> References: <20220603173818.716010877@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joel Stanley [ Upstream commit 6fd45e79e8b93b8d22fb8fe22c32fbad7e9190bd ] The AST2600 when using the i210 NIC over NC-SI has been observed to produce incorrect checksum results with specific MTU values. This was first observed when sending data across a long distance set of networks. On a local network, the following test was performed using a 1MB file of random data. On the receiver run this script: #!/bin/bash while [ 1 ]; do # Zero the stats nstat -r > /dev/null nc -l 9899 > test-file # Check for checksum errors TcpInCsumErrors=$(nstat | grep TcpInCsumErrors) if [ -z "$TcpInCsumErrors" ]; then echo No TcpInCsumErrors else echo TcpInCsumErrors = $TcpInCsumErrors fi done On an AST2600 system: # nc 9899 < test-file The test was repeated with various MTU values: # ip link set mtu 1410 dev eth0 The observed results: 1500 - good 1434 - bad 1400 - good 1410 - bad 1420 - good The test was repeated after disabling tx checksumming: # ethtool -K eth0 tx-checksumming off And all MTU values tested resulted in transfers without error. An issue with the driver cannot be ruled out, however there has been no bug discovered so far. David has done the work to take the original bug report of slow data transfer between long distance connections and triaged it down to this test case. The vendor suspects this this is a hardware issue when using NC-SI. The fixes line refers to the patch that introduced AST2600 support. Reported-by: David Wilder Reviewed-by: Dylan Hung Signed-off-by: Joel Stanley Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/faraday/ftgmac100.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index 5bc11d1bb9df..eea4bd3116e8 100644 --- a/drivers/net/ethernet/faraday/ftgmac100.c +++ b/drivers/net/ethernet/faraday/ftgmac100.c @@ -1893,6 +1893,11 @@ static int ftgmac100_probe(struct platform_device *pdev) /* AST2400 doesn't have working HW checksum generation */ if (np && (of_device_is_compatible(np, "aspeed,ast2400-mac"))) netdev->hw_features &= ~NETIF_F_HW_CSUM; + + /* AST2600 tx checksum with NCSI is broken */ + if (priv->use_ncsi && of_device_is_compatible(np, "aspeed,ast2600-mac")) + netdev->hw_features &= ~NETIF_F_HW_CSUM; + if (np && of_get_property(np, "no-hw-checksum", NULL)) netdev->hw_features &= ~(NETIF_F_HW_CSUM | NETIF_F_RXCSUM); netdev->features |= netdev->hw_features; -- 2.35.1