* [dpdk-dev] [PATCH] common/mlx5: fix output buffer size calculation
@ 2021-02-18 16:18 Dekel Peled
2021-02-21 11:52 ` Raslan Darawsheh
0 siblings, 1 reply; 2+ messages in thread
From: Dekel Peled @ 2021-02-18 16:18 UTC (permalink / raw)
To: matan, shahafs, viacheslavo; +Cc: dev, stable
Previous patch included a glue function call, with wrong size
calculation for an output buffer.
This patch fixes the issue, using the correct size calculation.
Fixes: bb7ef9a96281 ("common/mlx5: add register access DevX routine")
Cc: stable@dpdk.org
Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Slava Ovsiienko <viacheslavo@nvidia.com>
---
drivers/common/mlx5/mlx5_devx_cmds.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index cc70c794e7..0185d57036 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -53,8 +53,8 @@ mlx5_devx_cmd_register_read(void *ctx, uint16_t reg_id, uint32_t arg,
MLX5_SET(access_register_in, in, register_id, reg_id);
MLX5_SET(access_register_in, in, argument, arg);
rc = mlx5_glue->devx_general_cmd(ctx, in, sizeof(in), out,
- MLX5_ST_SZ_DW(access_register_out) *
- sizeof(uint32_t) + dw_cnt);
+ MLX5_ST_SZ_BYTES(access_register_out) +
+ sizeof(uint32_t) * dw_cnt);
if (rc)
goto error;
status = MLX5_GET(access_register_out, out, status);
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] common/mlx5: fix output buffer size calculation
2021-02-18 16:18 [dpdk-dev] [PATCH] common/mlx5: fix output buffer size calculation Dekel Peled
@ 2021-02-21 11:52 ` Raslan Darawsheh
0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2021-02-21 11:52 UTC (permalink / raw)
To: Dekel Peled, Matan Azrad, Shahaf Shuler, Slava Ovsiienko; +Cc: dev, stable
Hi,
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Dekel Peled
> Sent: Thursday, February 18, 2021 6:18 PM
> To: Matan Azrad <matan@nvidia.com>; Shahaf Shuler
> <shahafs@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] common/mlx5: fix output buffer size calculation
>
> Previous patch included a glue function call, with wrong size
> calculation for an output buffer.
> This patch fixes the issue, using the correct size calculation.
>
> Fixes: bb7ef9a96281 ("common/mlx5: add register access DevX routine")
> Cc: stable@dpdk.org
>
> Signed-off-by: Dekel Peled <dekelp@nvidia.com>
> Acked-by: Slava Ovsiienko <viacheslavo@nvidia.com>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-21 11:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18 16:18 [dpdk-dev] [PATCH] common/mlx5: fix output buffer size calculation Dekel Peled
2021-02-21 11:52 ` 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).