patch 'net/mana: enable 32-bit build' has been queued to stable release 22.11.4

Xueming Li xuemingl at nvidia.com
Sun Oct 22 16:20:45 CEST 2023


Hi,

FYI, your patch has been queued to stable release 22.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 11/15/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=e9ead33c9da6f7ebc0bab4bf8aa2954059fe9e0e

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From e9ead33c9da6f7ebc0bab4bf8aa2954059fe9e0e Mon Sep 17 00:00:00 2001
From: Wei Hu <weh at microsoft.com>
Date: Thu, 21 Sep 2023 08:34:41 +0000
Subject: [PATCH] net/mana: enable 32-bit build
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 74decf3bf03cdd5a42e85085f2980e8d058c299c ]

Enable 32-bit build on x86 Linux. Fixed build warnings and errors
when building in 32-bit.

With this patch, mana will be able to build into 32-bit. However,
another patch for mana short doorbell support is needed to make
mana fully functional for 32-bit applications.

Signed-off-by: Wei Hu <weh at microsoft.com>
Acked-by: Long Li <longli at microsoft.com>
---
 drivers/net/mana/mana.c      |  2 +-
 drivers/net/mana/meson.build |  4 ++--
 drivers/net/mana/mr.c        | 18 +++++++++---------
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c
index 7630118d4f..896b53ed35 100644
--- a/drivers/net/mana/mana.c
+++ b/drivers/net/mana/mana.c
@@ -1260,7 +1260,7 @@ mana_probe_port(struct ibv_device *ibdev, struct ibv_device_attr_ex *dev_attr,
 	/* Create a parent domain with the port number */
 	attr.pd = priv->ib_pd;
 	attr.comp_mask = IBV_PARENT_DOMAIN_INIT_ATTR_PD_CONTEXT;
-	attr.pd_context = (void *)(uint64_t)port;
+	attr.pd_context = (void *)(uintptr_t)port;
 	priv->ib_parent_pd = ibv_alloc_parent_domain(ctx, &attr);
 	if (!priv->ib_parent_pd) {
 		DRV_LOG(ERR, "ibv_alloc_parent_domain failed port %d", port);
diff --git a/drivers/net/mana/meson.build b/drivers/net/mana/meson.build
index 493f0d26d4..2d72eca5a8 100644
--- a/drivers/net/mana/meson.build
+++ b/drivers/net/mana/meson.build
@@ -1,9 +1,9 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2022 Microsoft Corporation

-if not is_linux or not dpdk_conf.has('RTE_ARCH_X86_64')
+if not is_linux or not dpdk_conf.has('RTE_ARCH_X86')
     build = false
-    reason = 'only supported on x86_64 Linux'
+    reason = 'only supported on x86 Linux'
     subdir_done()
 endif

diff --git a/drivers/net/mana/mr.c b/drivers/net/mana/mr.c
index fec0dc961c..b8e6ea0bbf 100644
--- a/drivers/net/mana/mr.c
+++ b/drivers/net/mana/mr.c
@@ -53,7 +53,7 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, struct mana_priv *priv,
 		}

 		DP_LOG(DEBUG,
-		       "registering memory chunk start 0x%" PRIx64 " len %u",
+		       "registering memory chunk start 0x%" PRIxPTR " len %u",
 		       ranges[i].start, ranges[i].len);

 		if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
@@ -62,7 +62,7 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, struct mana_priv *priv,
 						    ranges[i].len);
 			if (ret) {
 				DP_LOG(ERR,
-				       "MR failed start 0x%" PRIx64 " len %u",
+				       "MR failed start 0x%" PRIxPTR " len %u",
 				       ranges[i].start, ranges[i].len);
 				return ret;
 			}
