From: Boris Pismenny <borisp@mellanox.com>
To: Alexander Duyck <alexander.duyck@gmail.com>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: David Miller <davem@davemloft.net>,
Network Development <netdev@vger.kernel.org>,
Saeed Mahameed <saeedm@mellanox.com>,
ogerlitz@mellanox.com, yossiku@mellanox.com
Subject: Re: [net-next 01/12] net/mlx5e: Add UDP GSO support
Date: Mon, 2 Jul 2018 22:17:04 +0300 [thread overview]
Message-ID: <adb762ac-7e9e-d4fa-b952-fb539355d7e1@mellanox.com> (raw)
In-Reply-To: <CAKgT0UdC2c04JagxW8S==-ymBfDZVd6f=7DcLUGjRqiiZA3BwA@mail.gmail.com>
On 7/2/2018 6:32 PM, Alexander Duyck wrote:
>
>
> On Mon, Jul 2, 2018 at 7:46 AM Willem de Bruijn
> <willemdebruijn.kernel@gmail.com
> <mailto:willemdebruijn.kernel@gmail.com>> wrote:
>
> On Mon, Jul 2, 2018 at 9:34 AM Willem de Bruijn
> <willemdebruijn.kernel@gmail.com
> <mailto:willemdebruijn.kernel@gmail.com>> wrote:
> >
> > On Mon, Jul 2, 2018 at 1:30 AM Boris Pismenny
> <borisp@mellanox.com <mailto:borisp@mellanox.com>> wrote:
> > >
> > >
> > >
> > > On 7/2/2018 4:45 AM, Willem de Bruijn wrote:
> > > >>> I've noticed that we could get cleaner code in our driver
> if we remove
> > > >>> these two lines from net/ipv4/udp_offload.c:
> > > >>> if (skb_is_gso(segs))
> > > >>> mss *= skb_shinfo(segs)->gso_segs;
> > > >>>
> > > >>> I think that this is correct in case of GSO_PARTIAL
> segmentation for the
> > > >>> following reasons:
> > > >>> 1. After this change the UDP payload field is consistent
> with the IP
> > > >>> header payload length field. Currently, IPv4 length is 1500
> and UDP
> > > >>> total length is the full unsegmented length.
> > > >
> > > > How does this simplify the driver? Does it currently have to
> > > > change the udph->length field to the mss on the wire, because the
> > > > device only splits + replicates the headers + computes the csum?
> > >
> > > Yes, this is the code I have at the moment.
> > >
> > > The device's limitation is more subtle than this. It could
> adjust the
> > > length, but then the checksum would be wrong.
> >
> > I see. We do have to keep in mind other devices. Alexander's ixgbe
> > RFC patch does not have this logic, so that device must update the
> > field directly.
> >
> > https://patchwork.ozlabs.org/patch/908396/
>
> To be clear, I think it's fine to remove these two lines if it does
> not cause
> problems for the ixgbe. It's quite possible that that device sets
> the udp
> length field unconditionally, ignoring the previous value. In which
> case both
> devices will work after this change without additional driver logic.
>
>
> I would prefer we didn’t modify this. Otherwise we cannot cancel out the
> length from the partial checksum when the time comes. The ixgbe code was
> making use of it if I recall.
>
AFAIU, the ixgbe patch doesn't use this. Instead the length is obtained
by the following code for both TCP and UDP segmentation:
paylen = skb->len - l4_offset;
Could you please check to see if this is actually required?
next prev parent reply other threads:[~2018-07-02 19:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-28 21:50 [pull request][net-next 00/12] Mellanox, mlx5e updates 2018-06-28 Saeed Mahameed
2018-06-28 21:50 ` [net-next 01/12] net/mlx5e: Add UDP GSO support Saeed Mahameed
2018-06-29 22:19 ` Willem de Bruijn
2018-06-30 16:06 ` Boris Pismenny
2018-06-30 19:40 ` Boris Pismenny
[not found] ` <CAKgT0UfFMG+i9z_nxB0vkJesDE4CHWbudCh6kJ_1+=Vd1hv=wA@mail.gmail.com>
2018-07-02 1:45 ` Willem de Bruijn
2018-07-02 5:29 ` Boris Pismenny
2018-07-02 13:34 ` Willem de Bruijn
2018-07-02 14:45 ` Willem de Bruijn
[not found] ` <CAKgT0UdC2c04JagxW8S==-ymBfDZVd6f=7DcLUGjRqiiZA3BwA@mail.gmail.com>
2018-07-02 19:17 ` Boris Pismenny [this message]
2018-06-28 21:50 ` [net-next 02/12] net/mlx5e: Add UDP GSO remaining counter Saeed Mahameed
2018-06-28 21:50 ` [net-next 03/12] net/mlx5e: Convert large order kzalloc allocations to kvzalloc Saeed Mahameed
2018-06-28 21:50 ` [net-next 04/12] net/mlx5e: RX, Use existing WQ local variable Saeed Mahameed
2018-06-28 21:50 ` [net-next 05/12] net/mlx5e: Add TX completions statistics Saeed Mahameed
2018-06-28 21:50 ` [net-next 06/12] net/mlx5e: Add XDP_TX " Saeed Mahameed
2018-06-28 21:50 ` [net-next 07/12] net/mlx5e: Add NAPI statistics Saeed Mahameed
2018-06-28 21:50 ` [net-next 08/12] net/mlx5e: Add a counter for congested UMRs Saeed Mahameed
2018-06-28 21:51 ` [net-next 09/12] net/mlx5e: Add channel events counter Saeed Mahameed
2018-06-28 21:51 ` [net-next 10/12] net/mlx5e: Add counter for MPWQE filler strides Saeed Mahameed
2018-06-28 21:51 ` [net-next 11/12] net/mlx5e: Add counter for total num of NOP operations Saeed Mahameed
2018-06-28 21:51 ` [net-next 12/12] net/mlx5e: Update NIC HW stats on demand only Saeed Mahameed
2018-06-29 14:56 ` [pull request][net-next 00/12] Mellanox, mlx5e updates 2018-06-28 David Miller
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=adb762ac-7e9e-d4fa-b952-fb539355d7e1@mellanox.com \
--to=borisp@mellanox.com \
--cc=alexander.duyck@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=saeedm@mellanox.com \
--cc=willemdebruijn.kernel@gmail.com \
--cc=yossiku@mellanox.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