@@ -56,7 +56,6 @@ struct inet_connection_sock_af_ops {
5656 * @icsk_accept_queue: FIFO of established children
5757 * @icsk_bind_hash: Bind node
5858 * @icsk_bind2_hash: Bind node in the bhash2 table
59- * @icsk_timeout: Timeout
6059 * @icsk_retransmit_timer: Resend (no ack)
6160 * @icsk_rto: Retransmit timeout
6261 * @icsk_pmtu_cookie Last pmtu seen by socket
@@ -82,7 +81,6 @@ struct inet_connection_sock {
8281 struct request_sock_queue icsk_accept_queue ;
8382 struct inet_bind_bucket * icsk_bind_hash ;
8483 struct inet_bind2_bucket * icsk_bind2_hash ;
85- unsigned long icsk_timeout ;
8684 struct timer_list icsk_retransmit_timer ;
8785 struct timer_list icsk_delack_timer ;
8886 __u32 icsk_rto ;
@@ -187,6 +185,12 @@ static inline void inet_csk_delack_init(struct sock *sk)
187185 memset (& inet_csk (sk )-> icsk_ack , 0 , sizeof (inet_csk (sk )-> icsk_ack ));
188186}
189187
188+ static inline unsigned long
189+ icsk_timeout (const struct inet_connection_sock * icsk )
190+ {
191+ return READ_ONCE (icsk -> icsk_retransmit_timer .expires );
192+ }
193+
190194static inline void inet_csk_clear_xmit_timer (struct sock * sk , const int what )
191195{
192196 struct inet_connection_sock * icsk = inet_csk (sk );
@@ -225,8 +229,8 @@ static inline void inet_csk_reset_xmit_timer(struct sock *sk, const int what,
225229 if (what == ICSK_TIME_RETRANS || what == ICSK_TIME_PROBE0 ||
226230 what == ICSK_TIME_LOSS_PROBE || what == ICSK_TIME_REO_TIMEOUT ) {
227231 smp_store_release (& icsk -> icsk_pending , what );
228- icsk -> icsk_timeout = jiffies + when ;
229- sk_reset_timer (sk , & icsk -> icsk_retransmit_timer , icsk -> icsk_timeout );
232+ when + = jiffies ;
233+ sk_reset_timer (sk , & icsk -> icsk_retransmit_timer , when );
230234 } else if (what == ICSK_TIME_DACK ) {
231235 smp_store_release (& icsk -> icsk_ack .pending ,
232236 icsk -> icsk_ack .pending | ICSK_ACK_TIMER );
0 commit comments