linux-aspeed.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linux-aspeed@lists.ozlabs.org
Subject: [PATCH v2] ftgmac100: Disable HW checksum generation on AST2500
Date: Sat, 19 Oct 2019 11:03:08 +1100	[thread overview]
Message-ID: <0ef567e985ce3fe821cbd80265f85a35d16be373.camel@kernel.crashing.org> (raw)
In-Reply-To: <529EF9B4-DFDE-4DB7-BE26-3AED8D814134@fb.com>

On Fri, 2019-10-18 at 22:50 +0000, Vijay Khemka wrote:
> I don't have much understanding of IP Stack but I went through code details and 
> you are right and found that it should fallback to SW calculation for IPV6 but it doesn't
> happen because ftgmac100_hard_start_xmit checks for CHECKSUM_PARTIAL before
> setting HW checksum and calling ftgmac100_prep_tx_csum function. And in my 
> understanding, this value is set CHECKSUM_PARTIAL in IP stack. I looked up IP stack for
> IPV6, file net/ipv6/ip6_output.c, function __ip6_append_data: here it sets 
> CHECKSUM_PARTIAL only for UDP packets not for TCP packets. Please look at line
>  number 1880. This could be an issue we are seeing here as why
> ftgmac100_prep_tx_csum is not getting triggered for IPV6 with TCP. Please correct
> me if my understanding is wrong.
>     

Not entirely sure. tcp_v6_send_response() in tcp_ipv6.c does set
CHECKSUM_PARTIAL as well. I don't really know how things are being
handled in that part of the network stack though.

From a driver perspective, if the value of ip_summed is not
CHECKSUM_PARTIAL it means we should not have to calculate any checksum.
At least that's my understanding here.

You may need to add some traces to the driver to see what you get in
there, what protocol indication etc... and analyze the corresponding
packets with something like tcpdump or wireshark on the other end.

Cheers,
Ben.



  reply	other threads:[~2019-10-19  0:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20191011213027.2110008-1-vijaykhemka@fb.com>
2019-10-17  1:28 ` [PATCH v2] ftgmac100: Disable HW checksum generation on AST2500 Benjamin Herrenschmidt
2019-10-17 22:01   ` Vijay Khemka
2019-10-17 23:14     ` Benjamin Herrenschmidt
2019-10-17 23:34       ` Benjamin Herrenschmidt
2019-10-18  0:06       ` Vijay Khemka
2019-10-18  0:32         ` Benjamin Herrenschmidt
2019-10-18 22:50           ` Vijay Khemka
2019-10-19  0:03             ` Benjamin Herrenschmidt [this message]
2019-10-19  1:31               ` Vijay Khemka
2019-10-19 10:25                 ` Benjamin Herrenschmidt
     [not found] <20190911194453.2595021-1-vijaykhemka@fb.com>
2019-09-17 19:34 ` Vijay Khemka
2019-09-24 17:26   ` Vijay Khemka
2019-10-10 19:20 ` Vijay Khemka
2019-10-11  1:16   ` Jakub Kicinski

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=0ef567e985ce3fe821cbd80265f85a35d16be373.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --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;
as well as URLs for NNTP newsgroup(s).