From: David Miller <davem@davemloft.net>
To: kyk.segfault@gmail.com
Cc: David.Laight@aculab.com, eric.dumazet@gmail.com,
netdev@vger.kernel.org, willemdebruijn.kernel@gmail.com
Subject: Re: [PATCH v3] net: Make skb_segment not to compute checksum if network controller supports checksumming
Date: Sat, 21 Mar 2020 20:06:34 -0700 (PDT) [thread overview]
Message-ID: <20200321.200634.534398039682553516.davem@davemloft.net> (raw)
In-Reply-To: <1584434318-27980-1-git-send-email-kyk.segfault@gmail.com>
From: Yadu Kishore <kyk.segfault@gmail.com>
Date: Tue, 17 Mar 2020 14:08:38 +0530
>
>> I think you can rebase and submit against net-next.
>
>> If your patch isn't active in the networking development patchwork instance,
>> it is not pending to be applied and you must resend it.
>
> Rebasing the patch on net-next and resending it.
>
> Problem:
> TCP checksum in the output path is not being offloaded during GSO
> in the following case:
> The network driver does not support scatter-gather but supports
> checksum offload with NETIF_F_HW_CSUM.
>
> Cause:
> skb_segment calls skb_copy_and_csum_bits if the network driver
> does not announce NETIF_F_SG. It does not check if the driver
> supports NETIF_F_HW_CSUM.
> So for devices which might want to offload checksum but do not support SG
> there is currently no way to do so if GSO is enabled.
>
> Solution:
> In skb_segment check if the network controller does checksum and if so
> call skb_copy_bits instead of skb_copy_and_csum_bits.
>
> Testing:
> Without the patch, ran iperf TCP traffic with NETIF_F_HW_CSUM enabled
> in the network driver. Observed the TCP checksum offload is not happening
> since the skbs received by the driver in the output path have
> skb->ip_summed set to CHECKSUM_NONE.
>
> With the patch ran iperf TCP traffic and observed that TCP checksum
> is being offloaded with skb->ip_summed set to CHECKSUM_PARTIAL.
> Also tested with the patch by disabling NETIF_F_HW_CSUM in the driver
> to cover the newly introduced if-else code path in skb_segment.
>
> Link: https://lore.kernel.org/netdev/CA+FuTSeYGYr3Umij+Mezk9CUcaxYwqEe5sPSuXF8jPE2yMFJAw@mail.gmail.com
> Signed-off-by: Yadu Kishore <kyk.segfault@gmail.com>
Willem, please review and ACK/NACK.
Thank you.
next prev parent reply other threads:[~2020-03-22 3:06 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-04 5:55 TCP checksum not offloaded during GSO Yadu Kishore
2020-02-05 21:43 ` Willem de Bruijn
2020-02-21 5:13 ` [PATCH] net: Make skb_segment not to compute checksum if network controller supports checksumming Yadu Kishore
2020-02-23 2:41 ` Willem de Bruijn
2020-02-28 5:24 ` Yadu Kishore
2020-02-28 14:30 ` Willem de Bruijn
2020-02-28 20:01 ` David Miller
2020-03-02 6:51 ` [PATCH v2] " Yadu Kishore
2020-03-02 8:42 ` Yadu Kishore
2020-03-02 15:19 ` David Laight
2020-03-03 9:15 ` Yadu Kishore
2020-03-03 9:56 ` David Laight
2020-03-05 6:32 ` Yadu Kishore
2020-03-05 16:06 ` Willem de Bruijn
2020-03-05 17:00 ` David Laight
2020-03-05 17:19 ` Eric Dumazet
2020-03-06 17:12 ` David Laight
2020-03-13 6:36 ` Yadu Kishore
2020-03-13 13:57 ` Willem de Bruijn
2020-03-13 14:04 ` David Laight
2020-03-13 18:05 ` David Miller
2020-03-17 8:38 ` [PATCH v3] " Yadu Kishore
2020-03-22 3:06 ` David Miller [this message]
2020-03-22 14:40 ` Willem de Bruijn
2020-03-23 20:00 ` David Miller
2020-03-22 19:53 ` [PATCH v2] " Tom Herbert
2020-03-23 9:15 ` David Laight
2020-02-06 12:13 ` TCP checksum not offloaded during GSO David Laight
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=20200321.200634.534398039682553516.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=David.Laight@aculab.com \
--cc=eric.dumazet@gmail.com \
--cc=kyk.segfault@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=willemdebruijn.kernel@gmail.com \
/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).