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 5F678A09E0; Sat, 14 Nov 2020 22:51:37 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3CA01C882; Sat, 14 Nov 2020 22:51:36 +0100 (CET) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by dpdk.org (Postfix) with ESMTP id E8D2EC87A for ; Sat, 14 Nov 2020 22:51:33 +0100 (CET) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sat, 14 Nov 2020 13:51:36 -0800 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 14 Nov 2020 21:51:30 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.174) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sat, 14 Nov 2020 21:51:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HjwNtC8nHixPRyKZqEl2QVOdz/f9Jrh7nE+Bl0s7ofM8a8QW4/MEDhhsRXyq83uav6UT29CCIz++HJR81qHwlpGi914u1ZWMoKajrjBtwSFZ0Zgt8dMSXC4uBYujWXjpgR1C3S0mfvzZOOw2OLq7M7PtHhlGXi7QcXeelopqtpNyvdPlcbibSxmE8mQ4ZYuOzbH8hU1yGSL9q5NHD+lt77R4yeVG6q0UqVhhutnM+q3aw8A7NV9J2kN2md/88gznsKvp+fV5IO0iwzCwgD4tysJ3rgzKYxAIedmhKOFAKMCl42BuMB+4D+VmgMZ1Gh81o0RFrEmIYKknPkLxHmwWiw== 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=IX3Kq/j9xhgXLzSz6bfv2Kz+yoPb9TpbJ8PAWysn+c0=; b=h4IYzqDWhGXRTtAWINZPq3zUhMVp9lVp+ppTl52k5EecFRlQ2mbfnantW9aadAUrQ/sEyOZTi1HtGfiqgJFD72sgWKtcfqTevmig6F+AD/Zku5PItdmbs0uLF4RlUvX19PNSqcU7LrnKs6cnbGooP31Qh5EErNbdfjA00ILwO9v7qdhzdHj95VFPNft9ZPsCLqpCIbeoKdB0w/ZGYZHrPt/V6dZiCFs04sN5PJp/CWG1VoHbZLgBfaUAhCzLjj16LTVcczOMDQBA4TL8hONFANoMsZ9aRD5eC2IayBHu0yGXiV3slManQTX9e9wtwr6TXTOFO/8RY6i0dquvTjebPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from CY4PR1201MB2548.namprd12.prod.outlook.com (2603:10b6:903:d8::18) by CY4PR1201MB0183.namprd12.prod.outlook.com (2603:10b6:910:20::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.21; Sat, 14 Nov 2020 21:51:27 +0000 Received: from CY4PR1201MB2548.namprd12.prod.outlook.com ([fe80::bc62:8762:4cb9:52dd]) by CY4PR1201MB2548.namprd12.prod.outlook.com ([fe80::bc62:8762:4cb9:52dd%12]) with mapi id 15.20.3541.026; Sat, 14 Nov 2020 21:51:27 +0000 From: Tal Shnaiderman To: Narcisa Ana Maria Vasile , Ophir Munk CC: "dev@dpdk.org" , Raslan Darawsheh , Matan Azrad , NBU-Contact-Thomas Monjalon Thread-Topic: [dpdk-dev] [PATCH v1 27/72] common/mlx5/windows: add OS alloc/dealloc pd Thread-Index: AQHWrL10LfsDJvWoNUeDoRJvY7bnqqnCJOeAgAYiCKA= Date: Sat, 14 Nov 2020 21:51:27 +0000 Message-ID: References: <20201027232335.31427-1-ophirmu@nvidia.com> <20201027232335.31427-28-ophirmu@nvidia.com> <20201111001125.GG9449@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> In-Reply-To: <20201111001125.GG9449@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linux.microsoft.com; dkim=none (message not signed) header.d=none;linux.microsoft.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [77.137.114.72] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 375559eb-6912-4633-f2d6-08d888e77077 x-ms-traffictypediagnostic: CY4PR1201MB0183: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4714; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: VJwv20FYtJn2tRfAeraO+ZOlG35zRqQ+h53Ib+okn3v64dBo+/RuczGpCqu7v/0OofRrLm5pNeeqNI7LGEMHpO+TXb4gVW3++CuRJgVmW75r2qA6JeHt5eTBVplxDYfatIUlEQnbsYoP6E1njeVZR2wXkDhyeAG0sY4gLxdZ0wqSDrkIIiOczM6VnHGav4ta8c4KEC6fZ1fVnV1uWYo7Q1sogAjSLOPO1PQ5BffBjFXso2rRdVGWJFNOQDPeOqkLbtOwov/LYcuIlTL/eGXt+pAdyGoSvhDy9tMJlFtx/DiaoqfvNj88hxh0i1U3MjRatryd74Vzzn7pKFEwoPIJPg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY4PR1201MB2548.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(346002)(39850400004)(136003)(376002)(33656002)(7696005)(64756008)(66946007)(5660300002)(478600001)(2906002)(66446008)(9686003)(186003)(86362001)(26005)(4326008)(52536014)(76116006)(66556008)(66476007)(8936002)(83380400001)(110136005)(55016002)(54906003)(71200400001)(6506007)(316002)(6636002)(8676002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: ZNGblDUw/VcdGW9V8xFDj8jruhK9eM1++nEQzCvIv5w/F8a6usWp5BvZ9907AnV2tWprw8ixD6YX69IsKfKUNHN9TQm8Bj6GZAASe3+QBUdNnk7PVWOrivZj42LVNl2ovRCtuRXduXyw2DIs6YOL3teElT5kxfdH3bIDdNrUt1HgTZjbhDH0M11JAzn7Hfq0XekKXQv1gtb5f5u0HFj/jfanc3ZUsTdaM68uTJ8/sZF1KdZICaN9s0gNcEthyPiKOmtYMP1owq0klcLQdhxFvTgKA9X4Zc5NbMRPLE6wkdYjJ/JsO54A94q3MOHOkjYQL+ygJARFQ0uEGWir2ltBcwKZAls/x70tn4VqwH0xsQAlaSxc4r80YbsY7ieqCqsTAtvtulFhVBh5UAuOmDIcN6QO9xSByr/Rmst8cLy0h+/jn0NQvaMpFp/G0F4Lz0KmCE3mkgI0bfgAps5ONI01eMyeMadPOHftsz3YHMjUdoUjusiOQKVAZJJmJOij1sa4VUs2GgmW6RwO3u1qkwRu0jeEybIZNNORA+76ilV3ldSCZaxwP6yDhj/FurQ7UkWpelmGo+fXrbxAROjxeb7PfDD1U2zGWdHdSQpIUtx0tLuCBsu/EqCfe8xvFSgZnljhqDb55gTtT9HrjaKPq9J4YSQiTdRhnjsl/yUGx4Ydb0jDvkw6UBL8H6gvGXHriPwOU08wqY/aF6/DaeAzfA8gpZmsVmhCtGSQnxSdQ7VhfrZv5ljBHwv+iCa4oWDZDxKSkcZcHMFYPifz41daEGTsydtUyl1FcyH53qUpQDvHLLco3BwCelUTTZ7MWX4TdywfzyMs8lDZKouPHWJjAaNX/sCN027sPGAfYG3zwlUpboJaCidZArYrSjd2zl1wYgTs1tR0pu5xrhRiKIQV/PI0/w== 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: CY4PR1201MB2548.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 375559eb-6912-4633-f2d6-08d888e77077 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Nov 2020 21:51:27.6648 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: bIz3qPl7BTgDhn7RsXOJ2dAQoEAG+f4xCOXlrE+z/og+yxOuoguMzWvFqCUVV5wNwk8y9kznsdKciuBO1F0RBA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1201MB0183 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1605390696; bh=IX3Kq/j9xhgXLzSz6bfv2Kz+yoPb9TpbJ8PAWysn+c0=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-ms-exchange-transport-forked:x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers:x-ms-exchange-senderadcheck: x-microsoft-antispam:x-microsoft-antispam-message-info: x-forefront-antispam-report:x-ms-exchange-antispam-messagedata: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=EPSDuIt6H0XTUDFoldomraUObD5AUCZ8qrbHUfT2LmqUyEIlZ+OTIDe3CRzOwt0uE RMp+B83i+rRAPcqtO747su8xftqOTi08VNaKITnsTnLDs/NGGkEyME1mRiI0rhIg7y 6dagqJUXhW0VSGcuxXCbp0xCeq6A/noAzPxfmW/sBk9ct1Q2nG+Dc5FoCRbdv1974X k63SayTkLV7CDVGdxwQLi93OFMnA3PtiGdNZYqVUlxcy9KqTeLwybHqInQONvgusZ7 9FKHG3nFWmV+LKbojYU6pDFsdrXuyDSBSO6LnG/2VnKVwpneWAzBvlHk3/GA8H3tA6 /SmOmPE4flcdw== Subject: Re: [dpdk-dev] [PATCH v1 27/72] common/mlx5/windows: add OS alloc/dealloc pd 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" > Subject: Re: [dpdk-dev] [PATCH v1 27/72] common/mlx5/windows: add OS > alloc/dealloc pd >=20 > On Tue, Oct 27, 2020 at 11:22:50PM +0000, Ophir Munk wrote: > > From: Tal Shnaiderman > > > > Implement Windows API mlx5_os_alloc_pd() and mlx5_os_dealloc_pd(). > > They are equivalent to the Linux implementation. > > > > Signed-off-by: Tal Shnaiderman > > Acked-by: Matan Azrad > > --- > > drivers/common/mlx5/rte_common_mlx5_exports.def | 3 +- > > drivers/common/mlx5/windows/mlx5_common_os.c | 47 > +++++++++++++++++++++++++ > > drivers/common/mlx5/windows/mlx5_common_os.h | 3 ++ > > drivers/common/mlx5/windows/mlx5_win_ext.h | 6 ++++ > > 4 files changed, 58 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/common/mlx5/rte_common_mlx5_exports.def > > b/drivers/common/mlx5/rte_common_mlx5_exports.def > > + * @return > > + * The mlx5_pd if pd is valid, NULL and errno otherwise. > > + */ > > +void * > > +mlx5_os_alloc_pd(void *ctx) > > +{ > > + struct mlx5_pd *ppd =3D mlx5_malloc(MLX5_MEM_ZERO, > > + sizeof(struct mlx5_pd), 0, SOCKET_ID_ANY); > > + if (!ppd) > > + return NULL; > > + > > + struct mlx5_devx_obj *obj =3D mlx5_devx_cmd_alloc_pd(ctx); > > + if (!obj) >=20 > Free ppd here, to avoid memory leak. Right, will do in v2. >=20 > > + return NULL; > > + > > + ppd->obj =3D obj; > > + ppd->pdn =3D obj->id; > > + ppd->devx_ctx =3D ctx; > > + return ppd; > > +} > > +