From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 56000A04B1; Wed, 23 Sep 2020 12:59:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B4AAB1DB76; Wed, 23 Sep 2020 12:59:06 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 1DC1C1C2E7 for ; Wed, 23 Sep 2020 12:59:04 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 08NAtlLU003077; Wed, 23 Sep 2020 03:59:04 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pfpt0220; bh=4w5A1YILsUQmS6PNbldqLzX2JdGTMBEZDqEMY1J76gw=; b=PT5SZ87NmE+O9z82iiOSv1v01RYLBHcACX4p2AjR6TfCIlpUhIXruAo92uMVyTr6tFlp JKFuEBX13I4D3mG0KWcVBUKSiAgsw901A1Y/tGL5CGK605B23CrPgVkuWztSgLuzSrXR wZUUBqsH/PipdMF1P78m+4U2hXIsJQh4FoghmRP5rv4zupWpN5FotBSXtmX+i1Gr3Jvf QisBGOz2/MZHnV1W+k4V5WIeLwt36agFGHt46uUynxp7BMrt7CcupQyJPjlrHPT5Zv13 uVTpn8Uc7HkgqTiY8RLeP14aswR/tzNbdfwJPUyuSm8EGBXHSTfBKEMScZ3D25FR48ye EQ== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0a-0016f401.pphosted.com with ESMTP id 33nfbpxq5b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 23 Sep 2020 03:59:04 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 23 Sep 2020 03:59:03 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 23 Sep 2020 03:59:02 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 23 Sep 2020 03:59:01 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NVZc4QzaYB3TbXdJn8psCDXMseW7AS4iNpn9JESXEnptwb4IFs4DLod8Fm7NpCMykGNJEO4yqRQxMG5HPATAEkjaHaKZs34rIUc/kVPoREXjZ6LHaC8qLV+nL3mC0n2j+v54GbPNTMMVrCglfQLvvqpWFpSJelEnPNA41meRQqOGpgh889P/6xBWvbT6GbwqadTAAzxOSbKZLu6UtKgGu94RXmee6nShJxA9+pWdUrMNDzUGZkp2RIvuSb5euB08qyXI/mgAvpWabBLgsUgATzNq+fX/jp9cIzdt1cqsGccoOlOKvZPOYF7ZGolb6Z1DA52tmOT1+wV7ZqfX9QKerQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4w5A1YILsUQmS6PNbldqLzX2JdGTMBEZDqEMY1J76gw=; b=NacYE9yleF1Ksd3qE+CXrg/Fip/4GQKr6ZiAxJI+8emiBLyNaIrdtAYbVFzbK/rDyDbGtMhqLk/sI+RxorjUMq563vF8d/1xoi8HFXP7iTuyi9l+4RgrZys1z3A5sWJIQXRGuNCZR4ya67rwPOCMZt3k2Iq1od/U68BJJv93ssJdJq10G6YW12k7u+AZYHRlY5CZw2pgBYYwZ7ieQmamuAvMsjTv7Y01t4uWvApvnTVEutLw/D2emoSMLSRzng4FnpQ6bN+qAEHpA0EBUewdAgQhKy7VSbhVrREnVSjieWhrgfbOOYB49myT+aORxTXIEdu3fBxNaAxCz5kqBYRJfQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4w5A1YILsUQmS6PNbldqLzX2JdGTMBEZDqEMY1J76gw=; b=CzeaSaPPmfnTz/+ulRGIqDVLZpfeNTPrqApQO7f7/CuV5rPA6gQP9bFPgwpgdJbBnI180V0og4kJgOMJmM0aLcNvyB2rVxIfXMy+UgQBEAtQTJmN+mhq5arDAnGmJHyBplyLsh98ksP6h2uzXD9sqZVTPu60dLDHoZKs0jTZ9qY= Received: from CY4PR18MB1622.namprd18.prod.outlook.com (2603:10b6:903:150::14) by CY4PR18MB1672.namprd18.prod.outlook.com (2603:10b6:903:144::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.20; Wed, 23 Sep 2020 10:58:59 +0000 Received: from CY4PR18MB1622.namprd18.prod.outlook.com ([fe80::4491:a00:867d:ded1]) by CY4PR18MB1622.namprd18.prod.outlook.com ([fe80::4491:a00:867d:ded1%10]) with mapi id 15.20.3412.020; Wed, 23 Sep 2020 10:58:59 +0000 From: Sunil Kumar Kori To: Sarosh Arif , Jerin Jacob Kollanukkaran , Nithin Kumar Dabilpuram CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] drivers/common/octeontx2: use generic memory management Thread-Index: AQHWWRa5SAWAsZMn3Eu4zCDaAk5lAKl2fABA Date: Wed, 23 Sep 2020 10:58:59 +0000 Message-ID: References: <20200713130053.31851-1-sarosh.arif@emumba.com> In-Reply-To: <20200713130053.31851-1-sarosh.arif@emumba.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: emumba.com; dkim=none (message not signed) header.d=none;emumba.com; dmarc=none action=none header.from=marvell.com; x-originating-ip: [2401:4900:44e1:fa56:6cb9:7cd8:57bc:4518] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3de589e7-5fba-4574-b6ab-08d85fafacee x-ms-traffictypediagnostic: CY4PR18MB1672: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5WqhN35vrAoNPx47M6TZLZH+2ahJrWCWajd3uCVRKe8KUTrnWTlXzfu9xiXobHmUFTkIoyhrSV7cvHVCToQB0y6lsj+Egv/urPndH7Ic/gxnhx5nuMCXxmQgcI5eT2jMWcmki8GGgM56h057UgUGhZBKSKYYi0QxvX1NoIlVbZ/u/0sdfx2jR5kQVjODnU4C0K+Nha4oD0NqQ9wdjOotazMgmVSoEuUCuWaHZJZI7lzWirHd+8y8qdPlIPLEqvwmUwUTwoYuVQN7FYSN7Jxu8xJf3v8WOuu9XKu/SLu4YptCo7dVy0Gg0JZmblpYzBpnYnkjYib5TXpDpftJNRQyyAfSBA9YqUZz4WtN7y5ErwwYn0MHH7cgK8jQJDPRgjG+ x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR18MB1622.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39860400002)(346002)(396003)(376002)(136003)(8936002)(5660300002)(7696005)(186003)(478600001)(66446008)(64756008)(6636002)(6506007)(66946007)(66556008)(66476007)(76116006)(4326008)(86362001)(83380400001)(52536014)(55016002)(110136005)(33656002)(2906002)(316002)(9686003)(71200400001)(41533002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: ZKRue5Eva1fSsy/RD7DpGqHUVccbjWKP/A4Vm1H+Mp36MNgkDcTdTKnF7pL69tKu0feaxAaCH5dLNMz7UiCe6PgrPdzMXEWCaG7VDP6UiSOVT8sFOKRKc6KOPSqNMF2azLWkEJYql7YRRhaHCGvdOfImM/MYdylX1sXEFHXp61onn3FonFkR/pMcgwLyHPHqAwSWZU38PzLTKjrdLeJr7byKO90X8GZQ83Y0U2RO2xiRLTShsY6J8aSD5t22oaxucSH6KQodah4ntlQ5kXOa+1eNvW+7vZVYvYD/fDOvT1rxQ+PQmqKrVkN1VcoDx5F3ameSfNHldoCfmzGx9jpbhx3J5sOd0bNUUN8tngmJIKuPtYLEFaoFScJr1ApsBSPxsSyF5Ii6ViEy1/g+jcKTlLG3MXIZjWCaOwF1BoMori1B6mzABX52RDzDMKiFaB1KgeCgHFqskI0sFxYVCerNMtDM7puHz+nqvp/es23FoSovO+knvvUxwZ+LRl3mSuXKG4FZlCoP0SLek2Q7NMGkmEVtKihZbASovo643cYBArw2TzwOI6I47noTOLGz4C1uaQCs2Q+QYU1ZrztcqnwbXPLLlHFJSIkSrDahbuKdG0nVDGfLBa93cgUg7MPa/TwA1+tSaFqhEXDX2b9bei7rmm8bsdLaSZURcUs7HCZQqFjhApHO5uh8jV2TJV7kOO24DWWZdeeCflxKjf5LD0FNBg== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR18MB1622.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3de589e7-5fba-4574-b6ab-08d85fafacee X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Sep 2020 10:58:59.7286 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9JXeHENyLNpYrnAinAu0w3Luh0+98Zj+rhF1lb4PtVLPmTlQwO1cqFxFGfy3G5xQiF55VOFFaCnlCPlPSHJJng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR18MB1672 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-09-23_07:2020-09-23, 2020-09-23 signatures=0 Subject: Re: [dpdk-dev] [PATCH] drivers/common/octeontx2: use generic memory management X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Comments inline. >-----Original Message----- >From: dev On Behalf Of Sarosh Arif >Sent: Monday, July 13, 2020 6:31 PM >To: Jerin Jacob Kollanukkaran ; Nithin Kumar >Dabilpuram >Cc: dev@dpdk.org; Sarosh Arif >Subject: [dpdk-dev] [PATCH] drivers/common/octeontx2: use generic memory >management > Change subject line to "common/ octeontx2: fix memory mapping API's usage"= =20 >Use generic memory management calls instead of Unix memory management >calls for mempool. > IMO, generic memory management calls implies to Unix calls. Better to updat= e the comment accordingly. Also please add fixes tag. >Signed-off-by: Sarosh Arif >--- > drivers/common/octeontx2/otx2_dev.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/drivers/common/octeontx2/otx2_dev.c >b/drivers/common/octeontx2/otx2_dev.c >index d61c712fa..06ff41b59 100644 >--- a/drivers/common/octeontx2/otx2_dev.c >+++ b/drivers/common/octeontx2/otx2_dev.c >@@ -11,6 +11,7 @@ > #include > #include > #include >+#include > > #include "otx2_dev.h" > #include "otx2_mbox.h" >@@ -34,10 +35,11 @@ mbox_mem_map(off_t off, size_t size) > if (mem_fd < 0) > goto error; > >- va =3D mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, >mem_fd, off); >+ va =3D rte_mem_map(NULL, size, RTE_PROT_READ | RTE_PROT_WRITE, >+ RTE_MAP_SHARED, mem_fd, off); > close(mem_fd); > >- if (va =3D=3D MAP_FAILED) >+ if (va =3D=3D NULL) > otx2_err("Failed to mmap sz=3D0x%zx, fd=3D%d, off=3D%jd", > size, mem_fd, (intmax_t)off); > error: >@@ -48,7 +50,7 @@ static void > mbox_mem_unmap(void *va, size_t size) > { > if (va) >- munmap(va, size); >+ rte_mem_unmap(va, size); > } > > static int >-- >2.17.1