From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-aspeed@lists.ozlabs.org
Subject: [PATCH] ftgmac100: Disable HW checksum generation on AST2500
Date: Wed, 11 Sep 2019 11:34:24 -0700 [thread overview]
Message-ID: <c9876340-c8d0-ba8b-2ae1-9900958f1834@gmail.com> (raw)
In-Reply-To: <8A8392C8-5E5E-444D-AB1B-E0FAD3C29425@fb.com>
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 at lists.ozlabs.org on behalf of vijaykhemka@fb.com> wrote:
>
>
>
> On 9/10/19, 3:50 PM, "Linux-aspeed on behalf of Vijay Khemka" <linux-aspeed-bounces+vijaykhemka=fb.com at lists.ozlabs.org on behalf of vijaykhemka@fb.com> wrote:
>
>
>
> On 9/10/19, 3:05 PM, "Florian Fainelli" <f.fainelli@gmail.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?
--
Florian
next prev parent reply other threads:[~2019-09-11 18:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190910213734.3112330-1-vijaykhemka@fb.com>
2019-09-10 22:05 ` [PATCH] ftgmac100: Disable HW checksum generation on AST2500 Florian Fainelli
2019-09-10 22:13 ` Vijay Khemka
2019-09-10 22:48 ` Vijay Khemka
2019-09-10 23:07 ` Vijay Khemka
2019-09-11 18:30 ` Vijay Khemka
2019-09-11 18:34 ` Florian Fainelli [this message]
2019-09-11 18:50 ` Vijay Khemka
2019-09-11 14:48 ` Joel Stanley
2019-09-11 17:44 ` Vijay Khemka
2019-10-09 4:37 ` Benjamin Herrenschmidt
2019-10-09 18:18 ` Oskar Senft
2019-10-10 0:09 ` Benjamin Herrenschmidt
2019-10-09 18:20 ` Oskar Senft
2019-10-10 19:15 ` Vijay Khemka
2019-10-11 3:10 ` Benjamin Herrenschmidt
2019-10-11 21:28 ` Vijay Khemka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c9876340-c8d0-ba8b-2ae1-9900958f1834@gmail.com \
--to=f.fainelli@gmail.com \
--cc=linux-aspeed@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox