[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <76733CEB-14E1-4158-B642-5B7F74F97DE4@fb.com>
Date: Wed, 11 Sep 2019 18:50:41 +0000
From: Vijay Khemka <vijaykhemka@...com>
To: Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
YueHaibing <yuehaibing@...wei.com>, Andrew Lunn <andrew@...n.ch>,
Kate Stewart <kstewart@...uxfoundation.org>,
"Mauro Carvalho Chehab" <mchehab+samsung@...nel.org>,
Luis Chamberlain <mcgrof@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: "openbmc @ lists . ozlabs . org" <openbmc@...ts.ozlabs.org>,
Sai Dasari <sdasari@...com>,
"linux-aspeed@...ts.ozlabs.org" <linux-aspeed@...ts.ozlabs.org>
Subject: Re: [PATCH] ftgmac100: Disable HW checksum generation on AST2500
On 9/11/19, 11:34 AM, "Florian Fainelli" <f.fainelli@...il.com> wrote:
On 9/11/19 11:30 AM, Vijay Khemka wrote:
>
>
> On 9/10/19, 4:08 PM, "Linux-aspeed on behalf of Vijay Khemka" <linux-aspeed-bounces+vijaykhemka=fb.com@...ts.ozlabs.org on behalf of vijaykhemka@...com> wrote:
>
>
>
> On 9/10/19, 3:50 PM, "Linux-aspeed on behalf of Vijay Khemka" <linux-aspeed-bounces+vijaykhemka=fb.com@...ts.ozlabs.org on behalf of vijaykhemka@...com> wrote:
>
>
>
> On 9/10/19, 3:05 PM, "Florian Fainelli" <f.fainelli@...il.com> wrote:
>
> On 9/10/19 2:37 PM, 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.
> >
> > Verified with IPV6 enabled and can do ssh.
>
> How about IPv4, do these packets have problem? If not, can you continue
> advertising NETIF_F_IP_CSUM but take out NETIF_F_IPV6_CSUM?
>
> I changed code from (netdev->hw_features &= ~NETIF_F_HW_CSUM) to
> (netdev->hw_features &= ~NETIF_F_ IPV6_CSUM). And it is not working.
> Don't know why. IPV4 works without any change but IPv6 needs HW_CSUM
> Disabled.
>
> Now I changed to
> netdev->hw_features &= (~NETIF_F_HW_CSUM) | NETIF_F_IP_CSUM;
> And it works.
>
> I investigated more on these features and found that we cannot set NETIF_F_IP_CSUM
> While NETIF_F_HW_CSUM is set. So I disabled NETIF_F_HW_CSUM first and enabled
> NETIF_F_IP_CSUM in next statement. And it works fine.
>
> But as per line 166 in include/linux/skbuff.h,
> * NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM are being deprecated in favor of
> * NETIF_F_HW_CSUM. New devices should use NETIF_F_HW_CSUM to indicate
> * checksum offload capability.
>
> Please suggest which of below 2 I should do. As both works for me.
> 1. Disable completely NETIF_F_HW_CSUM and do nothing. This is original patch.
> 2. Enable NETIF_F_IP_CSUM in addition to 1. I can have v2 if this is accepted.
Sounds like 2 would leave the option of offloading IPv4 checksum
offload, so that would be a better middle group than flat out disable
checksum offload for both IPv4 and IPv6, no?
Sounds good, I will have v2 after lot more testing.
--
Florian
Powered by blists - more mailing lists