Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1643199imm; Thu, 12 Jul 2018 05:36:58 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdSR61pkpVUexYZYNGt88XS+fB8wl6NyzbasHv2O6Qxk7J2Vs/P9t8tkIC8l9aIxVOoasSx X-Received: by 2002:a63:121a:: with SMTP id h26-v6mr2017674pgl.316.1531399018227; Thu, 12 Jul 2018 05:36:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531399018; cv=none; d=google.com; s=arc-20160816; b=RCcklWuRIR9HNO3prM3KcpZMqDJaQcGhgI3TI2rlisqmRrO/bBgr9dQ/6DGDUc5D04 TA/yDCJxhpCcyTO3424aNPS4FenPeeHfmwxGsnRNT+ixwQOqgMGrJV5CJ8usSLGH5uBi Bae8zcyqJrDeK0OTXoHNm00+JrRE7YTdF5EMsGU4aeTdscoEI41ueBFUXTtdAWVAtZ/Q 23zAVHBVSJ1mYjxo7nnSbl+XdYB3LhSuEfZ/cq0djbii+0XuqNPzt++GO+kqmPeLHbvU 4aYOc7mRmHD7eqJxC6/5ICWyqbT0kSQvTrpwwoaDoOxVQnB1gd3WnC4x4/pqEy3NUpnD hLJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=9LovpyTSMV7uavf9sBeFYcwHb0AY+wi6kG+hGX8EnHw=; b=kMQgWLcg5crCmOmrPToMxr1y3A1u+blgH+p4XBPEY1C9uzuTFIO/Mtl5q93ytTt23B GDsFN47DYrNu1Sf9BK5K/TMindCFeR3TmOP1mTIjN9NJ5r0mpq/Sw4n1MdAgVwCx/UM/ kyP+DJ3OgepzaVa5Q9l5/WkMbT8GhHABAXa7f4MT1QXdU8TeR4maoYqZilCM9mvQEOAr oh0zV/VBWRkhPjFgetg8LCuaGgEwsVjYNjGk7CVw6oXiX8Bu+PeumL1+PqQ3Tx0WfQpx 9C71/mbmkIlab00/UD2OSC4VLPeyVSi86Q2p/xqrbmOJJ8O8QArk+YrZEdNYjpt+zYZE dKSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="vaTUCA7/"; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 17-v6si13118889pgw.648.2018.07.12.05.36.42; Thu, 12 Jul 2018 05:36:58 -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=@google.com header.s=20161025 header.b="vaTUCA7/"; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732191AbeGLMpc (ORCPT + 99 others); Thu, 12 Jul 2018 08:45:32 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:51489 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726663AbeGLMpb (ORCPT ); Thu, 12 Jul 2018 08:45:31 -0400 Received: by mail-it0-f66.google.com with SMTP id h2-v6so4765947itj.1 for ; Thu, 12 Jul 2018 05:36:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9LovpyTSMV7uavf9sBeFYcwHb0AY+wi6kG+hGX8EnHw=; b=vaTUCA7/IVpy/VQwg9yWtM2nr0VxoNB1B/X0p1Up48R5JDM6NieM19+FmqJpNSy7D6 KRBYJYefxxPonUqtrqfWSSjq75Wr5x6L3NptTlzvLnVcWkV6Y+cK21sAu6EiYcTBSs5G ZALp/YMC6YwvamcC7D4GMIA/R6PpMaXtyei4hdvSwJIlTt0QALquYiwXa8FfV7xxzyK4 e3hS2/xvMAF20FXmRF//H0iyHSfXgLJ44F9lbUhR4GeclDE/H6Nq1RcvbgftNvJc0xr7 FrqPUSIO5aC9hrzB6RRf1RCAFlIX4MY/+rUo9a7IPB9J0a71E2m9TMfmz8NGwqYz+1DH Q+AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9LovpyTSMV7uavf9sBeFYcwHb0AY+wi6kG+hGX8EnHw=; b=knlfWCwJ9GPjPpG8YuguCZz/DXnlmpe9tBg9px+cO8UtX/e4vwzJ6n3CzyJEqXxfQu iuKjCcqz8HzZ5wAd75xfKeQ2Zu57BoNN6ZrBc9wWyIm7kiTzjTgI9jjmD5ODBYUVHppm tfykFFipYl0+3Con6HmMCEg1Ot5d2i8UrjbbYS2Gwg5PfqcBASOFa5hDu2oEO65qcfLM 5gi2Um0yJpPkweun/0KnueeDjbKM158TO/MAGACGTnkyOaNYBQNn91V1jXdktuSuVAH1 0Xcqe5reV/OpSmJzQsojCjecbsgLiHU8vhl1sUd8DnRFYTxawMjjuJWRxI1i42sxED9a YTXw== X-Gm-Message-State: AOUpUlF/weVuFRAqj8ou5fsNpjW3b00FS+z0YonyHeBuJwQZ394bZAs4 g10Vaur8v0OQPGYBlRzIhr30P0PYBUQVrQ0lWGwcfg== X-Received: by 2002:a02:c4c6:: with SMTP id h6-v6mr1327806jaj.26.1531398968251; Thu, 12 Jul 2018 05:36:08 -0700 (PDT) MIME-Version: 1.0 References: <20180712003625.2551-1-jmaxwell37@gmail.com> In-Reply-To: From: Eric Dumazet Date: Thu, 12 Jul 2018 05:35:56 -0700 Message-ID: Subject: Re: [net-next, 1/3] tcp: convert icsk_user_timeout from jiffies to msecs To: David Laight Cc: jmaxwell37@gmail.com, David Miller , Neal Cardwell , Alexey Kuznetsov , Hideaki YOSHIFUJI , netdev , LKML , jmaxwell@redhat.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 12, 2018 at 1:57 AM David Laight wrote: > > From: Jon Maxwell Sent: 12 July 2018 01:36 > ... > > - (s32)(tcp_time_stamp(tp) - start_ts) > > > - jiffies_to_msecs(icsk->icsk_user_timeout)) > > + (s32)(tcp_time_stamp(tp) - start_ts) > icsk->icsk_user_timeout) > > That has never been tested properly. > icsk_user_timeout is u32 so the comparison is unsigned and the (s32) cast > has no effect. > The existing code had this ' bug' already. Please do not blame this patch, and send a patch if you believe there is an issue ? In my opinion, the (s32) here is a reminder for the reader of the width of the expression, more than anything, since there is no chance the result can be negative.