tcp: Remove one extra ktime_get_ns() from cookie_init_timestamp
tcp_make_synack() already uses tcp_clock_ns(), and can pass the value to cookie_init_timestamp() to avoid another call to ktime_get_ns() helper. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
2386d74845
commit
200ecef67b
@@ -62,10 +62,10 @@ static u32 cookie_hash(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport,
|
||||
* Since subsequent timestamps use the normal tcp_time_stamp value, we
|
||||
* must make sure that the resulting initial timestamp is <= tcp_time_stamp.
|
||||
*/
|
||||
u64 cookie_init_timestamp(struct request_sock *req)
|
||||
u64 cookie_init_timestamp(struct request_sock *req, u64 now)
|
||||
{
|
||||
struct inet_request_sock *ireq;
|
||||
u32 ts, ts_now = tcp_time_stamp_raw();
|
||||
u32 ts, ts_now = tcp_ns_to_ts(now);
|
||||
u32 options = 0;
|
||||
|
||||
ireq = inet_rsk(req);
|
||||
|
Reference in New Issue
Block a user