Re: [net-next v3 08/12] net: bnxt: Implement software USO

From: Joe Damato

Date: Thu Mar 19 2026 - 13:19:45 EST


On Thu, Mar 19, 2026 at 05:11:03PM +0530, Pavan Chebbi wrote:
> <...>
>
> > +
> > + hdr_len = tso_start(skb, &tso);
> > + mss = skb_shinfo(skb)->gso_size;
> > + total_payload = skb->len - hdr_len;
> > + num_segs = DIV_ROUND_UP(total_payload, mss);
> > +
> > + /* Zero the csum fields so tso_build_hdr will propagate zeroes into
> > + * every segment header. HW csum offload will recompute from scratch.
> > + */
> > + udp_hdr(skb)->check = 0;
> > + if (!tso.ipv6)
> > + ip_hdr(skb)->check = 0;
> > +
> > + if (unlikely(num_segs <= 1))
> > + return NETDEV_TX_OK;
>
> goto drop would be more appropriate?

Yes, you are right. Good catch. Will fix it in the v4; thanks for reviewing!