[dpdk-stable] patch 'net/hinic/base: fix clock definition with glibc version' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 28 11:43:42 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/30/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 4f5ef8332e825cf809ab38364c7cc3b3a9220e41 Mon Sep 17 00:00:00 2001
From: Xiaoyun Wang <cloud.wangxiaoyun at huawei.com>
Date: Mon, 14 Sep 2020 22:31:46 +0800
Subject: [PATCH] net/hinic/base: fix clock definition with glibc version

[ upstream commit 9b5f64904b1fb01310e94a6c884b4a7f8e51b3a0 ]

Sync the repair of patch("fix compile error for old glibc
caused by CLOCK_MONOTONIC_RAW") in the community.

Fixes: efeed0894e9c ("net/hinic/base: avoid system time jump")

Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun at huawei.com>
---
 drivers/net/hinic/base/hinic_compat.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
index 341aa056ba..473a273b6b 100644
--- a/drivers/net/hinic/base/hinic_compat.h
+++ b/drivers/net/hinic/base/hinic_compat.h
@@ -198,11 +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)
 
+#ifdef CLOCK_MONOTONIC_RAW /* Defined in glibc bits/time.h */
+#define CLOCK_TYPE CLOCK_MONOTONIC_RAW
+#else
+#define CLOCK_TYPE CLOCK_MONOTONIC
+#endif
+
 static inline unsigned long clock_gettime_ms(void)
 {
 	struct timespec tv;
 
-	(void)clock_gettime(CLOCK_MONOTONIC, &tv);
+	(void)clock_gettime(CLOCK_TYPE, &tv);
 
 	return (unsigned long)tv.tv_sec * 1000 +
 	       (unsigned long)tv.tv_nsec / 1000000;
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-10-28 10:35:13.731888717 +0000
+++ 0063-net-hinic-base-fix-clock-definition-with-glibc-versi.patch	2020-10-28 10:35:11.532830435 +0000
@@ -1,13 +1,14 @@
-From 9b5f64904b1fb01310e94a6c884b4a7f8e51b3a0 Mon Sep 17 00:00:00 2001
+From 4f5ef8332e825cf809ab38364c7cc3b3a9220e41 Mon Sep 17 00:00:00 2001
 From: Xiaoyun Wang <cloud.wangxiaoyun at huawei.com>
 Date: Mon, 14 Sep 2020 22:31:46 +0800
 Subject: [PATCH] net/hinic/base: fix clock definition with glibc version
 
+[ upstream commit 9b5f64904b1fb01310e94a6c884b4a7f8e51b3a0 ]
+
 Sync the repair of patch("fix compile error for old glibc
 caused by CLOCK_MONOTONIC_RAW") in the community.
 
 Fixes: efeed0894e9c ("net/hinic/base: avoid system time jump")
-Cc: stable at dpdk.org
 
 Signed-off-by: Xiaoyun Wang <cloud.wangxiaoyun at huawei.com>
 ---
@@ -15,10 +16,10 @@
  1 file changed, 7 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h
-index 7036b031c5..6dd210ec06 100644
+index 341aa056ba..473a273b6b 100644
 --- a/drivers/net/hinic/base/hinic_compat.h
 +++ b/drivers/net/hinic/base/hinic_compat.h
-@@ -166,11 +166,17 @@ static inline u32 readl(const volatile void *addr)
+@@ -198,11 +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)
  


More information about the stable mailing list