[PATCH 1/2] common/cnxk: fix mbox region copy
Harman Kalra
hkalra at marvell.com
Thu Dec 21 07:38:10 CET 2023
Using proper API to perform copy to mbox device memory region
Fixes: 02719901d50f ("common/cnxk: send link status event to VF")
Cc: stable at dpdk.org
Signed-off-by: Harman Kalra <hkalra at marvell.com>
---
drivers/common/cnxk/roc_dev.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/common/cnxk/roc_dev.c b/drivers/common/cnxk/roc_dev.c
index e7e89bf3d6..084343c3b4 100644
--- a/drivers/common/cnxk/roc_dev.c
+++ b/drivers/common/cnxk/roc_dev.c
@@ -198,9 +198,8 @@ af_pf_wait_msg(struct dev *dev, uint16_t vf, int num_msg)
vf_msg = mbox_alloc_msg(&dev->mbox_vfpf_up, vf, sz);
if (vf_msg) {
mbox_req_init(MBOX_MSG_CGX_LINK_EVENT, vf_msg);
- memcpy((uint8_t *)vf_msg +
- sizeof(struct mbox_msghdr), &linfo,
- sizeof(struct cgx_link_user_info));
+ mbox_memcpy((uint8_t *)vf_msg + sizeof(struct mbox_msghdr), &linfo,
+ sizeof(struct cgx_link_user_info));
vf_msg->rc = msg->rc;
vf_msg->pcifunc = msg->pcifunc;
--
2.18.0
More information about the stable
mailing list