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 81F3AA034D; Mon, 3 Jan 2022 18:37:36 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20D8C40042; Mon, 3 Jan 2022 18:37:36 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2086.outbound.protection.outlook.com [40.107.94.86]) by mails.dpdk.org (Postfix) with ESMTP id 7FFC74003C for ; Mon, 3 Jan 2022 18:37:34 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mrURI2d80eclTBemj880BbG/NTs47InWrSR3is0CnkPhWh7MB18NTv3XVJHwCyudSRd9EtiNKxqmgZ9cyhFXIasU+dVlhnFcGEPZR6/R90qXJ0kLfNBi30OOjq8uHLkgGg5tHe4HwILwCF+u1MskVyH9vbrWsyxgsgbUzdRdZdsaPsvL9Fhn53apolcvYlq16RghDV6TM4h/1KAJx2cRZ6GC32Tmo8b85n9PSxHGGzLjaaMJ1J0tmPBzccs4+OCsapIfTcgHZO1SBR+D08C1b6GDd3HjJhsu8sJh1+l7Xl6isFAaPJj1inYwDPN5vuRsy1mU9nh3RRt8Xs0o3+Y0nQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2q4n+6rSYKLsjOyJoVrjK+/cQJINUs4HzTfU5L74/pc=; b=AmOuIzSmyOTXjQBQsGtpLdTrS4thC+4FBjybCnYnVwRXQPqcUtOD4XrsDbvc6oYayfgxk2B3VJ29g7jFMocoM5od0aUJnFphmRg8nYmGAZtui20s/6yxtaI4rFWy3XdwRN35qwgQ0x2McXA+mRZUKtkhmsgi2S29HG+2VKn8eoThif5qdn3pBWN73OvfGLJmLxC3Lfx5WFn8CMvk6Qma3UqTeXLjfuexjhHg+fib7EIdU0/ir8tKv+UNp11HulUgq5sY6K2GS0QsWKxXLOOPKuCGi2OarZqI+FXI6L/VwGqVOONh4t0ZfRm996litA5RaDzP9lBnlf7YRNsS1w0gwQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2q4n+6rSYKLsjOyJoVrjK+/cQJINUs4HzTfU5L74/pc=; b=TYGVlOO4STJ9K9G06KPQzhqUpCRpm5rPgkxGqbbzHdHBB7LrX6ikC16nOJ3ZUv+2gmiWFDWvCPSGhkZmbWxvC05vAas1VWNewTY/MqdssEkMdd2ZHZWYeHyK/tD4HjLIIxnp4CuqGorYNFm3wtN8gf/PS4yZor5ylxpcbZDLEtFJp/TrMhsO8XoYX+mIgt/hgvgqh0RN8PFzL03BU1pvPil0nhJSTNID4gjwKd47whzcg8guSI8C27/hTSAZUEurDxvs5JS2Y91D38xNC9TVBgPyXQNc2yakrVsK/yVF5oDpNkjv8iOIR3I7Rarx+cXjDxDI2m6Uym85JInIT6697g== Received: from BN6PR2001CA0023.namprd20.prod.outlook.com (2603:10b6:404:b4::33) by DM8PR12MB5415.namprd12.prod.outlook.com (2603:10b6:8:25::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4844.15; Mon, 3 Jan 2022 17:37:32 +0000 Received: from BN8NAM11FT052.eop-nam11.prod.protection.outlook.com (2603:10b6:404:b4:cafe::21) by BN6PR2001CA0023.outlook.office365.com (2603:10b6:404:b4::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4844.15 via Frontend Transport; Mon, 3 Jan 2022 17:37:32 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.234) by BN8NAM11FT052.mail.protection.outlook.com (10.13.177.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4844.14 via Frontend Transport; Mon, 3 Jan 2022 17:37:32 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 3 Jan 2022 17:37:31 +0000 Received: from nvidia.com (172.20.187.6) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.9; Mon, 3 Jan 2022 09:37:30 -0800 From: To: CC: Elena Agostini Subject: [PATCH v1 0/3] GPU memory aligned Date: Tue, 4 Jan 2022 01:47:18 +0000 Message-ID: <20220104014721.1799-1-eagostini@nvidia.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 078d805c-f65e-49df-e5e6-08d9cedfb8f2 X-MS-TrafficTypeDiagnostic: DM8PR12MB5415:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IigrzRgajJKjZnC6gh0vNYPGRzSdDLU9E8yGy3uA4T+dEn/ZUGcnHkDS5py3ntfK+ZTrFa+x2BE78TzEE2yRZywavxFUDAmC7wNob9CQhSyIe4326akrQEyqNDAtldqQ5kPJ70VdaGNnQOZpnX2QJjP2XCUuaKocKx71YZ1PLDiIvLbcdMZQql/NELXG/RhMWliyjI5oZngmyVEyN/Fl5G6q+RpC4oRNqjb0WOehhHpk9nUDSlqdY4ig+d8vniJZUOgTS7AWNRMXQTFBSvhDtYtGN/voHJy5RxAadvIrnl4Ruc69JtgHU2c9bm4ofAQmy9wgzx2RKDqDoNwI2/Y0UKSFfYfqxv+3T8chWxoS+OgM3vUUbPLUq/IvBsjtYBdjMC/CpOol2wKJxeKuIO6mi26B3Xjp7moSmsrUlOCDcLTBA+DRAadEM2STExr+CeNLr9sBqlEGY3LkEiOs7UpEQ3GAlZiva+e3elYVU1IjY2iWzLMJmpSDbQjlWY3yxJIvEVeFtdUIKZeCdM6f3PNuXGF+N3mu60BNdRIO0I7SD3us0xQ8DVsKpzf9+KYNIR16vsRF672uXLLDeMTPCq1VObRdEL/ApNAh/gmpZTeq6oeEF21hkfg0lhnyMZAO5kKpHsyGXBlHE2QyI4O9qttYrtj96I3qbHhrH1SQIja0ETHWVvVvF5GtklyVSkcL1HLoHumULHm1/eiG5d9Sb4xf05PydHM18EY0gx4HJPMlDHt+jmrCgq1YsR+Ed5OHZ5SnrS3atcqc6TzSR7cPolue27E1V8DujxeCtLmGo/NqLbc= X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(4636009)(46966006)(40470700002)(36840700001)(316002)(26005)(107886003)(8936002)(5660300002)(8676002)(2876002)(55016003)(36860700001)(356005)(336012)(508600001)(82310400004)(83380400001)(81166007)(4744005)(6916009)(70586007)(70206006)(16526019)(186003)(7696005)(40460700001)(47076005)(36756003)(6666004)(6286002)(2616005)(1076003)(2906002)(86362001)(426003)(4326008)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2022 17:37:32.3872 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 078d805c-f65e-49df-e5e6-08d9cedfb8f2 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT052.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5415 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 From: Elena Agostini Applications may need to allocate GPU memory buffers with memory address aligned to some value (e.g. page size). Similarly to the rte_malloc function, aligned size can be provided as input to rte_gpu_mem_alloc. This set of patches implements this functionality in the gpudev library and the GPU CUDA driver. Elena Agostini (3): gpudev: mem alloc aligned memory app/test-gpudev: test aligned memory allocation gpu/cuda: mem alloc aligned memory app/test-gpudev/main.c | 13 ++++++++++--- drivers/gpu/cuda/cuda.c | 21 ++++++++++++++++----- lib/gpudev/gpudev.c | 10 ++++++++-- lib/gpudev/gpudev_driver.h | 2 +- lib/gpudev/rte_gpudev.h | 10 +++++++--- 5 files changed, 42 insertions(+), 14 deletions(-) -- 2.17.1