Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1428021imm; Fri, 29 Jun 2018 18:49:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJcSQhic2IDFWKQmFWANbhRXahSiNFAtdhDZn4k4kXLhoZ2F2dnPpP+1plkHtmFmXZpwMp6 X-Received: by 2002:a17:902:9681:: with SMTP id n1-v6mr17666897plp.244.1530323354851; Fri, 29 Jun 2018 18:49:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530323354; cv=none; d=google.com; s=arc-20160816; b=V5mClNBN6t27Gb2mmSM0aSyTFTvlOR2++5Hv9l6t0JvCMtqAreeYQPIwC4il6XOpf4 SklQ262cMNcSU8UK1oY65IPeuHCmDxCsAOcS0qqZ6zVp2ytGR7jLOsv93PGnD0EENFoK cLnqF3w+5ad0IgIOfkPa40etGyEpTZf1Q6mJ/rxehEpzal1eZERvAYO/Y4cEFR5/2cfQ NiblHUBWLZ4BOmOa97HRRjeJ1K6Kiasc5sedksDJAtphdxiJ+LJC82nkadEc88GYhDhL Q+08E2KXi2Rkx0sz+eMTcNvyLVJI3UK0bU4bo/JDGYBKUopjMTyb7NQ6pQ2TiwaK0Q56 i6/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=JoII6m59ClKdbHF3eWhVa8sZ0ZiyYUcIUr5y54oqxZg=; b=PsJ9gifEZrEhVorAh+3Td7iGnOsyT0AW2iBCW6858JjucnsUk9kYFupLVCfxWrMAjp Kx7hfMS2gMJQqsYONmfkuBOqsE/VIwhiooqkRJEpKpEOOCbTSjaA2dW5fgLIPzT00B/4 +UhyvCpm+EgvcdE+aX/6dcDj+wqcOCoHd6QLhOIqfcXrIZtlOPx+8u0j0U7Jvz6euT/i 8I1oHLfZ8PTRYTIT17QX1i8XDh3TYI3ATqkIAQi6yLfWIdBwUxvdridhCz9zF2nRDs+z Jak0jK7LfuyMLuYzbZG/atTy7JYdZrgDXIpZ0aSa2388KixiADz06Iv5qGAQD3tcsThQ /4vw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d5-v6si10247208plo.3.2018.06.29.18.48.58; Fri, 29 Jun 2018 18:49:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936883AbeF2WLC (ORCPT + 99 others); Fri, 29 Jun 2018 18:11:02 -0400 Received: from mga14.intel.com ([192.55.52.115]:28177 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936809AbeF2WLA (ORCPT ); Fri, 29 Jun 2018 18:11:00 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jun 2018 15:10:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,287,1526367600"; d="scan'208";a="236719395" Received: from ssaleem-mobl4.amr.corp.intel.com (HELO ssaleem-mobl1) ([10.122.32.166]) by orsmga005.jf.intel.com with SMTP; 29 Jun 2018 15:10:56 -0700 Received: by ssaleem-mobl1 (sSMTP sendmail emulation); Fri, 29 Jun 2018 17:10:54 -0500 Date: Fri, 29 Jun 2018 17:10:52 -0500 From: Shiraz Saleem To: Arnd Bergmann Cc: "Latif, Faisal" , Doug Ledford , Jason Gunthorpe , "David S. Miller" , "Orosco, Henry" , "Nikolova, Tatyana E" , "Ismail, Mustafa" , Bart Van Assche , Yuval Shaia , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" Subject: Re: [PATCH] [v2] infiniband: i40iw, nes: don't use wall time for TCP sequence numbers Message-ID: <20180629221052.GA14152@ssaleem-MOBL4.amr.corp.intel.com> References: <20180627132628.915978-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180627132628.915978-1-arnd@arndb.de> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 27, 2018 at 07:26:05AM -0600, Arnd Bergmann wrote: > The nes infiniband driver uses current_kernel_time() to get a nanosecond > granunarity timestamp to initialize its tcp sequence counters. This is > one of only a few remaining users of that deprecated function, so we > should try to get rid of it. > > Aside from using a deprecated API, there are several problems I see here: > > - Using a CLOCK_REALTIME based time source makes it predictable in > case the time base is synchronized. > - Using a coarse timestamp means it only gets updated once per jiffie, > making it even more predictable in order to avoid having to access > the hardware clock source > - The upper 2 bits are always zero because the nanoseconds are at most > 999999999. > > For the Linux TCP implementation, we use secure_tcp_seq(), which appears > to be appropriate here as well, and solves all the above problems. > > i40iw uses a variant of the same code, so I do that same thing there > for ipv4. Unlike nes, i40e also supports ipv6, which needs to call > secure_tcpv6_seq instead. > > Signed-off-by: Arnd Bergmann > --- > v2: use secure_tcpv6_seq for IPv6 support as suggested by Shiraz Saleem. > --- Looks good. Acked-by: Shiraz Saleem