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 63308A0C54; Fri, 3 Sep 2021 17:36:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5172D4115F; Fri, 3 Sep 2021 17:36:11 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 05A35410D8 for ; Fri, 3 Sep 2021 17:36:09 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10096"; a="206569578" X-IronPort-AV: E=Sophos;i="5.85,265,1624345200"; d="scan'208";a="206569578" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2021 08:36:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,265,1624345200"; d="scan'208";a="692315174" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga005.fm.intel.com with ESMTP; 03 Sep 2021 08:36:08 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 3 Sep 2021 08:36:08 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 3 Sep 2021 08:36:07 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Fri, 3 Sep 2021 08:36:06 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.101) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Fri, 3 Sep 2021 08:36:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cEJVAxw0T9cBnpn0uiQZUMq+ohn1JQZy7zINZVd72oUVJiDpK4H7MS8dyVm6Ut9wRzS7oVzWWMwqJ7hIP6hHnZtXZhMW9/ABF7wcPuqYndhsbkAwVIk7qgA/9qAbWItna+A+A2E/brJAZLJk3u33uXpovm0NAwNPlq35+Sr39iDlIEIkAxM+CkiI6JzaGf9hzVmlRrZcw+l8+ip8zT1bDgQH5nlb3fuF4i4gOLTvj3AV33Mz8KlLQe8OxwONzM/ObQh5pc67fF1qznXfydjeArCCWpxhhiYBB6/nosvbw5HiHGzbbe42oOoXRM+T0a0agIilOyT2YQ1GH6+bM5DqrQ== 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; bh=S4/+zNBs6KHQ+lGfySrbfXlQ8TJ4riQT6fcqPCfVFlU=; b=Fqv1Ur9SB3oWhRYrIBwQ9auxWww0kOFS0C5BELPgDugK9YCdh1JbLsLr0EcqiEzYh4m1uFaXY4+d45V8tlR42GIdU1S6S9SIHtQFTEHHgdMRoqR3RfqTVu+ZNZVSEYZEfEHBM7XS6ope9m5J47jJVJhjsPwsjULIlz2iplmO9M040EHNh2pXDCXOd/c8OdcWa+eu6MOmKlsN16lU2HefbQbd8mJ4H218vLsHZODeIxzwJ5Prn9fyqJkYPMWZhrOqtGzDE91xgiR6rwWPPfV1FsQpLW+1MZ7KMICAFDobNSJnDUJIzGLwmLmWiGtO9nwXC59ZRAsU+aS62jkOZ0mmOg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=S4/+zNBs6KHQ+lGfySrbfXlQ8TJ4riQT6fcqPCfVFlU=; b=erp/VoT7jyvXSjRqpzX7MvLAJr8iOqwNFfHoXobyLWzU4X1nRSIJl1E3hKKhc5/YQoRswiqdmlzmfL+VA/yfa65f4ZKBDvxqVg8YajWLEILZF496ZpOfkfyRfyHpMJ4EhbbaNQURfEl9lWjFeHQxvOmxt4z0sQO2Q95o779wv6U= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5207.namprd11.prod.outlook.com (2603:10b6:510:32::15) by PH0PR11MB5205.namprd11.prod.outlook.com (2603:10b6:510:3d::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.21; Fri, 3 Sep 2021 15:36:04 +0000 Received: from PH0PR11MB5207.namprd11.prod.outlook.com ([fe80::c42e:f6ab:d4d6:dc8a]) by PH0PR11MB5207.namprd11.prod.outlook.com ([fe80::c42e:f6ab:d4d6:dc8a%6]) with mapi id 15.20.4478.023; Fri, 3 Sep 2021 15:36:04 +0000 To: Chengwen Feng , , , , , , CC: , , , , , , , , , References: <1625231891-2963-1-git-send-email-fengchengwen@huawei.com> <1630588395-2804-1-git-send-email-fengchengwen@huawei.com> <1630588395-2804-5-git-send-email-fengchengwen@huawei.com> From: Conor Walsh Message-ID: Date: Fri, 3 Sep 2021 16:35:57 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 In-Reply-To: <1630588395-2804-5-git-send-email-fengchengwen@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-ClientProxiedBy: DB8PR04CA0013.eurprd04.prod.outlook.com (2603:10a6:10:110::23) To PH0PR11MB5207.namprd11.prod.outlook.com (2603:10b6:510:32::15) MIME-Version: 1.0 Received: from [192.168.1.20] (109.79.134.22) by DB8PR04CA0013.eurprd04.prod.outlook.com (2603:10a6:10:110::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.20 via Frontend Transport; Fri, 3 Sep 2021 15:36:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: af809fe4-c376-41a6-0952-08d96ef08a53 X-MS-TrafficTypeDiagnostic: PH0PR11MB5205: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sOUJ9a+OxHUYXHUF94t3V6xs4a4UPF4rkmchwhQGsNjWdFk3K7tTkH4Hvj4qI4S0K3V/DiZgvsaAYvWt34VQWAI/dy3ISmqMgPf29QCqT/RNX4EDSpMf8fKjpYuNMHc2aqZs36UXD2KxO91bNX8JzYYjGyN7lDDiuVoOlah3mshSvKVRGr0NuZplqsjrTdHz5XZT2Z47tXVCMftAEgjmhVHTfmd3RuSKUmbk5VFemz8HPnmkpnll4jUNXKbbe0ZApV4uo2J+GDmdL2Qyhz8c15x0Uc1tjGP6WDMIu4aAhW2bbeHLe1764uFakLOg45tvuCnkgXjmR5HK+6hsfJk3JS1pfWAT1Bru4CC/weNobpzahPOtmY2GfBoF352e0ahRsNd0JPSeL3fAYJtWaePkyJJeDku9xoXDiz2RttLqBq9670xnTQD1U7qhS+0DMY06H4y+GjvEgspN0JDikdkkUmQChVolPOcJg93Jh9/YuF2JGZJNf89sjfUcTCvyAH3OrZZ1+IhUqFl0cmGQQpfPQBEIuiM2OM4+Vtvo9T+FPsMDycIGdo4PIhS6dS94KzCJcUNFpCTLy8nkptksfvlqH6b6GOvfGZkY1T6+d+8SWZVaCJ2FWvMhXWI6uXopecNhUpQOF/xExRFPPml/FDfCkd0gPR+fwj4Yng3xNOI1hEr9nYaPv7LhkVNhHiNx8Iro8mU8U29RxOPhhqX0VtWKm+fOl14S58yvKT37hPlkCFI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5207.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(376002)(136003)(346002)(366004)(396003)(31686004)(66946007)(66556008)(66476007)(107886003)(86362001)(956004)(2616005)(478600001)(31696002)(6486002)(8676002)(8936002)(26005)(6666004)(186003)(4326008)(38100700002)(7416002)(5660300002)(316002)(16576012)(44832011)(2906002)(4744005)(36756003)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Q1lNLzhQc2U4cGF5dndOQ1JQbFVhZisyY2VzcXVUM1MwWHhWVjNyWWhtZ0du?= =?utf-8?B?VXJjR2FGYXl5ZHdLOUpGQlljR3NEcDQ2T2h4Vk1Oa3cwclRYcDdBcWxUNHFv?= =?utf-8?B?QUpaSWxvc2Q1R21DMEpGd0VKeUc1Z1A1U01BZ2pHMStLNVc2RG9PTEoyTkdw?= =?utf-8?B?NXNIRWdmT2F6V1FQeW5MOUNiSEEvR0JXeUY5akNTZkhDeVJJbkpyaTFQL2ZW?= =?utf-8?B?UHQrQ2p0aTBjbmd1dzhnUEJRNjJWRE1QWDB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YUt2RVF1S1BsSFhybmEvWmFsVkUzUE1pZDVLWFFLcWR2VnVON2x0?= =?utf-8?B?WDRuZjVQMDBzb1ZCSHRTWmN6NUZNZkYweWZjVDRIbFpNd1NJb0VzcXFuZ09D?= =?utf-8?B?eDhTYVAxU1U1SVdSSnBRUzY4bFA4NHNzVy9RaTlmWm1Pb3JPZlRqaENkL3Bv?= =?utf-8?B?bkE3TjMvcFdwaVhYMFFTKzluUHBUclpncVA5eHJ0VEJrbDd6Wkp2cXVHL0w5?= =?utf-8?B?djNUb3hpUkhZRDMrczNUYUpqU2tYYllzNHA3Wnc4QStnWEtpRjFHckFLOWho?= =?utf-8?B?SjdlQjFYdVZ2bUNIdmw3WG9aam15cnpDQnlsSmk4blZXU2NTTy9aTHd2Q0pS?= =?utf-8?B?eGYvekxGaG1LWUo3U2JwTXlyN3MvMDUxbjhLbU5HeGhYWENpTWdaMitkdTJi?= =?utf-8?B?WTk0TktmdXFOSUlaNStzTXp1eFpXaXZXT1VJRXlSL0ZUb3lZcG9rRkFLMTNK?= =?utf-8?B?cXBwWnlYMmZlQVNYOGp0RTJYN3liRlQ2YUl2cHBXTVdFdExkc1JxTWxwVGti?= =?utf-8?B?VEY5aXdzME43SEJ4OHF2NUU5QTlZaC9aK1pQZENTNHdxandjdlZ3TmN0dnlz?= =?utf-8?Q?SsnHj0S++SyZaQ9qY5xL5ZEGZyAau0QMmCjM2I6?= X-MS-Exchange-CrossTenant-Network-Message-Id: af809fe4-c376-41a6-0952-08d96ef08a53 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5207.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2021 15:36:04.2545 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mobdTYsOg8KB1uU+gmJ0YsCcSH/ZVsP+iTMGYunKufoMs7dpnrrdA6ghK96oQt41Eh66h4OExiGheCU58oiRxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5205 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v19 4/7] dmadev: introduce DMA device library implementation 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 Sender: "dev" > This patch introduce DMA device library implementation which includes > configuration and I/O with the DMA devices. > > Signed-off-by: Chengwen Feng > Acked-by: Bruce Richardson > Acked-by: Morten Brørup > --- > + > +static int > +dmadev_shared_data_prepare(void) > +{ > + const struct rte_memzone *mz; > + > + if (dmadev_shared_data == NULL) { > + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { > + /* Allocate port data and ownership shared memory. */ > + mz = rte_memzone_reserve(mz_rte_dmadev_data, > + sizeof(*dmadev_shared_data), > + rte_socket_id(), 0); > + } else > + mz = rte_memzone_lookup(mz_rte_dmadev_data); > + if (mz == NULL) > + return -ENOMEM; This memzone is not free'd anywhere in the library, I would suggest freeing as part of the release pmd function. Reviewed-by: Conor Walsh