[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1410778626.7106.145.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Mon, 15 Sep 2014 03:57:06 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Yuchung Cheng <ycheng@...gle.com>,
Neal Cardwell <ncardwell@...gle.com>
Subject: Re: [PATCH net-next 2/3] tcp: allow segment with FIN in
tcp_try_coalesce()
On Sun, 2014-09-14 at 19:56 -0700, Eric Dumazet wrote:
> There is nothing special with allowing a segment with FIN to be aggregated,
> if we take care to add tcp flags.
>
> Signed-of-by: Eric Dumazet <edumazet@...gle.com>
> ---
> net/ipv4/tcp_input.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 8f639a4face9..228bf0c5ff19 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -4143,9 +4143,6 @@ static bool tcp_try_coalesce(struct sock *sk,
>
> *fragstolen = false;
>
> - if (tcp_hdr(from)->fin)
> - return false;
> -
> /* Its possible this segment overlaps with prior segment in queue */
> if (TCP_SKB_CB(from)->seq != TCP_SKB_CB(to)->end_seq)
> return false;
> @@ -4158,6 +4155,7 @@ static bool tcp_try_coalesce(struct sock *sk,
> NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPRCVCOALESCE);
> TCP_SKB_CB(to)->end_seq = TCP_SKB_CB(from)->end_seq;
> TCP_SKB_CB(to)->ack_seq = TCP_SKB_CB(from)->ack_seq;
> + TCP_SKB_CB(to)->tcp_flags |= TCP_SKB_CB(from)->tcp_flags;
> return true;
> }
>
This patch needs to be refined.
skb_try_coalesce() should not do an unconditional
BUG_ON(skb_copy_bits(from, 0, skb_put(to, len), len));
And do it only if len is non 0
I will send a v2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists