From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7B8C4A0351 for ; Thu, 6 Aug 2020 11:59:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 71B361C123; Thu, 6 Aug 2020 11:59:04 +0200 (CEST) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id E217C1C0AE for ; Thu, 6 Aug 2020 11:59:02 +0200 (CEST) Received: by mail-wr1-f67.google.com with SMTP id f7so43422610wrw.1 for ; Thu, 06 Aug 2020 02:59:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TvqPfh4vE2QzWhifFH+bAxm/gJ37Ds/aNqiiqzQs6aY=; b=Li+sb3kVNyEYauWty/DMkW50eOaYnxkmxV7LMXbJ3tRyWxaQMT/fx1IA6m2X4F+J5f pSjD0UtsZc49Y2NQdNKM1T9wuVYmiA9XXo6boDyjxvx3HIJDH1ecqqY5LheXptmEZZBS XfoMHTF7m3zmRCKKpMYBCSlt/jgduCIFNAaeZ9Bjb9CyQi3uaRy64RUMLL1emXdk2YjY zblNqAiU6vc0q1sGaKbdtwgHASZOyqau+O9BtBSgFWnhGKlexn/oSVqwLi5S6q7m3PyD xWJtyXmjomiVuRdgEXA2yhc/B4+i72dnZYtkAo5YxpOIdP04xoeLjwcJY8f6+Il3kisy vsQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TvqPfh4vE2QzWhifFH+bAxm/gJ37Ds/aNqiiqzQs6aY=; b=Rput36y38bgl4ty4PJ/EEMc5wZMo1+dBw4OkItYT6wtrYc+T5YZA1BdlhUGqnfKz3+ 3uZY/D14S81g9w29JQcBawGmolWNsKgLvcV88cAmx+uolQwY/Q2cgA4OVYzESlKnpW7w U3/e+DejqPlosnb9NvdCO31PVs/D1AdzBkwo4Y0ovRgGXuxkXbYZ5s5NalO0w674nyez VbbKoaK0+un7mpKbQL0cvQwtrbiiA9VT+Bj1lAyGZLQfMlV0X6eRKQu3qcy50d+ioRNX /m/NNvzTbc5Uo+Epx8ReWzfWf+eOyATm6OPIFT0d99LE2devMAz2vRuFB8rxG37J8Sfw zQWA== X-Gm-Message-State: AOAM532/7cXjN77Rb7jUCuA61ek1ApjwESEHlaC4uoT/oCp+P8JQR2vY QoHPitL3uvlMY/CNqLwHZwKB0tM/7m4= X-Google-Smtp-Source: ABdhPJx7GVG3IeuerP7fXogxF1la/DriEUd90tscEMEHMq6Lp0XoKTmhNLma5n5Sq93D3IZRO2FTTg== X-Received: by 2002:a5d:420b:: with SMTP id n11mr6485762wrq.11.1596707942669; Thu, 06 Aug 2020 02:59:02 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id i66sm6229318wma.35.2020.08.06.02.59.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2020 02:59:02 -0700 (PDT) From: luca.boccassi@gmail.com To: Xiaoyun Wang Cc: dpdk stable Date: Thu, 6 Aug 2020 10:53:55 +0100 Message-Id: <20200806095411.774624-27-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200806095411.774624-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> <20200806095411.774624-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/hinic/base: avoid system time jump' has been queued to stable release 19.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/08/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From cb5b7fbeeac69d0feb2381db02d7bb1f09972e6b Mon Sep 17 00:00:00 2001 From: Xiaoyun Wang Date: Sat, 25 Jul 2020 16:15:36 +0800 Subject: [PATCH] net/hinic/base: avoid system time jump [ upstream commit efeed0894e9c1aaa6f804a6d130677379ca99378 ] Replace gettimeofday() with clock_gettime(CLOCK_MONOTONIC_RAW, &now), the reason is same with commit d08d304508a8 ("eal/linux: make alarm not affected by system time jump") Fixes: 81d53291a466 ("net/hinic/base: add various headers") Signed-off-by: Xiaoyun Wang --- drivers/net/hinic/base/hinic_compat.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h index 7bec03b9c..341aa056b 100644 --- a/drivers/net/hinic/base/hinic_compat.h +++ b/drivers/net/hinic/base/hinic_compat.h @@ -198,16 +198,17 @@ static inline u32 readl(const volatile void *addr) #define spin_lock(spinlock_prt) rte_spinlock_lock(spinlock_prt) #define spin_unlock(spinlock_prt) rte_spinlock_unlock(spinlock_prt) -static inline unsigned long get_timeofday_ms(void) +static inline unsigned long clock_gettime_ms(void) { - struct timeval tv; + struct timespec tv; - (void)gettimeofday(&tv, NULL); + (void)clock_gettime(CLOCK_MONOTONIC, &tv); - return (unsigned long)tv.tv_sec * 1000 + tv.tv_usec / 1000; + return (unsigned long)tv.tv_sec * 1000 + + (unsigned long)tv.tv_nsec / 1000000; } -#define jiffies get_timeofday_ms() +#define jiffies clock_gettime_ms() #define msecs_to_jiffies(ms) (ms) #define time_before(now, end) ((now) < (end)) -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-08-06 10:53:16.860003229 +0100 +++ 0027-net-hinic-base-avoid-system-time-jump.patch 2020-08-06 10:53:15.812597639 +0100 @@ -1,15 +1,16 @@ -From efeed0894e9c1aaa6f804a6d130677379ca99378 Mon Sep 17 00:00:00 2001 +From cb5b7fbeeac69d0feb2381db02d7bb1f09972e6b Mon Sep 17 00:00:00 2001 From: Xiaoyun Wang Date: Sat, 25 Jul 2020 16:15:36 +0800 Subject: [PATCH] net/hinic/base: avoid system time jump +[ upstream commit efeed0894e9c1aaa6f804a6d130677379ca99378 ] + Replace gettimeofday() with clock_gettime(CLOCK_MONOTONIC_RAW, &now), the reason is same with commit d08d304508a8 ("eal/linux: make alarm not affected by system time jump") Fixes: 81d53291a466 ("net/hinic/base: add various headers") -Cc: stable@dpdk.org Signed-off-by: Xiaoyun Wang --- @@ -17,10 +18,10 @@ 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h -index 2d21b7b67..7036b031c 100644 +index 7bec03b9c..341aa056b 100644 --- a/drivers/net/hinic/base/hinic_compat.h +++ b/drivers/net/hinic/base/hinic_compat.h -@@ -166,16 +166,17 @@ static inline u32 readl(const volatile void *addr) +@@ -198,16 +198,17 @@ static inline u32 readl(const volatile void *addr) #define spin_lock(spinlock_prt) rte_spinlock_lock(spinlock_prt) #define spin_unlock(spinlock_prt) rte_spinlock_unlock(spinlock_prt)