From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Ricardo Leitner Subject: Re: [PATCH net-next v1] gso: Support partial splitting at the frag_list pointer Date: Thu, 25 Aug 2016 09:17:18 -0300 Message-ID: <20160825121718.GA13235@localhost.localdomain> References: <20160823052030.GI3735@gauss.secunet.com> <20160824093226.GN3735@gauss.secunet.com> <20160825073126.GQ3735@gauss.secunet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Duyck , Netdev , Eric Dumazet , Alexander Duyck To: Steffen Klassert Return-path: Received: from mx1.redhat.com ([209.132.183.28]:56120 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933832AbcHYMRW (ORCPT ); Thu, 25 Aug 2016 08:17:22 -0400 Content-Disposition: inline In-Reply-To: <20160825073126.GQ3735@gauss.secunet.com> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, Aug 25, 2016 at 09:31:26AM +0200, Steffen Klassert wrote: > On Wed, Aug 24, 2016 at 02:25:29PM -0300, Marcelo Ricardo Leitner wrote: > > Em 24-08-2016 13:27, Alexander Duyck escreveu: > > > > > >I'm adding Marcelo as he could probably explain the GSO_BY_FRAGS > > >functionality better than I could since he is the original author. > > > > > >If I recall GSO_BY_FRAGS does something similar to what you are doing, > > >although I believe it doesn't carry any data in the first buffer other > > >than just a header. I believe the idea behind GSO_BY_FRAGS was to > > >allow for segmenting a frame at the frag_list level instead of having > > >it done just based on MSS. That was the only reason why I brought it > > >up. > > > > > > > That's exactly it. > > > > On this no data in the first buffer limitation, we probably can > > allow it have some data in there. It was done this way just because > > sctp is using skb_gro_receive() to build such skb and this was the > > way I found to get such frag_list skb generated by it, thus > > preserving frame boundaries. > > Just to understand what you are doing. You generate MTU sized linear > buffers in sctp and then, skb_gro_receive() chains up these buffers > at the frag_list pointer. skb_gro_receive() does this because > skb_gro_offset is null and skb->head_frag is not set in your case. > > At segmentation, you just need to split at the frag_list pointer > because you know that the chained buffers fit the MTU, right? > Correct. Just note that these buffers fit the MTU, but not necessary uses all of it. That is main point in here, variable segmentation size.