Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3932864imm; Sat, 21 Jul 2018 06:30:57 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdtyvextzvou+i6JyyWNjDtlaymq1+ZLLjAOi8YsZzNnSkG/c/87Ghgq7EjUplNEg5MbyzY X-Received: by 2002:a17:902:7c8b:: with SMTP id y11-v6mr5749026pll.222.1532179857887; Sat, 21 Jul 2018 06:30:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532179857; cv=none; d=google.com; s=arc-20160816; b=oLQFBR/iGbwp5rRcRActl+S06TyDc7IWYPYFhARq57UWXO9oKtjLuwLWV/yU42042C lNUc3lV+ZeP+IsRFMMm+3qU5ZjjQ2IJfg6pq1Tv/LC7GqmM6EVwV6YHRIC8wmYT4umvv dfEYdFAb9iVi1WGu11x0Wg2FSs5dyc8V4dtZnY3gaiHNMvG+1Dn7/qB731VM4XMQwa5v 0H9k7pA43Kk+p9Z+VTSlEjeucRz9W+WDtmd8jcOk/Lhb2np2gxeE/LjSSZPblXErDTYi fhXDxq++ZjZ8Y2im3xdqLTcq59a1eEhMvvwb322LELpRQoA4+eEJFVvNUgjpO+0ZEnwl Mk7Q== 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=41K1JKrjypM6+cnzZZ0LzJn3ssXay+PYz2N/u6dlRZ4=; b=r5drn/+TVCE1Cu1meLs2Z/v0m5VBmOJt+lw1NCl7V3mZmVHzt63MVyAWw5CAadCDL4 HB7KnDM396EYw9nSYRKMbb6O0KC6cVjf8Dz4rXO8tANj0Meq9ViO22C0xzx4Z8svz54j hyqu5LrX8jduNvmlEsGGWwLwDSXaAOpaP8+A2RMc5a51CWAIiQzMJye0dtS0zBU3xHX5 /IVmCzB33uUkDXAjqszdjynG6O8riJhv2+X1/H0I/FgrG1hKBNLKl+cgryZEO+QVfzEN gEy/Y+FM3Lv+h6BVonAxgdnZV9uEnq1xyE4ncBe6+Sg51rfzczpEva3wjHQ61u+ud4Ah efog== 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 p14-v6si4145145pfk.275.2018.07.21.06.30.43; Sat, 21 Jul 2018 06:30:57 -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 S1727969AbeGUOWl (ORCPT + 99 others); Sat, 21 Jul 2018 10:22:41 -0400 Received: from mga06.intel.com ([134.134.136.31]:15889 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727598AbeGUOWl (ORCPT ); Sat, 21 Jul 2018 10:22:41 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jul 2018 06:29:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,385,1526367600"; d="scan'208";a="76665215" Received: from ssaleem-mobl4.amr.corp.intel.com (HELO ssaleem-mobl1) ([10.255.33.195]) by orsmga002.jf.intel.com with SMTP; 21 Jul 2018 06:29:52 -0700 Received: by ssaleem-mobl1 (sSMTP sendmail emulation); Sat, 21 Jul 2018 08:29:52 -0500 Date: Sat, 21 Jul 2018 08:29:51 -0500 From: Shiraz Saleem To: Arnd Bergmann Cc: "Latif, Faisal" , Doug Ledford , Jason Gunthorpe , "David S. Miller" , Geert Uytterhoeven , Yuval Shaia , "Orosco, Henry" , "Nikolova, Tatyana E" , "Ismail, Mustafa" , Jia-Ju Bai , Bart Van Assche , "linux-rdma@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" Subject: Re: [PATCH] [v3] infiniband: i40iw, nes: don't use wall time for TCP sequence numbers Message-ID: <20180721132951.GB4640@ssaleem-MOBL4.amr.corp.intel.com> References: <20180709083523.448587-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180709083523.448587-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 Mon, Jul 09, 2018 at 02:34:43AM -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. > > Acked-by: Shiraz Saleem > Signed-off-by: Arnd Bergmann > --- > v2: use secure_tcpv6_seq for IPv6 support as suggested by Shiraz Saleem. > v3: add a soft IPv6 dependency to prevent a link error with CONFIG_IPV6=m, > this now forces i40iw to be a module as well, add an IS_ENABLED() > check to avoid calling it when IPV6 is completely disabled. > > Signed-off-by: Arnd Bergmann > --- > drivers/infiniband/hw/i40iw/Kconfig | 1 + > drivers/infiniband/hw/i40iw/i40iw_cm.c | 26 +++++++++++++++++++++----- > drivers/infiniband/hw/nes/nes_cm.c | 8 +++++--- > net/core/secure_seq.c | 1 + > 4 files changed, 28 insertions(+), 8 deletions(-) > > diff --git a/drivers/infiniband/hw/i40iw/Kconfig b/drivers/infiniband/hw/i40iw/Kconfig > index 2962979c06e9..d867ef1ac72a 100644 > --- a/drivers/infiniband/hw/i40iw/Kconfig > +++ b/drivers/infiniband/hw/i40iw/Kconfig > @@ -1,6 +1,7 @@ > config INFINIBAND_I40IW > tristate "Intel(R) Ethernet X722 iWARP Driver" > depends on INET && I40E > + depends on IPV6 || !IPV6 > depends on PCI > select GENERIC_ALLOCATOR > ---help--- v3 update looks ok. Thanks!