tcp: add helper for counter tweaking due mid-wq change
We need full-scale adjustment to fix a TCP miscount in the next patch, so just move it into a helper and call for that from the other places. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
0de8ca597d
commit
797108d134
@@ -616,21 +616,6 @@ static inline int tcp_skb_mss(const struct sk_buff *skb)
|
||||
return skb_shinfo(skb)->gso_size;
|
||||
}
|
||||
|
||||
static inline void tcp_dec_pcount_approx_int(__u32 *count, const int decr)
|
||||
{
|
||||
if (*count) {
|
||||
*count -= decr;
|
||||
if ((int)*count < 0)
|
||||
*count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void tcp_dec_pcount_approx(__u32 *count,
|
||||
const struct sk_buff *skb)
|
||||
{
|
||||
tcp_dec_pcount_approx_int(count, tcp_skb_pcount(skb));
|
||||
}
|
||||
|
||||
/* Events passed to congestion control interface */
|
||||
enum tcp_ca_event {
|
||||
CA_EVENT_TX_START, /* first transmit when no packets in flight */
|
||||
|
Reference in New Issue
Block a user