[dpdk-stable] patch 'common/mlx5: fix pointer cast on Windows' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 5 12:16:40 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/07/21. 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.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6c89a5d52f4a0d95726b9b837419ff3f20cefbaa

Thanks.

Luca Boccassi

---
>From 6c89a5d52f4a0d95726b9b837419ff3f20cefbaa Mon Sep 17 00:00:00 2001
From: Tal Shnaiderman <talshn at nvidia.com>
Date: Thu, 7 Jan 2021 13:45:45 +0200
Subject: [PATCH] common/mlx5: fix pointer cast on Windows

[ upstream commit 5a90a6e40db6e712fd9dc12dedd14d8feb690ff3 ]

While compiling with clang 11 the callers of the
__mlx5_bit_off macro warns on the cast of pointers to
unsigned long which is a smaller int type in Windows.

warning: cast to smaller integer type 'unsigned long'
from 'u8 (*)[16]' [-Wpointer-to-int-cast]

To resolve it the type is changed to uintptr_t to be
compatible for both Linux and Windows.

Fixes: 865a0c15672c ("net/mlx5: add Direct Verbs prepare function")

Signed-off-by: Tal Shnaiderman <talshn at nvidia.com>
Acked-by: Matan Azrad <matan at nvidia.com>
---
 drivers/common/mlx5/mlx5_prm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h
index 58d180486e..6f5e5dc5f6 100644
--- a/drivers/common/mlx5/mlx5_prm.h
+++ b/drivers/common/mlx5/mlx5_prm.h
@@ -600,7 +600,7 @@ typedef uint8_t u8;
 
 #define __mlx5_nullp(typ) ((struct mlx5_ifc_##typ##_bits *)0)
 #define __mlx5_bit_sz(typ, fld) sizeof(__mlx5_nullp(typ)->fld)
-#define __mlx5_bit_off(typ, fld) ((unsigned int)(unsigned long) \
+#define __mlx5_bit_off(typ, fld) ((unsigned int)(uintptr_t) \
 				  (&(__mlx5_nullp(typ)->fld)))
 #define __mlx5_dw_bit_off(typ, fld) (32 - __mlx5_bit_sz(typ, fld) - \
 				    (__mlx5_bit_off(typ, fld) & 0x1f))
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:34.332577887 +0000
+++ 0114-common-mlx5-fix-pointer-cast-on-Windows.patch	2021-02-05 11:18:28.986694539 +0000
@@ -1 +1 @@
-From 5a90a6e40db6e712fd9dc12dedd14d8feb690ff3 Mon Sep 17 00:00:00 2001
+From 6c89a5d52f4a0d95726b9b837419ff3f20cefbaa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5a90a6e40db6e712fd9dc12dedd14d8feb690ff3 ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index 7d5cf961b1..9e2d1d0c81 100644
+index 58d180486e..6f5e5dc5f6 100644
@@ -29 +30 @@
-@@ -601,7 +601,7 @@ typedef uint8_t u8;
+@@ -600,7 +600,7 @@ typedef uint8_t u8;


More information about the stable mailing list