Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp254550ybg; Thu, 17 Oct 2019 22:29:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6udHGj+PoaOYdRwuN9xy7hXuUIDGuu3jRUF4cigeermmbNlwZwc2Vlvb5zfpo6zPQGg/e X-Received: by 2002:a17:906:7c57:: with SMTP id g23mr7032654ejp.116.1571376572922; Thu, 17 Oct 2019 22:29:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571376572; cv=none; d=google.com; s=arc-20160816; b=emB5lI1wkNaLXOu1FyeXTLmug0kT2O5/qxdycrMo3Pig4pNTipryXiMUYavG0r8izq 3KynJ2seWlahjpjoIqvfW8RFAzvSU9lhFyHH14CxrWWa+xNtanaakU/BMw6rc8lLQf3T icb+9PEt66lJ7gywtbEIQYm3vqKMMVCg02ZHT1Te0fKm5DZT7FnRkyvLHadsokk5nP4r hnV2q/Nd5iyaqjcQNFodfYyhzbA6cykTp11DoJzueM/mGpIGPpZVXm5slVLbzHQ6wucn 4qu7FwVbxLM6DoNLjAVaLIvswZDNkQgKK0L9E+bgh/6uu7tHgh22z10Y8t6CW+DdYu6e q6vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=vVg+4A0QfJRnTAd34qew4ihwVixK6ZjeIStrHI9Da5w=; b=Y2HLNbLoFYHTexj59SdXUaeNG57Ein/cnqTS1nPMQkXJ8XNuEsGh0AvVeJYIiVbUmW 9C2FoJsO1ejMNrMKYsnZr6eqRcdj1M3BWg83qcK7jV6uT/ccK4NUMue/isc5taQuc9h7 i/gLIVasWjA2FzYqOGmevopyNeSuJ59e2mGIX1l6zZVH73e3IFWEqt8LOysragffKawM XD3H4gLLy3+17UvpC12TdyG3lAMT+lz+bzrxalNxzelW0jDC2h43OB2OtvJ2+KE2gLHe OlNHqRg9MyeDGMXJflBHsklL/0J9jbxZQnJHcQ4O4ZO8n0dsK8tGAEpIUpl3VuuI2Xmj Sc1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g38si3082756edg.127.2019.10.17.22.29.09; Thu, 17 Oct 2019 22:29:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391353AbfJQB3V (ORCPT + 99 others); Wed, 16 Oct 2019 21:29:21 -0400 Received: from gate.crashing.org ([63.228.1.57]:49928 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727593AbfJQB3V (ORCPT ); Wed, 16 Oct 2019 21:29:21 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x9H1Sgc9000334; Wed, 16 Oct 2019 20:28:42 -0500 Message-ID: <3a1176067b745fddfc625bbd142a41913ee3e3a1.camel@kernel.crashing.org> Subject: Re: [PATCH v2] ftgmac100: Disable HW checksum generation on AST2500 From: Benjamin Herrenschmidt To: Vijay Khemka , "David S. Miller" , Kate Stewart , Sven Van Asbroeck , Mark Brown , Bhupesh Sharma , YueHaibing , Mauro Carvalho Chehab , Luis Chamberlain , Thomas Gleixner , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "openbmc @ lists . ozlabs . org" , joel@jms.id.au, linux-aspeed@lists.ozlabs.org, sdasari@fb.com Date: Thu, 17 Oct 2019 12:28:41 +1100 In-Reply-To: <20191011213027.2110008-1-vijaykhemka@fb.com> References: <20191011213027.2110008-1-vijaykhemka@fb.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2019-10-11 at 14:30 -0700, Vijay Khemka wrote: > HW checksum generation is not working for AST2500, specially with > IPV6 > over NCSI. All TCP packets with IPv6 get dropped. By disabling this > it works perfectly fine with IPV6. As it works for IPV4 so enabled > hw checksum back for IPV4. > > Verified with IPV6 enabled and can do ssh. So while this probably works, I don't think this is the right approach, at least according to the comments in skbuff.h The driver should have handled unsupported csum via SW fallback already in ftgmac100_prep_tx_csum() Can you check why this didn't work for you ? Cheers, Ben. > Signed-off-by: Vijay Khemka > --- > Changes since v1: > Enabled IPV4 hw checksum generation as it works for IPV4. > > drivers/net/ethernet/faraday/ftgmac100.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/faraday/ftgmac100.c > b/drivers/net/ethernet/faraday/ftgmac100.c > index 030fed65393e..0255a28d2958 100644 > --- a/drivers/net/ethernet/faraday/ftgmac100.c > +++ b/drivers/net/ethernet/faraday/ftgmac100.c > @@ -1842,8 +1842,19 @@ 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; > + > + /* AST2500 doesn't have working HW checksum generation for IPV6 > + * but it works for IPV4, so disabling hw checksum and enabling > + * it for only IPV4. > + */ > + if (np && (of_device_is_compatible(np, "aspeed,ast2500-mac"))) > { > + netdev->hw_features &= ~NETIF_F_HW_CSUM; > + netdev->hw_features |= NETIF_F_IP_CSUM; > + } > + > if (np && of_get_property(np, "no-hw-checksum", NULL)) > - netdev->hw_features &= ~(NETIF_F_HW_CSUM | > NETIF_F_RXCSUM); > + netdev->hw_features &= ~(NETIF_F_HW_CSUM | > NETIF_F_RXCSUM > + | NETIF_F_IP_CSUM); > netdev->features |= netdev->hw_features; > > /* register network device */