[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1449582430.7632.18.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Tue, 08 Dec 2015 05:47:10 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Per Hurtig <per.hurtig@....se>
Cc: davem@...emloft.net, edumazet@...gle.com, ncardwell@...gle.com,
nanditad@...gle.com, tom@...bertland.com, ycheng@...gle.com,
viro@...iv.linux.org.uk, fw@...len.de, mleitner@...hat.com,
daniel@...earbox.net, willemb@...gle.com,
ilpo.jarvinen@...sinki.fi, pasi.sarolahti@....fi,
stephen@...workplumber.org, netdev@...r.kernel.org,
anna.brunstrom@....se, apetlund@...ula.no, michawe@....uio.no,
mohammad.rajiullah@....se
Subject: Re: [RFC PATCHv2 net-next 1/2] tcp: RTO Restart (RTOR)
On Tue, 2015-12-08 at 10:19 +0100, Per Hurtig wrote:
> +static u32 tcp_unsent_pkts(const struct sock *sk, u32 ulimit)
> +{
> + struct sk_buff *skb = tcp_send_head(sk);
> + u32 pkts = 0;
> +
> + if (skb)
> + tcp_for_write_queue_from(skb, sk) {
> + pkts += tcp_skb_pcount(skb);
> +
> + if (ulimit && pkts >= ulimit)
> + return ulimit;
> + }
> +
> + return pkts;
> +}
Considering Yuchung feedback, have you looked at using an approximation
instead ?
(ie using tp->write_seq - tp->snd_nxt)
--
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