mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 22:21:21 +00:00
[TCP]: Congestion control API RTT sampling fix
Commit 164891aadf
broke RTT
sampling of congestion control modules. Inaccurate timestamps
could be fed to them without providing any way for them to
identify such cases. Previously RTT sampler was called only if
FLAG_RETRANS_DATA_ACKED was not set filtering inaccurate
timestamps nicely. In addition, the new behavior could give an
invalid timestamp (zero) to RTT sampler if only skbs with
TCPCB_RETRANS were ACKed. This solves both problems.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
22b1a9203e
commit
b9ce204f0a
7 changed files with 32 additions and 2 deletions
|
@ -261,6 +261,18 @@ static inline s64 ktime_to_ns(const ktime_t kt)
|
|||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ktime_equal - Compares two ktime_t variables to see if they are equal
|
||||
* @cmp1: comparable1
|
||||
* @cmp2: comparable2
|
||||
*
|
||||
* Compare two ktime_t variables, returns 1 if equal
|
||||
*/
|
||||
static inline int ktime_equal(const ktime_t cmp1, const ktime_t cmp2)
|
||||
{
|
||||
return cmp1.tv64 == cmp2.tv64;
|
||||
}
|
||||
|
||||
static inline s64 ktime_to_us(const ktime_t kt)
|
||||
{
|
||||
struct timeval tv = ktime_to_timeval(kt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue