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

2016-08-29 Thread Steffen Klassert
On Thu, Aug 25, 2016 at 09:17:18AM -0300, Marcelo Ricardo Leitner wrote: > On Thu, Aug 25, 2016 at 09:31:26AM +0200, Steffen Klassert wrote: > > > > 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 t

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

2016-08-29 Thread Steffen Klassert
On Thu, Aug 25, 2016 at 09:02:33AM -0700, Alexander Duyck wrote: > On Thu, Aug 25, 2016 at 4:00 AM, Steffen Klassert > > + > > + skb_walk_frags(head_skb, segs) { > > + len -= segs->len; > > + } > > One thought I had is that

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

2016-08-27 Thread Shmulik Ladkani
Hi, On Fri, 26 Aug 2016 13:45:56 -0700 Alexander Duyck wrote: > > However, if TSO is off, but GSO is on, who takes care of further > > splitting these skbs according to their gso_size? > > I believe the patch resolves it via the net_gso_ok check. This is > used to verify if the lower device

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

2016-08-26 Thread Alexander Duyck
On Thu, Aug 25, 2016 at 4:00 AM, Steffen Klassert wrote: > diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c > index 989a362..ac46233 100644 > --- a/net/ipv4/af_inet.c > +++ b/net/ipv4/af_inet.c > @@ -1190,7 +1190,7 @@ EXPORT_SYMBOL(inet_sk_rebuild_header); > struct sk_buff *inet_gso_segment(s

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

2016-08-26 Thread Alexander Duyck
On Fri, Aug 26, 2016 at 1:36 PM, Shmulik Ladkani wrote: > Hi, > > On Thu, 25 Aug 2016 13:00:19 +0200 Steffen Klassert > 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 >> > seg

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

2016-08-26 Thread Shmulik Ladkani
Hi, On Thu, 25 Aug 2016 13:00:19 +0200 Steffen Klassert 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 > > s

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

2016-08-25 Thread Alexander Duyck
On Thu, Aug 25, 2016 at 4:00 AM, Steffen Klassert wrote: > On Wed, Aug 24, 2016 at 09:27:54AM -0700, Alexander Duyck wrote: >> >> In you case though we maybe be able to make this easier. If I am not >> mistaken I believe we should have the main skb, and any in the chain >> excluding the last cont

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

2016-08-25 Thread Marcelo Ricardo Leitner
On Thu, Aug 25, 2016 at 01:00:19PM +0200, Steffen Klassert wrote: > On Wed, Aug 24, 2016 at 09:27:54AM -0700, Alexander Duyck wrote: > > > > In you case though we maybe be able to make this easier. If I am not > > mistaken I believe we should have the main skb, and any in the chain > > excluding

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

2016-08-25 Thread Marcelo Ricardo Leitner
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

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

2016-08-25 Thread Steffen Klassert
On Wed, Aug 24, 2016 at 09:27:54AM -0700, Alexander Duyck wrote: > > In you case though we maybe be able to make this easier. If I am not > mistaken I believe we should have the main skb, and any in the chain > excluding the last containing the same amount of data. Yes, it seems to be like that

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

2016-08-25 Thread Steffen Klassert
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 doe

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

2016-08-24 Thread Marcelo Ricardo Leitner
Em 24-08-2016 13:27, Alexander Duyck escreveu: On Wed, Aug 24, 2016 at 2:32 AM, Steffen Klassert wrote: On Tue, Aug 23, 2016 at 07:47:32AM -0700, Alexander Duyck wrote: On Mon, Aug 22, 2016 at 10:20 PM, Steffen Klassert wrote: Since commit 8a29111c7 ("net: gro: allow to build full sized skb"

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

2016-08-24 Thread Alexander Duyck
On Wed, Aug 24, 2016 at 2:32 AM, Steffen Klassert wrote: > On Tue, Aug 23, 2016 at 07:47:32AM -0700, Alexander Duyck wrote: >> On Mon, Aug 22, 2016 at 10:20 PM, Steffen Klassert >> wrote: >> > Since commit 8a29111c7 ("net: gro: allow to build full sized skb") >> > gro may build buffers with a fra

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

2016-08-24 Thread Steffen Klassert
On Tue, Aug 23, 2016 at 07:47:32AM -0700, Alexander Duyck wrote: > On Mon, Aug 22, 2016 at 10:20 PM, Steffen Klassert > wrote: > > Since commit 8a29111c7 ("net: gro: allow to build full sized skb") > > gro may build buffers with a frag_list. This can hurt forwarding > > because most NICs can't off

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

2016-08-23 Thread Alexander Duyck
On Mon, Aug 22, 2016 at 10:20 PM, Steffen Klassert wrote: > Since commit 8a29111c7 ("net: gro: allow to build full sized skb") > gro may build buffers with a frag_list. This can hurt forwarding > because most NICs can't offload such packets, they need to be > segmented in software. This patch spli

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

2016-08-22 Thread Steffen Klassert
Since commit 8a29111c7 ("net: gro: allow to build full sized skb") gro may build buffers with a frag_list. This can hurt forwarding because most NICs can't offload such packets, they need to be segmented in software. This patch splits buffers with a frag_list at the frag_list pointer into buffers t