patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] common/cnxk: fix unaligned access to device memory
@ 2022-04-20  6:38 psatheesh
  2022-05-03  7:59 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: psatheesh @ 2022-04-20  6:38 UTC (permalink / raw)
  To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
  Cc: dev, Satheesh Paul, stable

From: Satheesh Paul <psatheesh@marvell.com>

Use mbox_memcpy() instead of memcpy() to prevent unaligned access.

Fixes: 1f66919817e ("common/cnxk: improve MCAM entries management")
Cc: stable@dpdk.org

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
---
 drivers/common/cnxk/roc_npc_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_npc_utils.c b/drivers/common/cnxk/roc_npc_utils.c
index f9768ea3cf..0d02872c8b 100644
--- a/drivers/common/cnxk/roc_npc_utils.c
+++ b/drivers/common/cnxk/roc_npc_utils.c
@@ -582,7 +582,7 @@ npc_allocate_mcam_entry(struct mbox *mbox, int prio,
 	if (!rsp_cmd->count)
 		return -ENOSPC;
 
-	memcpy(rsp_local, rsp_cmd, sizeof(*rsp));
+	mbox_memcpy(rsp_local, rsp_cmd, sizeof(*rsp));
 
 	return 0;
 }
-- 
2.25.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] common/cnxk: fix unaligned access to device memory
  2022-04-20  6:38 [dpdk-dev] [PATCH] common/cnxk: fix unaligned access to device memory psatheesh
@ 2022-05-03  7:59 ` Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2022-05-03  7:59 UTC (permalink / raw)
  To: Satheesh Paul, Ferruh Yigit, Andrew Rybchenko
  Cc: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
	dpdk-dev, dpdk stable

On Wed, Apr 20, 2022 at 12:08 PM <psatheesh@marvell.com> wrote:
>
> From: Satheesh Paul <psatheesh@marvell.com>
>
> Use mbox_memcpy() instead of memcpy() to prevent unaligned access.
>
> Fixes: 1f66919817e ("common/cnxk: improve MCAM entries management")
> Cc: stable@dpdk.org
>
> Signed-off-by: Satheesh Paul <psatheesh@marvell.com>

Acked-by: Jerin Jacob <jerinj@marvell.com>
Applied to dpdk-next-net-mrvl/for-next-net. Thanks


> ---
>  drivers/common/cnxk/roc_npc_utils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/common/cnxk/roc_npc_utils.c b/drivers/common/cnxk/roc_npc_utils.c
> index f9768ea3cf..0d02872c8b 100644
> --- a/drivers/common/cnxk/roc_npc_utils.c
> +++ b/drivers/common/cnxk/roc_npc_utils.c
> @@ -582,7 +582,7 @@ npc_allocate_mcam_entry(struct mbox *mbox, int prio,
>         if (!rsp_cmd->count)
>                 return -ENOSPC;
>
> -       memcpy(rsp_local, rsp_cmd, sizeof(*rsp));
> +       mbox_memcpy(rsp_local, rsp_cmd, sizeof(*rsp));
>
>         return 0;
>  }
> --
> 2.25.4
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-03  7:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-20  6:38 [dpdk-dev] [PATCH] common/cnxk: fix unaligned access to device memory psatheesh
2022-05-03  7:59 ` Jerin Jacob

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).