From: Gerrit Renker Date: Mon, 11 Oct 2010 18:41:13 +0000 (+0200) Subject: dccp: schedule an Ack when receiving timestamps X-Git-Tag: v2.6.37-rc1~147^2~161^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ecdfbdabbe4e0cf0443cbbea2df1bf51bf67f3f3;p=platform%2Fupstream%2Fkernel-adaptation-pc.git dccp: schedule an Ack when receiving timestamps This schedules an Ack when receiving a timestamp, exploiting the existing inet_csk_schedule_ack() function, saving one case in the `dccp_ack_pending()' function. Signed-off-by: Gerrit Renker --- diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index 60f4f96..3eb264b 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h @@ -459,8 +459,7 @@ static inline void dccp_update_gss(struct sock *sk, u64 seq) static inline int dccp_ack_pending(const struct sock *sk) { const struct dccp_sock *dp = dccp_sk(sk); - return dp->dccps_timestamp_echo != 0 || - (dp->dccps_hc_rx_ackvec != NULL && + return (dp->dccps_hc_rx_ackvec != NULL && dccp_ackvec_pending(dp->dccps_hc_rx_ackvec)) || inet_csk_ack_scheduled(sk); } diff --git a/net/dccp/options.c b/net/dccp/options.c index d4b1ae0..cd30618 100644 --- a/net/dccp/options.c +++ b/net/dccp/options.c @@ -163,6 +163,8 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq, dccp_role(sk), ntohl(opt_val), (unsigned long long) DCCP_SKB_CB(skb)->dccpd_ack_seq); + /* schedule an Ack in case this sender is quiescent */ + inet_csk_schedule_ack(sk); break; case DCCPO_TIMESTAMP_ECHO: if (len != 4 && len != 6 && len != 8)