From patchwork Fri Oct 27 04:21:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 831051 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="sL8larrz"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yNW2933hQz9t2d for ; Fri, 27 Oct 2017 15:22:57 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751115AbdJ0EVo (ORCPT ); Fri, 27 Oct 2017 00:21:44 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:43325 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbdJ0EVm (ORCPT ); Fri, 27 Oct 2017 00:21:42 -0400 Received: by mail-pf0-f193.google.com with SMTP id a8so4078103pfc.0 for ; Thu, 26 Oct 2017 21:21:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:mime-version :content-transfer-encoding; bh=m7x6ln7DKiev/CrBMx1dWFliaurw/GaFpaYBsXHB008=; b=sL8larrzgDFZrI3/K1FG4lXPWJ3J3SIW5ZhrlovlsgP4iWfAida4Qd0cLy2KIJc261 hJTZYFSR2+GsR89FZ/8iBNsNhr7bmnwzAg8TOb49L24MYD9gF5opB3KOUY1bFI38DE+w meP6/UWOkWFbKJYn+pOKnDCck6j/Mu68MqViF4Pm7zxFzPYoquwadqzfErU9Rec9zF/N T9OvfwWUtBPYxRbjp/NyWXoiLBIHqID7zdZXaSr7g9pIuzmn3J8MVMzhpIUu5cmIpGCp fT+1U33uH504L45U6RKP74+QXeJtE7qoMuudfHzBE2pi/pmxiOnSE0fSkIp8cIqk+yap Jkcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:mime-version :content-transfer-encoding; bh=m7x6ln7DKiev/CrBMx1dWFliaurw/GaFpaYBsXHB008=; b=jBvfJHOZOyb0acDbnka/CDLfTiYCCySTtlCx2YiUvHBN+l0SOjaL73MzymxSFwLJEl UoDAVSv4ar/CxTWNDgWn086JWV1ltvHebzVM1QEU5CYIiEb1Yqopl9mH//KyNJnL0EO3 2L3De5B88nuOsFspJkgLugd3lDPYITiuFdUXAMNl1xcsl6WVM7fBPpUMzIRmFljQFuED URwdbeFI/QbfD0+e6BTctyUH2tMuhKw8136KoZvpbXisRPFAbvKQrPSyk2o6+s9JcblR xaLFsR/pRgcvu0hu1IKN3IhpEPwFIp+5uFaIwvkbLS6seKmZpAO2B++n+SpgshFO20YK B9ew== X-Gm-Message-State: AMCzsaWYkBw1jiOlD8eVO9/e4K0D0zKlSuAkivoDW5WxjHM8v10YCzZm 8SCJPiZi+BYiZWRdrYa95rWVJg== X-Google-Smtp-Source: ABhQp+QmSw7xtd2K6LgN56C/w2ZfDwf/iDTPDziRWZjonORbiDyWwT/DCqY3JKOFf3jGh54HWfcxNA== X-Received: by 10.159.235.147 with SMTP id f19mr6131477plr.42.1509078102157; Thu, 26 Oct 2017 21:21:42 -0700 (PDT) Received: from [192.168.86.171] (c-67-180-167-114.hsd1.ca.comcast.net. [67.180.167.114]) by smtp.googlemail.com with ESMTPSA id x73sm12591099pff.102.2017.10.26.21.21.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Oct 2017 21:21:41 -0700 (PDT) Message-ID: <1509078100.11887.28.camel@edumazet-glaptop3.roam.corp.google.com> Subject: [PATCH net] tcp: refresh tp timestamp before tcp_mtu_probe() From: Eric Dumazet To: David Miller Cc: netdev Date: Thu, 26 Oct 2017 21:21:40 -0700 X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Eric Dumazet In the unlikely event tcp_mtu_probe() is sending a packet, we want tp->tcp_mstamp being as accurate as possible. This means we need to call tcp_mstamp_refresh() a bit earlier in tcp_write_xmit(). Fixes: 385e20706fac ("tcp: use tp->tcp_mstamp in output path") Signed-off-by: Eric Dumazet --- net/ipv4/tcp_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 1151870018e345592853b035a0902121c41e268d..ae60dd3faed0adc71731bc686f878afd4c628d32 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -2239,6 +2239,7 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, sent_pkts = 0; + tcp_mstamp_refresh(tp); if (!push_one) { /* Do MTU probing. */ result = tcp_mtu_probe(sk); @@ -2250,7 +2251,6 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, } max_segs = tcp_tso_segs(sk, mss_now); - tcp_mstamp_refresh(tp); while ((skb = tcp_send_head(sk))) { unsigned int limit;