From 843e720557105750d5152f3a414655ab87fb856c Mon Sep 17 00:00:00 2001 From: Ali Alnubani Date: Thu, 27 Jun 2019 18:10:07 +0300 Subject: [PATCH] net/mlx5: fix 32-bit build This is to fix the error: ``` drivers/net/mlx5/mlx5_defs.h:14:26: error: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'off_t {aka long long int}' [-Werror=format=] drivers/net/mlx5/mlx5_txq.c:569:48: note: format string is defined here DRV_LOG(DEBUG, "port %u: uar_mmap_offset 0x%lx" ~~^ %llx ``` Which reproduces with gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0. Fixes: 6bf10ab69be0 ("net/mlx5: support 32-bit systems") Cc: stable@dpdk.org Signed-off-by: Ali Alnubani Reviewed-by: Ferruh Yigit --- drivers/net/mlx5/mlx5_txq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index ebb42cbffb..77410955f1 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -10,6 +10,7 @@ #include #include #include +#include /* Verbs header. */ /* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */ @@ -566,7 +567,7 @@ mlx5_txq_ibv_new(struct rte_eth_dev *dev, uint16_t idx) txq_uar_init(txq_ctrl); if (qp.comp_mask & MLX5DV_QP_MASK_UAR_MMAP_OFFSET) { txq_ctrl->uar_mmap_offset = qp.uar_mmap_offset; - DRV_LOG(DEBUG, "port %u: uar_mmap_offset 0x%lx", + DRV_LOG(DEBUG, "port %u: uar_mmap_offset 0x%"PRIx64, dev->data->port_id, txq_ctrl->uar_mmap_offset); } else { DRV_LOG(ERR, -- 2.20.1