Re: [PATCH net-next] tcp: add tcp_add_backlog()

2016-09-23 Thread Marcelo Ricardo Leitner
On Fri, Sep 23, 2016 at 07:36:32AM -0700, Eric Dumazet wrote: > On Fri, 2016-09-23 at 11:09 -0300, Marcelo Ricardo Leitner wrote: > > On Fri, Sep 23, 2016 at 06:42:51AM -0700, Eric Dumazet wrote: > > > On Fri, 2016-09-23 at 09:45 -0300, Marcelo Ricardo Leitner wrote: > > > > > > > Aye. In that

RE: [PATCH net-next] tcp: add tcp_add_backlog()

2016-09-23 Thread David Laight
From: Eric Dumazet > Sent: 23 September 2016 15:37 > On Fri, 2016-09-23 at 11:09 -0300, Marcelo Ricardo Leitner wrote: > > On Fri, Sep 23, 2016 at 06:42:51AM -0700, Eric Dumazet wrote: > > > On Fri, 2016-09-23 at 09:45 -0300, Marcelo Ricardo Leitner wrote: > > > > > > > Aye. In that case, what

Re: [PATCH net-next] tcp: add tcp_add_backlog()

2016-09-23 Thread Eric Dumazet
On Fri, 2016-09-23 at 11:09 -0300, Marcelo Ricardo Leitner wrote: > On Fri, Sep 23, 2016 at 06:42:51AM -0700, Eric Dumazet wrote: > > On Fri, 2016-09-23 at 09:45 -0300, Marcelo Ricardo Leitner wrote: > > > > > Aye. In that case, what about using tail instead of end? > > > > > > What do you mean

Re: [PATCH net-next] tcp: add tcp_add_backlog()

2016-09-23 Thread Marcelo Ricardo Leitner
On Fri, Sep 23, 2016 at 06:42:51AM -0700, Eric Dumazet wrote: > On Fri, 2016-09-23 at 09:45 -0300, Marcelo Ricardo Leitner wrote: > > > Aye. In that case, what about using tail instead of end? > > > What do you mean exactly ? Something like: -skb->truesize = SKB_TRUESIZE(skb_end_offset(skb));

Re: [PATCH net-next] tcp: add tcp_add_backlog()

2016-09-23 Thread Eric Dumazet
On Fri, 2016-09-23 at 09:45 -0300, Marcelo Ricardo Leitner wrote: > Aye. In that case, what about using tail instead of end? What do you mean exactly ? > Because > accounting for something that we have to tweak the limits to accept is > like adding a constant to both sides of the equation. >

Re: [PATCH net-next] tcp: add tcp_add_backlog()

2016-09-23 Thread Marcelo Ricardo Leitner
On Thu, Sep 22, 2016 at 04:21:30PM -0700, Eric Dumazet wrote: > On Thu, 2016-09-22 at 19:34 -0300, Marcelo Ricardo Leitner wrote: > > On Sat, Aug 27, 2016 at 07:37:54AM -0700, Eric Dumazet wrote: > > > +bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb) > > > +{ > > > + u32 limit =

Re: [PATCH net-next] tcp: add tcp_add_backlog()

2016-09-22 Thread Eric Dumazet
On Thu, 2016-09-22 at 19:34 -0300, Marcelo Ricardo Leitner wrote: > On Sat, Aug 27, 2016 at 07:37:54AM -0700, Eric Dumazet wrote: > > +bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb) > > +{ > > + u32 limit = sk->sk_rcvbuf + sk->sk_sndbuf; > ^^^ > ... >

Re: [PATCH net-next] tcp: add tcp_add_backlog()

2016-09-22 Thread Marcelo Ricardo Leitner
On Sat, Aug 27, 2016 at 07:37:54AM -0700, Eric Dumazet wrote: > +bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb) > +{ > + u32 limit = sk->sk_rcvbuf + sk->sk_sndbuf; ^^^ ... > + if (!skb->data_len) > + skb->truesize =

Re: [PATCH net-next] tcp: add tcp_add_backlog()

2016-08-29 Thread Marcelo Ricardo Leitner
On Mon, Aug 29, 2016 at 12:22:37PM -0700, Eric Dumazet wrote: > On Mon, 2016-08-29 at 15:51 -0300, Marcelo Ricardo Leitner wrote: > > skb->truesize = SKB_TRUESIZE(skb_end_offset(skb)); > > > > Shouldn't __pskb_pull_tail() already fix this? As it seems the expected > > behavior and it would

Re: [PATCH net-next] tcp: add tcp_add_backlog()

2016-08-29 Thread Eric Dumazet
On Mon, 2016-08-29 at 15:51 -0300, Marcelo Ricardo Leitner wrote: > skb->truesize = SKB_TRUESIZE(skb_end_offset(skb)); > > Shouldn't __pskb_pull_tail() already fix this? As it seems the expected > behavior and it would have a more global effect then. For drivers not > using copybreak,

Re: [PATCH net-next] tcp: add tcp_add_backlog()

2016-08-29 Thread Marcelo Ricardo Leitner
On Sat, Aug 27, 2016 at 07:37:54AM -0700, Eric Dumazet wrote: > From: Eric Dumazet > > When TCP operates in lossy environments (between 1 and 10 % packet > losses), many SACK blocks can be exchanged, and I noticed we could > drop them on busy senders, if these SACK blocks

Re: [PATCH net-next] tcp: add tcp_add_backlog()

2016-08-29 Thread Yuchung Cheng
On Sat, Aug 27, 2016 at 9:25 AM, Eric Dumazet wrote: > > On Sat, 2016-08-27 at 09:13 -0700, Yuchung Cheng wrote: > > On Sat, Aug 27, 2016 at 7:37 AM, Eric Dumazet > > wrote: > > > > > > > + /* Only socket owner can try to collapse/prune rx

Re: [PATCH net-next] tcp: add tcp_add_backlog()

2016-08-28 Thread David Miller
From: Eric Dumazet Date: Sat, 27 Aug 2016 07:37:54 -0700 > From: Eric Dumazet > > When TCP operates in lossy environments (between 1 and 10 % packet > losses), many SACK blocks can be exchanged, and I noticed we could > drop them on busy senders, if

Re: [PATCH net-next] tcp: add tcp_add_backlog()

2016-08-27 Thread Neal Cardwell
On Sat, Aug 27, 2016 at 10:37 AM, Eric Dumazet wrote: > From: Eric Dumazet > > When TCP operates in lossy environments (between 1 and 10 % packet > losses), many SACK blocks can be exchanged, and I noticed we could > drop them on busy senders, if

Re: [PATCH net-next] tcp: add tcp_add_backlog()

2016-08-27 Thread Eric Dumazet
On Sat, 2016-08-27 at 09:13 -0700, Yuchung Cheng wrote: > On Sat, Aug 27, 2016 at 7:37 AM, Eric Dumazet wrote: > > > > + /* Only socket owner can try to collapse/prune rx queues > > +* to reduce memory overhead, so add a little headroom here. > > +*

Re: [PATCH net-next] tcp: add tcp_add_backlog()

2016-08-27 Thread Yuchung Cheng
On Sat, Aug 27, 2016 at 7:37 AM, Eric Dumazet wrote: > > From: Eric Dumazet > > When TCP operates in lossy environments (between 1 and 10 % packet > losses), many SACK blocks can be exchanged, and I noticed we could > drop them on busy senders, if