On Thu, Nov 22, 2018 at 10:16 AM Eric Dumazet <eduma...@google.com> wrote:
> Yes, I was considering properly filtering SACK as a refinement later [1] > but you raise a valid point for alien stacks that are not yet using SACK :/ > > [1] This version of the patch will not aggregate sacks since the > memcmp() on tcp options would fail. > > Neal can you double check if cake_ack_filter() does not have the issue > you just mentioned ? Note that aggregated pure acks will have a gso_segs set to the number of aggregated acks, we might simply use this value later in the stack, instead of forcing having X pure acks in the backlog and increase memory needs and cpu costs. Then I guess I need this fix : diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 36c9d715bf2aa7eb7bf58b045bfeb85a2ec1a696..736f7f24cdb4fe61769faaa1644c8bff01c746c4 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -1669,7 +1669,8 @@ bool tcp_add_backlog(struct sock *sk, struct sk_buff *skb) __skb_pull(skb, hdrlen); if (skb_try_coalesce(tail, skb, &fragstolen, &delta)) { TCP_SKB_CB(tail)->end_seq = TCP_SKB_CB(skb)->end_seq; - TCP_SKB_CB(tail)->ack_seq = TCP_SKB_CB(skb)->ack_seq; + if (after(TCP_SKB_CB(skb)->ack_seq, TCP_SKB_CB(tail)->ack_seq)) + TCP_SKB_CB(tail)->ack_seq = TCP_SKB_CB(skb)->ack_seq; TCP_SKB_CB(tail)->tcp_flags |= TCP_SKB_CB(skb)->tcp_flags; if (TCP_SKB_CB(skb)->has_rxtstamp) {