[dpdk-dev] [PATCH] common/cnxk: fix unaligned access to device memory

Jerin Jacob jerinjacobk at gmail.com
Tue May 3 09:59:29 CEST 2022


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

Acked-by: Jerin Jacob <jerinj at 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
>


More information about the stable mailing list