* [dpdk-dev] [PATCH] net/mlx5: fix 32b compilation @ 2019-06-12 5:32 Shahaf Shuler 2019-06-12 21:25 ` Yongseok Koh 2020-01-13 14:22 ` [dpdk-dev] [PATCH] net/mlx5: fix doorbell register offset type Viacheslav Ovsiienko 0 siblings, 2 replies; 7+ messages in thread From: Shahaf Shuler @ 2019-06-12 5:32 UTC (permalink / raw) To: Yongseok Koh; +Cc: dev, stable 32b Compilation output the below error: drivers/net/mlx5/mlx5_txq.c: In function 'mlx5_txq_ibv_new': error: format '%lx' expects argument of type 'long unsigned int', but argument 8 has type 'off_t' [-Werror=format=] DRV_LOG(DEBUG, "port %u: uar_mmap_offset 0x%lx", ^ Fixes: 6bf10ab69be0 ("net/mlx5: support 32-bit systems") Cc: stable@dpdk.org Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> --- drivers/net/mlx5/mlx5_txq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index ebb42cbffb..a421139e3c 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -566,8 +566,8 @@ 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", - dev->data->port_id, txq_ctrl->uar_mmap_offset); + DRV_LOG(DEBUG, "port %u: uar_mmap_offset 0x%x", + dev->data->port_id, (int)(txq_ctrl->uar_mmap_offset)); } else { DRV_LOG(ERR, "port %u failed to retrieve UAR info, invalid" -- 2.12.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix 32b compilation 2019-06-12 5:32 [dpdk-dev] [PATCH] net/mlx5: fix 32b compilation Shahaf Shuler @ 2019-06-12 21:25 ` Yongseok Koh 2019-06-13 13:29 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit 2020-01-13 14:22 ` [dpdk-dev] [PATCH] net/mlx5: fix doorbell register offset type Viacheslav Ovsiienko 1 sibling, 1 reply; 7+ messages in thread From: Yongseok Koh @ 2019-06-12 21:25 UTC (permalink / raw) To: Shahaf Shuler; +Cc: dev, stable > On Jun 11, 2019, at 10:32 PM, Shahaf Shuler <shahafs@mellanox.com> wrote: > > 32b Compilation output the below error: > > drivers/net/mlx5/mlx5_txq.c: In function 'mlx5_txq_ibv_new': > error: format '%lx' expects argument of type 'long unsigned int', but > argument 8 has type 'off_t' [-Werror=format=] > DRV_LOG(DEBUG, "port %u: uar_mmap_offset 0x%lx", > ^ off_t would have same size as pointer. Changing lx to PRIxPTR would work? > Fixes: 6bf10ab69be0 ("net/mlx5: support 32-bit systems") > Cc: stable@dpdk.org > > Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> > --- > drivers/net/mlx5/mlx5_txq.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c > index ebb42cbffb..a421139e3c 100644 > --- a/drivers/net/mlx5/mlx5_txq.c > +++ b/drivers/net/mlx5/mlx5_txq.c > @@ -566,8 +566,8 @@ 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", > - dev->data->port_id, txq_ctrl->uar_mmap_offset); > + DRV_LOG(DEBUG, "port %u: uar_mmap_offset 0x%x", > + dev->data->port_id, (int)(txq_ctrl->uar_mmap_offset)); > } else { > DRV_LOG(ERR, > "port %u failed to retrieve UAR info, invalid" > -- > 2.12.0 > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/mlx5: fix 32b compilation 2019-06-12 21:25 ` Yongseok Koh @ 2019-06-13 13:29 ` Ferruh Yigit 2019-06-13 13:35 ` Ferruh Yigit 0 siblings, 1 reply; 7+ messages in thread From: Ferruh Yigit @ 2019-06-13 13:29 UTC (permalink / raw) To: Yongseok Koh, Shahaf Shuler; +Cc: dev, stable On 6/12/2019 10:25 PM, Yongseok Koh wrote: > >> On Jun 11, 2019, at 10:32 PM, Shahaf Shuler <shahafs@mellanox.com> wrote: >> >> 32b Compilation output the below error: >> >> drivers/net/mlx5/mlx5_txq.c: In function 'mlx5_txq_ibv_new': >> error: format '%lx' expects argument of type 'long unsigned int', but >> argument 8 has type 'off_t' [-Werror=format=] >> DRV_LOG(DEBUG, "port %u: uar_mmap_offset 0x%lx", >> ^ > > off_t would have same size as pointer. > Changing lx to PRIxPTR would work? 'off_t' is no more same size as pointer, please check [1], otherwise what you said correct and code was working fine previously. Briefly, from build system we are asking/forcing off_t to be always 64-bit [1]: https://mails.dpdk.org/archives/dev/2019-June/133819.html > >> Fixes: 6bf10ab69be0 ("net/mlx5: support 32-bit systems") >> Cc: stable@dpdk.org >> >> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> >> --- >> drivers/net/mlx5/mlx5_txq.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c >> index ebb42cbffb..a421139e3c 100644 >> --- a/drivers/net/mlx5/mlx5_txq.c >> +++ b/drivers/net/mlx5/mlx5_txq.c >> @@ -566,8 +566,8 @@ 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", >> - dev->data->port_id, txq_ctrl->uar_mmap_offset); >> + DRV_LOG(DEBUG, "port %u: uar_mmap_offset 0x%x", >> + dev->data->port_id, (int)(txq_ctrl->uar_mmap_offset)); >> } else { >> DRV_LOG(ERR, >> "port %u failed to retrieve UAR info, invalid" >> -- >> 2.12.0 >> > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/mlx5: fix 32b compilation 2019-06-13 13:29 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit @ 2019-06-13 13:35 ` Ferruh Yigit 0 siblings, 0 replies; 7+ messages in thread From: Ferruh Yigit @ 2019-06-13 13:35 UTC (permalink / raw) To: Yongseok Koh, Shahaf Shuler; +Cc: dev, stable On 6/13/2019 2:29 PM, Ferruh Yigit wrote: > On 6/12/2019 10:25 PM, Yongseok Koh wrote: >> >>> On Jun 11, 2019, at 10:32 PM, Shahaf Shuler <shahafs@mellanox.com> wrote: >>> >>> 32b Compilation output the below error: >>> >>> drivers/net/mlx5/mlx5_txq.c: In function 'mlx5_txq_ibv_new': >>> error: format '%lx' expects argument of type 'long unsigned int', but >>> argument 8 has type 'off_t' [-Werror=format=] >>> DRV_LOG(DEBUG, "port %u: uar_mmap_offset 0x%lx", >>> ^ >> >> off_t would have same size as pointer. >> Changing lx to PRIxPTR would work? > > 'off_t' is no more same size as pointer, please check [1], otherwise what you > said correct and code was working fine previously. > > Briefly, from build system we are asking/forcing off_t to be always 64-bit Ahh, sorry I see what you mean after checking the patch J You are right, I thinks patch should be something like: - DRV_LOG(DEBUG, "port %u: uar_mmap_offset 0x%lx", + DRV_LOG(DEBUG, "port %u: uar_mmap_offset 0x%"PRIx64, > > [1]: https://mails.dpdk.org/archives/dev/2019-June/133819.html > >> >>> Fixes: 6bf10ab69be0 ("net/mlx5: support 32-bit systems") >>> Cc: stable@dpdk.org >>> >>> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> >>> --- >>> drivers/net/mlx5/mlx5_txq.c | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c >>> index ebb42cbffb..a421139e3c 100644 >>> --- a/drivers/net/mlx5/mlx5_txq.c >>> +++ b/drivers/net/mlx5/mlx5_txq.c >>> @@ -566,8 +566,8 @@ 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", >>> - dev->data->port_id, txq_ctrl->uar_mmap_offset); >>> + DRV_LOG(DEBUG, "port %u: uar_mmap_offset 0x%x", >>> + dev->data->port_id, (int)(txq_ctrl->uar_mmap_offset)); >>> } else { >>> DRV_LOG(ERR, >>> "port %u failed to retrieve UAR info, invalid" >>> -- >>> 2.12.0 >>> >> > ^ permalink raw reply [flat|nested] 7+ messages in thread
* [dpdk-dev] [PATCH] net/mlx5: fix doorbell register offset type 2019-06-12 5:32 [dpdk-dev] [PATCH] net/mlx5: fix 32b compilation Shahaf Shuler 2019-06-12 21:25 ` Yongseok Koh @ 2020-01-13 14:22 ` Viacheslav Ovsiienko 2020-01-13 14:29 ` Matan Azrad 2020-01-15 10:09 ` Raslan Darawsheh 1 sibling, 2 replies; 7+ messages in thread From: Viacheslav Ovsiienko @ 2020-01-13 14:22 UTC (permalink / raw) To: dev; +Cc: matan, rasland, orika, shahafs, stable The doorbell register is mapped using mmap() and offset must have off_t instead of unsigned int. Bug is not critical due to only least significant bits of offset are currently tested to determine mapping mode. Fixes: 8409a28573d3 ("net/mlx5: control transmit doorbell register mapping") Cc: stable@dpdk.org Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> --- drivers/net/mlx5/mlx5_txq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index c750082..1a76f6e 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -314,7 +314,7 @@ txq_uar_ncattr_init(struct mlx5_txq_ctrl *txq_ctrl, size_t page_size) { struct mlx5_priv *priv = txq_ctrl->priv; - unsigned int cmd; + off_t cmd; txq_ctrl->txq.db_heu = priv->config.dbnc == MLX5_TXDB_HEURISTIC; txq_ctrl->txq.db_nc = 0; -- 1.8.3.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix doorbell register offset type 2020-01-13 14:22 ` [dpdk-dev] [PATCH] net/mlx5: fix doorbell register offset type Viacheslav Ovsiienko @ 2020-01-13 14:29 ` Matan Azrad 2020-01-15 10:09 ` Raslan Darawsheh 1 sibling, 0 replies; 7+ messages in thread From: Matan Azrad @ 2020-01-13 14:29 UTC (permalink / raw) To: Slava Ovsiienko, dev; +Cc: Raslan Darawsheh, Ori Kam, Shahaf Shuler, stable From: Viacheslav Ovsiienko > The doorbell register is mapped using mmap() and offset must have off_t > instead of unsigned int. Bug is not critical due to only least significant bits of > offset are currently tested to determine mapping mode. > > Fixes: 8409a28573d3 ("net/mlx5: control transmit doorbell register mapping") > Cc: stable@dpdk.org > > Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com> ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix doorbell register offset type 2020-01-13 14:22 ` [dpdk-dev] [PATCH] net/mlx5: fix doorbell register offset type Viacheslav Ovsiienko 2020-01-13 14:29 ` Matan Azrad @ 2020-01-15 10:09 ` Raslan Darawsheh 1 sibling, 0 replies; 7+ messages in thread From: Raslan Darawsheh @ 2020-01-15 10:09 UTC (permalink / raw) To: Slava Ovsiienko, dev; +Cc: Matan Azrad, Ori Kam, Shahaf Shuler, stable Hi, > -----Original Message----- > From: Viacheslav Ovsiienko <viacheslavo@mellanox.com> > Sent: Monday, January 13, 2020 4:23 PM > To: dev@dpdk.org > Cc: Matan Azrad <matan@mellanox.com>; Raslan Darawsheh > <rasland@mellanox.com>; Ori Kam <orika@mellanox.com>; Shahaf Shuler > <shahafs@mellanox.com>; stable@dpdk.org > Subject: [PATCH] net/mlx5: fix doorbell register offset type > > The doorbell register is mapped using mmap() and offset must have off_t > instead of unsigned int. Bug is not critical due to only least significant bits of > offset are currently tested to determine mapping mode. > > Fixes: 8409a28573d3 ("net/mlx5: control transmit doorbell register mapping") > Cc: stable@dpdk.org > > Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com> > --- > drivers/net/mlx5/mlx5_txq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c > index c750082..1a76f6e 100644 > --- a/drivers/net/mlx5/mlx5_txq.c > +++ b/drivers/net/mlx5/mlx5_txq.c > @@ -314,7 +314,7 @@ > txq_uar_ncattr_init(struct mlx5_txq_ctrl *txq_ctrl, size_t page_size) { > struct mlx5_priv *priv = txq_ctrl->priv; > - unsigned int cmd; > + off_t cmd; > > txq_ctrl->txq.db_heu = priv->config.dbnc == > MLX5_TXDB_HEURISTIC; > txq_ctrl->txq.db_nc = 0; > -- > 1.8.3.1 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-01-15 10:09 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-06-12 5:32 [dpdk-dev] [PATCH] net/mlx5: fix 32b compilation Shahaf Shuler 2019-06-12 21:25 ` Yongseok Koh 2019-06-13 13:29 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit 2019-06-13 13:35 ` Ferruh Yigit 2020-01-13 14:22 ` [dpdk-dev] [PATCH] net/mlx5: fix doorbell register offset type Viacheslav Ovsiienko 2020-01-13 14:29 ` Matan Azrad 2020-01-15 10:09 ` Raslan Darawsheh
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).