Subject: Re: [PATCH net-next v1] gso: Support partial splitting at the frag_list pointer

From: Shmulik Ladkani <[email-masked]>
Date: Fri, 26 Aug 2016 23:36:21 +0300

Hi,

On Thu, 25 Aug 2016 13:00:19 +0200 Steffen Klassert <[email-masked]> wrote:
> On Wed, Aug 24, 2016 at 09:27:54AM -0700, Alexander Duyck wrote:
> > That being the
> > case we should be able to determine the size that you would need to
> > segment at by taking skb->len, and removing the length of all the
> > skbuffs hanging off of frag_list.  At that point you just use that as
> > your MSS for segmentation and it should break things up so that you
> > have a series of equal sized segments split as the frag_list buffer
> > boundaries.
> > 
> > After that all that is left is to update the gso info for the buffers.
> > For GSO_PARTIAL I was handling that on the first segment only.  For
> > this change you would need to update that code to address the fact
> > that you would have to determine the number of segments on the first
> > frame and the last since the last could be less than the first, but
> > all of the others in-between should have the same number of segments.
> 
> I tried to do this and ended up with the patch below.

Nice idea.

Still I'm missing something here, appreciate if you can explain.

We initially split the original head_skb to "big" skbs per the frag_list
boundaries (in a way similar to the SKB_GSO_PARTIAL trick).

Then we reassign gso_size (and gso_segs) for each seg skb, to be the
original gso_size specified in the head_skb.

So if they go for TSO (for devices doing NETIF_F_SG), each skb will be
split to mss segments by the device.

However, if TSO is off, but GSO is on, who takes care of further
splitting these skbs according to their gso_size?

And another question:
Can this be utilized in any way to solve the problem described in [1] ?

Thanks
Shmulik

[1] https://patchwork.ozlabs.org/patch/661419/