public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Damato <joe@dama.to>
To: Eric Dumazet <edumazet@google.com>
Cc: netdev@vger.kernel.org, Michael Chan <michael.chan@broadcom.com>,
	Pavan Chebbi <pavan.chebbi@broadcom.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	horms@kernel.org, linux-kernel@vger.kernel.org, leon@kernel.org
Subject: Re: [net-next v7 07/10] net: bnxt: Implement software USO
Date: Thu, 2 Apr 2026 09:45:53 -0700	[thread overview]
Message-ID: <ac6dQa1HRrfcpBhX@devvm20253.cco0.facebook.com> (raw)
In-Reply-To: <CANn89i+dWeUvZW-sLU5ozZM5rHgDY1mXKOXM=EjdhJanumqVsw@mail.gmail.com>

On Wed, Apr 01, 2026 at 05:35:14PM -0700, Eric Dumazet wrote:
> On Wed, Apr 1, 2026 at 4:38 PM Joe Damato <joe@dama.to> wrote:
> >

[...]

> > +       /* Zero the csum fields so tso_build_hdr will propagate zeroes into
> > +        * every segment header. HW csum offload will recompute from scratch.
> > +        */
> 
> We might need a call to skb_cow_head(skb, 0) before changing ->check
> (or anything in skb->head)
> 
> Alternative would be to perform the clears after each tso_build_hdr()
> and leave skb->head untouched.

Thanks for the careful review; I appreciate your time and energy.

I'll remove the existing clears you pointed and perform the clear after each
tso_build_hdr() as you suggested with something like:

@@ -103,6 +96,7 @@ netdev_tx_t bnxt_sw_udp_gso_xmit(struct bnxt *bp,
                unsigned int offset;
                dma_addr_t dma_addr;
                struct tx_bd *txbd;
+               struct udphdr *uh;
                void *this_hdr;
                int bd_count;
                __le32 csum;
@@ -116,6 +110,17 @@ netdev_tx_t bnxt_sw_udp_gso_xmit(struct bnxt *bp,

                tso_build_hdr(skb, this_hdr, &tso, seg_payload, last);

+               /* Zero stale csum fields copied from the original skb;
+                * HW offload recomputes from scratch.
+                */
+               uh = this_hdr + skb_transport_offset(skb);
+               uh->check = 0;
+               if (!tso.ipv6) {
+                       struct iphdr *iph = this_hdr + skb_network_offset(skb);
+
+                       iph->check = 0;
+               }

  reply	other threads:[~2026-04-02 16:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-01 23:37 [net-next v7 00/10] Add TSO map-once DMA helpers and bnxt SW USO support Joe Damato
2026-04-01 23:37 ` [net-next v7 01/10] net: tso: Introduce tso_dma_map and helpers Joe Damato
2026-04-01 23:37 ` [net-next v7 02/10] net: bnxt: Export bnxt_xmit_get_cfa_action Joe Damato
2026-04-01 23:37 ` [net-next v7 03/10] net: bnxt: Add a helper for tx_bd_ext Joe Damato
2026-04-01 23:37 ` [net-next v7 04/10] net: bnxt: Use dma_unmap_len for TX completion unmapping Joe Damato
2026-04-01 23:37 ` [net-next v7 05/10] net: bnxt: Add TX inline buffer infrastructure Joe Damato
2026-04-01 23:37 ` [net-next v7 06/10] net: bnxt: Add boilerplate GSO code Joe Damato
2026-04-01 23:37 ` [net-next v7 07/10] net: bnxt: Implement software USO Joe Damato
2026-04-02  0:35   ` Eric Dumazet
2026-04-02 16:45     ` Joe Damato [this message]
2026-04-02 17:30       ` Eric Dumazet
2026-04-01 23:37 ` [net-next v7 08/10] net: bnxt: Add SW GSO completion and teardown support Joe Damato
2026-04-01 23:37 ` [net-next v7 09/10] net: bnxt: Dispatch to SW USO Joe Damato
2026-04-01 23:37 ` [net-next v7 10/10] selftests: drv-net: Add USO test Joe Damato

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=ac6dQa1HRrfcpBhX@devvm20253.cco0.facebook.com \
    --to=joe@dama.to \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.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