Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp894552imm; Wed, 11 Jul 2018 12:56:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdGruTGYC3uOYQEI5t5Yc3bXIZu4CDY+KrmpFrlk62N8K24SzrvN7c5JzK0+6q+ry9bWyZO X-Received: by 2002:a17:902:6e09:: with SMTP id u9-v6mr27119plk.13.1531338982362; Wed, 11 Jul 2018 12:56:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531338982; cv=none; d=google.com; s=arc-20160816; b=l/J5Nk4s4bFniLhX4kmRY+kY+yBwIFHEOEjM/PHK7aUG2w6ETHGk13ixlqd6FDWHkb NhY2csUEvKWbF+Gru7VL4ZFoWUvvTAHFjkZkckEuoxmuqPKwH0TuHtOBfJSKZL3yXs8M g8/WM2klaMFvlrqWq0YSsXEhJZRLjf4fmekeuSUOWgWtQIppBC62i5g33g6RjBauzuzS Z/HnRdNNNsWy3+t7OAlNwfIvltiRTRVLvSTiflSC7ocVmLfc6j/tdcDbH8e+N0o0fvh1 opMK4dc9ef3dgtJnheohC2egVK0ebZkF80R8vkCKI3Ibl6ROLbK9RviQJS0kNaAj6YQe piIg== 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:dkim-signature:arc-authentication-results; bh=hNJPR+kq27fj1u6nAjlU7zqqTZl/XuV38TgYLpMVkbw=; b=GLHBsgfLG6wpm34ov5tNn1ihp27MtHfchsOe2ydRRV2Y2KoFxuFSdKcDUIx+tqNhl9 f/yK4PEnUcvkjm/RHBFQVijWE25JF+OGRxzDRRnyJLqsfIgf5R0yUjBwCzbA928j3qcs RyGeR0+uZ8j/lHNDhJLKjHUX4JkEfQnVkM7hJ501rINh14ADymGLSv/k2iJZ1awhcGai 0/ICyGRKAo3D1lmCBQWXKn//eKN6RRDd80VJ1Z6erO//qqP+g9r6+ISzYNKphus15fbn lAAh8clSu3g7zbe6RF511360raMDpEoe/0z506xAmreT9qGgHzV7dj/OyqIcTVbG+Dvv LzGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=KseB4IjZ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d33-v6si19505287pgd.245.2018.07.11.12.56.06; Wed, 11 Jul 2018 12:56:22 -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; dkim=pass header.i=@ziepe.ca header.s=google header.b=KseB4IjZ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388143AbeGKSbk (ORCPT + 99 others); Wed, 11 Jul 2018 14:31:40 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:40403 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387833AbeGKSbk (ORCPT ); Wed, 11 Jul 2018 14:31:40 -0400 Received: by mail-io0-f196.google.com with SMTP id l14-v6so15070534iob.7 for ; Wed, 11 Jul 2018 11:26:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hNJPR+kq27fj1u6nAjlU7zqqTZl/XuV38TgYLpMVkbw=; b=KseB4IjZMFBFMMhveJpHsZ8eTR/nOOPdI59VSYIb9RJ5VMhBHxSaRqqFf8/sOBSp8k ArHzu1hSDMNVEwzqWlcumP4MELVp2ipgNXCHANu1t+Xt8n2v7YE/hbAugr0c/DA9ZSLm SECGVdEd1SxjHbJztl2Wu8ln47Y3c9iDLFds18syw7sASc16NZcX+Eh+a/E/Drm6lXqq Hrw2qDu0YvW1HJNQGppX3eajUzQ9moxYra5VZz24ZigD2CUY39DK9VP3o4wzde45wKRS 6eaaOH00HTnWflCyirnfRhF6cC9NaBrmf4Vzstcx5Dy1VMRtpMmgFaR7zVgPI5+gJRA3 epQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hNJPR+kq27fj1u6nAjlU7zqqTZl/XuV38TgYLpMVkbw=; b=RzS4tF/i8WPWRPxtzSXBV4z0EDviaEfZmcTjupxPS6cj9+iKH8jnrUQHUePUic8pYn MHEaaa0bps9P8krzx1Q5JLqHty3hHp5g1wKiMTmWUz2YVPrwl4pFpNG/Rlj/fEhA+49j TR+hEQJwLpohfz37qei05NdISHWxJzPx9oyUCe7/bKWW5AtV6CGYIA5o4FJRUsFvYe/q RTvEuFoICLwY4IblBM8jVspmpF1yKbKuRhcz4XOzo5wbMgRGC2w6GuiqtgPGaoS/DN8K d5/TOrk53rwwpF4HwJjU3Pj/OMtCpWBxxYEXWgrLNEqHE9x5FNpudeXDdYbl0+t+tgFD GCow== X-Gm-Message-State: APt69E01dqRgcwfBZzIALq1mkfOwgxpzoI+9kwCBG8y1Ukmgz2YWQsfx mO76qg2/p2AyBPTrGzPso25OrA== X-Received: by 2002:a02:4a0a:: with SMTP id k10-v6mr6432231jab.134.1531333567611; Wed, 11 Jul 2018 11:26:07 -0700 (PDT) Received: from ziepe.ca (S010614cc2056d97f.ed.shawcable.net. [174.3.196.123]) by smtp.gmail.com with ESMTPSA id u127-v6sm10731036iod.54.2018.07.11.11.26.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jul 2018 11:26:07 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.86_2) (envelope-from ) id 1fdJoU-0005ww-3m; Wed, 11 Jul 2018 12:26:06 -0600 Date: Wed, 11 Jul 2018 12:26:06 -0600 From: Jason Gunthorpe To: Arnd Bergmann Cc: Faisal Latif , Shiraz Saleem , Doug Ledford , "David S. Miller" , Geert Uytterhoeven , Yuval Shaia , Henry Orosco , Tatyana Nikolova , Mustafa Ismail , 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: <20180711182606.GA22284@ziepe.ca> 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.5.24 (2015-08-30) 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 10:34:43AM +0200, 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(-) Applied to for-next thanks Jason