From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 79F964373A; Thu, 21 Dec 2023 07:38:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54B45402EA; Thu, 21 Dec 2023 07:38:34 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 6AECE402E5; Thu, 21 Dec 2023 07:38:33 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BL6IGIt019052; Wed, 20 Dec 2023 22:38:32 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:mime-version:content-type; s= pfpt0220; bh=XcXY827QeAhyBRHbze6bb6+dxR0jQBMiwvhXmWGl0TE=; b=W88 ySSMG0y2zQ+t+UgXScoaXr0RaU2C9Fxbv69zIyd6QCIZgYyA8fg+YdZCybUJ4YSz VKSnke8tPb7jDigGj5Pj3V1RqaVCxx2LnBh7ruKcncrfIbGV5S6zrb6aURd0e2+R rN/hk1wXidOCgsSZycXRsIUr5kHJUk1hE53pxXk7CdfbHDYRm3PPd7NfK7/wzwON L2yHibXLzKtdw8H0vwCv2CtP+KaDL4hAF8gaAWhrN48amvb4Fk7/Q5siMZrFyw2t P7cXuVbAWhj0tyF83FBavrIIv/NgQH08pysi4yftyzDvLkZlpJZQrsJeZNXXNUDH Kdo3g95Su4JDz1EnTQQ== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3v4fyr037x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 20 Dec 2023 22:38:32 -0800 (PST) Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 20 Dec 2023 22:38:30 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Wed, 20 Dec 2023 22:38:30 -0800 Received: from localhost.localdomain (unknown [10.29.52.211]) by maili.marvell.com (Postfix) with ESMTP id C80793F7057; Wed, 20 Dec 2023 22:38:27 -0800 (PST) From: Harman Kalra To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , , Harman Kalra , Subject: [PATCH 1/2] common/cnxk: fix mbox region copy Date: Thu, 21 Dec 2023 12:08:10 +0530 Message-ID: <20231221063811.17376-1-hkalra@marvell.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: 4su7V-sdqJrQmCk8JKHHTj8_9I_B58KL X-Proofpoint-ORIG-GUID: 4su7V-sdqJrQmCk8JKHHTj8_9I_B58KL X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Using proper API to perform copy to mbox device memory region Fixes: 02719901d50f ("common/cnxk: send link status event to VF") Cc: stable@dpdk.org Signed-off-by: Harman Kalra --- 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