From: Yongseok Koh <yskoh@mellanox.com>
To: shahafs@mellanox.com, adrien.mazarguil@6wind.com,
nelio.laranjeiro@6wind.com
Cc: dev@dpdk.org, ferruh.yigit@intel.com, Yongseok Koh <yskoh@mellanox.com>
Subject: [dpdk-dev] [PATCH] net/mlx: fix printing format specifiers
Date: Wed, 9 May 2018 22:53:21 -0700 [thread overview]
Message-ID: <20180510055321.26375-1-yskoh@mellanox.com> (raw)
This will have to be squashed to:
net/mlx4: add new Memory Region support
net/mlx5: add new Memory Region support
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
This is not a formal patch to merge but Shahaf will squash it separately to mlx4
and mlx5 for dpdk-next-net.
drivers/net/mlx4/mlx4_mr.c | 20 ++++++++++++--------
drivers/net/mlx5/mlx5_mr.c | 21 +++++++++++++--------
2 files changed, 25 insertions(+), 16 deletions(-)
diff --git a/drivers/net/mlx4/mlx4_mr.c b/drivers/net/mlx4/mlx4_mr.c
index 08e632baf..d23d3c613 100644
--- a/drivers/net/mlx4/mlx4_mr.c
+++ b/drivers/net/mlx4/mlx4_mr.c
@@ -161,8 +161,8 @@ mr_btree_insert(struct mlx4_mr_btree *bt, struct mlx4_mr_cache *entry)
lkp_tbl = *bt->table;
/* Find out the slot for insertion. */
if (mr_btree_lookup(bt, &idx, entry->start) != UINT32_MAX) {
- DEBUG("abort insertion to B-tree(%p):"
- " already exist at idx=%u [0x%lx, 0x%lx) lkey=0x%x",
+ DEBUG("abort insertion to B-tree(%p): already exist at"
+ " idx=%u [0x%" PRIxPTR ", 0x%" PRIxPTR ") lkey=0x%x",
(void *)bt, idx, entry->start, entry->end, entry->lkey);
/* Already exist, return. */
return 0;
@@ -179,7 +179,8 @@ mr_btree_insert(struct mlx4_mr_btree *bt, struct mlx4_mr_cache *entry)
memmove(&lkp_tbl[idx + 1], &lkp_tbl[idx], shift);
lkp_tbl[idx] = *entry;
bt->len++;
- DEBUG("inserted B-tree(%p)[%u], [0x%lx, 0x%lx) lkey=0x%x",
+ DEBUG("inserted B-tree(%p)[%u],"
+ " [0x%" PRIxPTR ", 0x%" PRIxPTR ") lkey=0x%x",
(void *)bt, idx, entry->start, entry->end, entry->lkey);
return 0;
}
@@ -259,7 +260,8 @@ mlx4_mr_btree_dump(struct mlx4_mr_btree *bt)
for (idx = 0; idx < bt->len; ++idx) {
struct mlx4_mr_cache *entry = &lkp_tbl[idx];
- DEBUG("B-tree(%p)[%u], [0x%lx, 0x%lx) lkey=0x%x",
+ DEBUG("B-tree(%p)[%u],"
+ " [0x%" PRIxPTR ", 0x%" PRIxPTR ") lkey=0x%x",
(void *)bt, idx, entry->start, entry->end, entry->lkey);
}
}
@@ -574,7 +576,8 @@ mlx4_mr_create(struct rte_eth_dev *dev, struct mlx4_mr_cache *entry,
assert(msl->page_sz == ms->hugepage_sz);
/* Number of memsegs in the range. */
ms_n = len / msl->page_sz;
- DEBUG("port %u extending %p to [0x%lx, 0x%lx), page_sz=0x%lx, ms_n=%u",
+ DEBUG("port %u extending %p to [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
+ " page_sz=0x%" PRIx64 ", ms_n=%u",
dev->data->port_id, (void *)addr,
data.start, data.end, msl->page_sz, ms_n);
/* Size of memory for bitmap. */
@@ -708,7 +711,8 @@ mlx4_mr_create(struct rte_eth_dev *dev, struct mlx4_mr_cache *entry,
assert(mr->ibv_mr->length == len);
LIST_INSERT_HEAD(&priv->mr.mr_list, mr, mr);
DEBUG("port %u MR CREATED (%p) for %p:\n"
- " [0x%lx, 0x%lx), lkey=0x%x base_idx=%u ms_n=%u, ms_bmp_n=%u",
+ " [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
+ " lkey=0x%x base_idx=%u ms_n=%u, ms_bmp_n=%u",
dev->data->port_id, (void *)mr, (void *)addr,
data.start, data.end, rte_cpu_to_be_32(mr->ibv_mr->lkey),
mr->ms_base_idx, mr->ms_n, mr->ms_bmp_n);
@@ -784,7 +788,7 @@ mlx4_mr_mem_event_free_cb(struct rte_eth_dev *dev, const void *addr, size_t len)
int i;
int rebuild = 0;
- DEBUG("port %u free callback: addr=%p, len=%lu",
+ DEBUG("port %u free callback: addr=%p, len=%zu",
dev->data->port_id, addr, len);
msl = rte_mem_virt2memseg_list(addr);
/* addr and len must be page-aligned. */
@@ -1129,7 +1133,7 @@ mlx4_mr_dump_dev(struct rte_eth_dev *dev)
n = mr_find_next_chunk(mr, &ret, n);
if (!ret.end)
break;
- DEBUG(" chunk[%u], [0x%lx, 0x%lx)",
+ DEBUG(" chunk[%u], [0x%" PRIxPTR ", 0x%" PRIxPTR ")",
chunk_n++, ret.start, ret.end);
}
}
diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c
index 8245535f9..abb1f5179 100644
--- a/drivers/net/mlx5/mlx5_mr.c
+++ b/drivers/net/mlx5/mlx5_mr.c
@@ -146,8 +146,8 @@ mr_btree_insert(struct mlx5_mr_btree *bt, struct mlx5_mr_cache *entry)
/* Find out the slot for insertion. */
if (mr_btree_lookup(bt, &idx, entry->start) != UINT32_MAX) {
DRV_LOG(DEBUG,
- "abort insertion to B-tree(%p):"
- " already exist at idx=%u [0x%lx, 0x%lx) lkey=0x%x",
+ "abort insertion to B-tree(%p): already exist at"
+ " idx=%u [0x%" PRIxPTR ", 0x%" PRIxPTR ") lkey=0x%x",
(void *)bt, idx, entry->start, entry->end, entry->lkey);
/* Already exist, return. */
return 0;
@@ -165,7 +165,8 @@ mr_btree_insert(struct mlx5_mr_btree *bt, struct mlx5_mr_cache *entry)
lkp_tbl[idx] = *entry;
bt->len++;
DRV_LOG(DEBUG,
- "inserted B-tree(%p)[%u], [0x%lx, 0x%lx) lkey=0x%x",
+ "inserted B-tree(%p)[%u],"
+ " [0x%" PRIxPTR ", 0x%" PRIxPTR ") lkey=0x%x",
(void *)bt, idx, entry->start, entry->end, entry->lkey);
return 0;
}
@@ -247,7 +248,8 @@ mlx5_mr_btree_dump(struct mlx5_mr_btree *bt)
struct mlx5_mr_cache *entry = &lkp_tbl[idx];
DRV_LOG(DEBUG,
- "B-tree(%p)[%u], [0x%lx, 0x%lx) lkey=0x%x",
+ "B-tree(%p)[%u],"
+ " [0x%" PRIxPTR ", 0x%" PRIxPTR ") lkey=0x%x",
(void *)bt, idx, entry->start, entry->end, entry->lkey);
}
}
@@ -574,7 +576,8 @@ mlx5_mr_create(struct rte_eth_dev *dev, struct mlx5_mr_cache *entry,
/* Number of memsegs in the range. */
ms_n = len / msl->page_sz;
DRV_LOG(DEBUG,
- "port %u extending %p to [0x%lx, 0x%lx), page_sz=0x%lx, ms_n=%u",
+ "port %u extending %p to [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
+ " page_sz=0x%" PRIx64 ", ms_n=%u",
dev->data->port_id, (void *)addr,
data.start, data.end, msl->page_sz, ms_n);
/* Size of memory for bitmap. */
@@ -714,7 +717,8 @@ mlx5_mr_create(struct rte_eth_dev *dev, struct mlx5_mr_cache *entry,
LIST_INSERT_HEAD(&priv->mr.mr_list, mr, mr);
DRV_LOG(DEBUG,
"port %u MR CREATED (%p) for %p:\n"
- " [0x%lx, 0x%lx), lkey=0x%x base_idx=%u ms_n=%u, ms_bmp_n=%u",
+ " [0x%" PRIxPTR ", 0x%" PRIxPTR "),"
+ " lkey=0x%x base_idx=%u ms_n=%u, ms_bmp_n=%u",
dev->data->port_id, (void *)mr, (void *)addr,
data.start, data.end, rte_cpu_to_be_32(mr->ibv_mr->lkey),
mr->ms_base_idx, mr->ms_n, mr->ms_bmp_n);
@@ -792,7 +796,7 @@ mlx5_mr_mem_event_free_cb(struct rte_eth_dev *dev, const void *addr, size_t len)
int i;
int rebuild = 0;
- DRV_LOG(DEBUG, "port %u free callback: addr=%p, len=%lu",
+ DRV_LOG(DEBUG, "port %u free callback: addr=%p, len=%zu",
dev->data->port_id, addr, len);
msl = rte_mem_virt2memseg_list(addr);
/* addr and len must be page-aligned. */
@@ -1143,7 +1147,8 @@ mlx5_mr_dump_dev(struct rte_eth_dev *dev)
n = mr_find_next_chunk(mr, &ret, n);
if (!ret.end)
break;
- DRV_LOG(DEBUG, " chunk[%u], [0x%lx, 0x%lx)",
+ DRV_LOG(DEBUG,
+ " chunk[%u], [0x%" PRIxPTR ", 0x%" PRIxPTR ")",
chunk_n++, ret.start, ret.end);
}
}
--
2.11.0
next reply other threads:[~2018-05-10 5:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-10 5:53 Yongseok Koh [this message]
2018-05-10 10:58 ` Shahaf Shuler
2018-05-10 19:39 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180510055321.26375-1-yskoh@mellanox.com \
--to=yskoh@mellanox.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=nelio.laranjeiro@6wind.com \
--cc=shahafs@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).