@@ -72,7 +72,7 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, struct mana_priv *priv,
 		ibv_mr = ibv_reg_mr(priv->ib_pd, (void *)ranges[i].start,
 				    ranges[i].len, IBV_ACCESS_LOCAL_WRITE);
 		if (ibv_mr) {
-			DP_LOG(DEBUG, "MR lkey %u addr %p len %" PRIu64,
+			DP_LOG(DEBUG, "MR lkey %u addr %p len %zu",
 			       ibv_mr->lkey, ibv_mr->addr, ibv_mr->length);

 			mr = rte_calloc("MANA MR", 1, sizeof(*mr), 0);
@@ -99,7 +99,7 @@ mana_new_pmd_mr(struct mana_mr_btree *local_tree, struct mana_priv *priv,
 				return ret;
 			}
 		} else {
-			DP_LOG(ERR, "MR failed at 0x%" PRIx64 " len %u",
+			DP_LOG(ERR, "MR failed at 0x%" PRIxPTR " len %u",
 			       ranges[i].start, ranges[i].len);
 			return -errno;
 		}
@@ -141,7 +141,7 @@ try_again:
 	mr = mana_mr_btree_lookup(local_mr_btree, &idx,
 				  (uintptr_t)mbuf->buf_addr, mbuf->buf_len);
 	if (mr) {
-		DP_LOG(DEBUG, "Local mr lkey %u addr 0x%" PRIx64 " len %" PRIu64,
+		DP_LOG(DEBUG, "Local mr lkey %u addr 0x%" PRIxPTR " len %zu",
 		       mr->lkey, mr->addr, mr->len);
 		return mr;
 	}
@@ -162,7 +162,7 @@ try_again:
 		}

 		DP_LOG(DEBUG,
-		       "Added local MR key %u addr 0x%" PRIx64 " len %" PRIu64,
+		       "Added local MR key %u addr 0x%" PRIxPTR " len %zu",
 		       mr->lkey, mr->addr, mr->len);
 		return mr;
 	}
@@ -266,7 +266,7 @@ mana_mr_btree_lookup(struct mana_mr_btree *bt, uint16_t *idx,
 		return &table[base];

 	DP_LOG(DEBUG,
-	       "addr 0x%" PRIx64 " len %zu idx %u sum 0x%" PRIx64 " not found",
+	       "addr 0x%" PRIxPTR " len %zu idx %u sum 0x%" PRIxPTR " not found",
 	       addr, len, *idx, addr + len);

 	return NULL;
@@ -316,7 +316,7 @@ mana_mr_btree_insert(struct mana_mr_btree *bt, struct mana_mr_cache *entry)
 	uint16_t shift;

 	if (mana_mr_btree_lookup(bt, &idx, entry->addr, entry->len)) {
-		DP_LOG(DEBUG, "Addr 0x%" PRIx64 " len %zu exists in btree",
+		DP_LOG(DEBUG, "Addr 0x%" PRIxPTR " len %zu exists in btree",
 		       entry->addr, entry->len);
 		return 0;
 	}
@@ -340,7 +340,7 @@ mana_mr_btree_insert(struct mana_mr_btree *bt, struct mana_mr_cache *entry)
 	bt->len++;

 	DP_LOG(DEBUG,
-	       "Inserted MR b-tree table %p idx %d addr 0x%" PRIx64 " len %zu",
+	       "Inserted MR b-tree table %p idx %d addr 0x%" PRIxPTR " len %zu",
 	       table, idx, entry->addr, entry->len);

 	return 0;
--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-10-22 22:17:35.048700300 +0800
+++ 0016-net-mana-enable-32-bit-build.patch	2023-10-22 22:17:34.146723700 +0800
@@ -1 +1 @@
-From 74decf3bf03cdd5a42e85085f2980e8d058c299c Mon Sep 17 00:00:00 2001
+From e9ead33c9da6f7ebc0bab4bf8aa2954059fe9e0e Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 74decf3bf03cdd5a42e85085f2980e8d058c299c ]
@@ -12,2 +14,0 @@
-
-Cc: stable at dpdk.org


More information about the stable mailing list