Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Cong Wang <amwang@redhat.com>
Cc: netdev@vger.kernel.org, Rick Jones <rick.jones2@hp.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	"David S. Miller" <davem@davemloft.net>,
	Thomas Graf <tgraf@suug.ch>,
	David Laight <David.Laight@ACULAB.COM>
Subject: Re: [Patch net-next v2] tcp: introduce a per-route knob for quick ack
Date: Wed, 12 Jun 2013 23:42:56 -0700	[thread overview]
Message-ID: <1371105776.3252.98.camel@edumazet-glaptop> (raw)
In-Reply-To: <1371104643-24076-1-git-send-email-amwang@redhat.com>

On Thu, 2013-06-13 at 14:24 +0800, Cong Wang wrote:


> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index 907311c..51ed9b7 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -3726,6 +3726,7 @@ void tcp_reset(struct sock *sk)
>  static void tcp_fin(struct sock *sk)
>  {
>  	struct tcp_sock *tp = tcp_sk(sk);
> +	const struct dst_entry *dst;
>  
>  	inet_csk_schedule_ack(sk);
>  
> @@ -3737,7 +3738,9 @@ static void tcp_fin(struct sock *sk)
>  	case TCP_ESTABLISHED:
>  		/* Move to CLOSE_WAIT */
>  		tcp_set_state(sk, TCP_CLOSE_WAIT);
> -		inet_csk(sk)->icsk_ack.pingpong = 1;
> +		dst = __sk_dst_get(sk);

	What if dst is NULL ?

> +		if (!dst_metric(dst, RTAX_QUICKACK))
> +			inet_csk(sk)->icsk_ack.pingpong = 1;
>  		break;
>  
>  	case TCP_CLOSE_WAIT:
> diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
> index ec335fa..f840b92 100644
> --- a/net/ipv4/tcp_output.c
> +++ b/net/ipv4/tcp_output.c
> @@ -160,6 +160,7 @@ static void tcp_event_data_sent(struct tcp_sock *tp,
>  {
>  	struct inet_connection_sock *icsk = inet_csk(sk);
>  	const u32 now = tcp_time_stamp;
> +	const struct dst_entry *dst = __sk_dst_get(sk);
>  


Same here : Are you sure dst cannot be NULL ?

  parent reply	other threads:[~2013-06-13  6:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-13  6:24 [Patch net-next v2] tcp: introduce a per-route knob for quick ack Cong Wang
2013-06-13  6:24 ` [Patch iproute2] add quickack option to ip route Cong Wang
2013-06-13  6:42 ` Eric Dumazet [this message]
2013-06-13  8:45   ` [Patch net-next v2] tcp: introduce a per-route knob for quick ack Cong Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1371105776.3252.98.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=amwang@redhat.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=rick.jones2@hp.com \
    --cc=stephen@networkplumber.org \
    --cc=tgraf@suug.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox