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 F1BCAA0C54; Fri, 3 Sep 2021 17:13:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DE7BF41139; Fri, 3 Sep 2021 17:13:57 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id D4924410D7 for ; Fri, 3 Sep 2021 17:13:56 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10096"; a="241728904" X-IronPort-AV: E=Sophos;i="5.85,265,1624345200"; d="scan'208";a="241728904" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2021 08:13:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,265,1624345200"; d="scan'208";a="511504792" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga001.jf.intel.com with ESMTP; 03 Sep 2021 08:13:55 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx602.amr.corp.intel.com (10.18.126.82) 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:13:54 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx602.amr.corp.intel.com (10.18.126.82) 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:13:54 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) 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:13:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cT1vRNb9GtTvGfA346tZIZbsVPVGZBAXLjo9J/Hk6Yd2U1v0QXIDZCTwdDkMbarKje8zyJaUxLL/uBv1dEG7EV6Ba9mO5TLHqV31aezHHbzdlCE6pOytaZCF3RTAAw3KouDlkMnYP1rBYOCfQiABzKHI15UrVougzlUQbp36aLfeIILT1QR3D0EMW6MW1L7MEJDSJbHStaA/rDs6BlU0PzCKZvT5YUPkltG2Ql/JdXYAqExuz4QhWixbRpbNDsSqln1xOx/SX77vlWfD9OJZ+PKI+NghythD3qzxU0eW0V+NkAujOIxgRhoQy7AKUS/sGHA4mLeQjjz90WxG0Hoduw== 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=QE0YyyBLMwA3PGri/tomqFcBc9X3PywRyJJy+krvZWY=; b=DxzA+eYXZi6VEUBeJeXuYJYzACbH/Bz8xgVJlbyRGlvtkpUthamCP0KxCBCZvkzV6RDeauVEBqRdEcJKXffAgpvSPGwehmbSIkcURQGpW00OISowFnTLdWZ8epZp6loHCYTvjpP6b+8IdFe9YdSpGGzn2QuR7qe8TVYQcaQ2xb/tR8+GtIaqYu+qXfy3vv2LI3P/zyaREwJx1Dwug6EtXGGPuJs6ZVF1yhF8zsnFHs9yKULQ+FBkA678k4pRyTQu1LPKgQEsNAmbASdfyliNt3aFRjI0J4rQ+7UEs1g8hsgkSek/nbe72FZ5zq9zFhZ+KU4Rfr6up8hF+YMTQZ03fw== 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=QE0YyyBLMwA3PGri/tomqFcBc9X3PywRyJJy+krvZWY=; b=sQdzCaM7dmCriPNA87QWyvFLLeOlua2aENVb+vwmus1HLTxvSd5SLXiUEKmGq9oVxsGHjspH/2RlQj2E7GlTJ25UeQzWTf2IqRSEZJi1ZelfsNhCZYOIGg3CG/DZhWb7YMbFpfgngxveMVgZ5k3voNwSjmOw8R9AjmDoIYbXYxQ= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; Received: from SJ0PR11MB5055.namprd11.prod.outlook.com (2603:10b6:a03:2d9::10) by BYAPR11MB2822.namprd11.prod.outlook.com (2603:10b6:a02:c8::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.22; Fri, 3 Sep 2021 15:13:49 +0000 Received: from SJ0PR11MB5055.namprd11.prod.outlook.com ([fe80::78d4:6f82:aa87:c271]) by SJ0PR11MB5055.namprd11.prod.outlook.com ([fe80::78d4:6f82:aa87:c271%5]) with mapi id 15.20.4478.022; Fri, 3 Sep 2021 15:13:49 +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: Kevin Laatz Message-ID: <513a3f70-96fc-bc68-08c9-c3a2bba1748a@intel.com> Date: Fri, 3 Sep 2021 16:13:41 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.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-GB X-ClientProxiedBy: DU2PR04CA0165.eurprd04.prod.outlook.com (2603:10a6:10:2b0::20) To SJ0PR11MB5055.namprd11.prod.outlook.com (2603:10b6:a03:2d9::10) MIME-Version: 1.0 Received: from [192.168.1.15] (109.79.29.175) by DU2PR04CA0165.eurprd04.prod.outlook.com (2603:10a6:10:2b0::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.17 via Frontend Transport; Fri, 3 Sep 2021 15:13:45 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fd8125db-3967-4136-149c-08d96eed6e46 X-MS-TrafficTypeDiagnostic: BYAPR11MB2822: 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:5516; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wqQVJokNKYOSAOXCZlwiW4HkPyjsjxP1Xh4tHuPDYSNErz2/QUGRcXweuJelCJ5ieytPPSDxgY+Jr4uFjsRAsx1YM9oBP9N+8uZXTpLWybQ9UDBk6A3Udz9tm8rBp6Gd25HWZ6+Wu8mSwlKhpQDcQJEh979KhcYpCifQWNJ/96+mpEvXkYJ6a2VGbJvjt6+SfastybWSHKoJ74jL+9DubLjoGQA5NaAn2KJY1lakndxXfPav3UgvzMvQGQode9Y4ie8sHVyeED+W+2k69yk9DxZ5Zj4z1lfVuLbMKWRUjzYdUNs0vYd6AQch2hIKOBMjzK7CqmpBCd2t3IeZJsWLM4Ui4kGniEvOtf3+9kuMuVWvhNSiGqCDLiykXP0rXqZGkB0/Pnqu5CMsNW92L1EvYl2QyphWO6MPLlSxnMJJHP1ILhTNmoD8JGWjMqwTnlZ8vLR+JqecQWCzLNvwnzsUp3nD6oBgnG1AO0gKGSo4u9wxm93FQcqJY6Bod/9V7X5TBRG3+F38K4d/jdxaiBE+PVWYMyz/2cvURH6I8E/1j2UoSRMzQ1OjDtALujA1lB+beKWvqtU/ypnoUBF75vNUsKvB4aL22IEjyki6vM9fdMIdWn5ZJrhUUEmCRMfgK/vQsmObN+Bm6dj/zfqVZReyl9vRbAnyIR4x/OrYgGuew+CR/LHCMj1xsBPHzxPv3wDGwKkHnZishee+lfyxG1y69N4Kq69PygRQZzLIhktFeNA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5055.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(136003)(376002)(346002)(366004)(39860400002)(36756003)(107886003)(7416002)(6486002)(5660300002)(6666004)(16576012)(8936002)(26005)(86362001)(316002)(38100700002)(478600001)(31696002)(66476007)(66946007)(186003)(2616005)(31686004)(83380400001)(53546011)(8676002)(4326008)(44832011)(66556008)(2906002)(956004)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?T3NkZTdBY2c3U1AwS0VSaHRlUTZES1liVlNCM0JOM1V4WTl5dUF6bzh0cEda?= =?utf-8?B?cFlCT2VqN292MjNoVjVKV0c0bEg2U1NWT2hvMGxDd2oyZ1VzcmlYL3hFNmVv?= =?utf-8?B?RmJ2MzNjakdVU0xacmRGM0FhdEYxQTFKRzhNL2JYbXdMRkVoWFRQcjNsQUJv?= =?utf-8?B?TzNpQmp2dlYreTlUTVd5WUdDd2owbGI2eE1NNWNZVVZhSUFIWm4xdkdYT0d5?= =?utf-8?B?L3U1WVRFYW1Dd1Z3TkNycmRaT1IyMDNNYzRQcU04NysyeWtWR2wyeEtpODhk?= =?utf-8?B?SjZkdDR0S0RCSVVNLytsZWRqSlZpU2g0NFJTUFYrWHdteGliRkx1SjBmQi9U?= =?utf-8?B?TXExQVpHRmRzaHp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?c1AvUlhtWlYrcjl3ejllVkxnSzJKV3paczJ4dm5SUHVic3FDM1dhR3oyMUt1?= =?utf-8?B?VFpVQ1kvOUUzL05uOG5TYU1icnZ2aDkzYXJMM1ROSWgrTzRNOWduUUpmUWV5?= =?utf-8?B?UEFpUjRTSUZ4SGhnblZmVXl1aml5K3B4endqMExBOXUycmFzcStqZ09ycVpV?= =?utf-8?B?ZlVMamIwSDEyTFZrWE45QXFTWXJZNGhBNEFNb1Q2R0p5N2V5WlJyL1FCQnlE?= =?utf-8?B?U0Q4TkQzK3NqNDJEckhzOGVldGZ4ZFMzUmNRNVJJVFJ4YzY4eEJpeUdFcG9T?= =?utf-8?B?Ujc0dGN1aEt1dmRhWEpXMFk5QVowMC9wVUdpS0g4STFNMURqWkp1SDJhUTJQ?= =?utf-8?B?ZFZRTTZQRHpjWG12TmJhWkprVGJodU42L2ZTOWkrd2Q2RjgxcEJGMk1rVG9o?= =?utf-8?B?dEw2dFlQa01ubkJ0WDV2MllPd0paczBLbnd5NzJkRE5MSU91WkdVbXVBV3VD?= =?utf-8?Q?uQ0iwejqmBoP/r1F52AreOvf5TpeYGYHKJM+/lG?= X-MS-Exchange-CrossTenant-Network-Message-Id: fd8125db-3967-4136-149c-08d96eed6e46 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5055.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2021 15:13:48.9173 (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: K7Nkyy4PXpHYJJYbIpDv6C9MuJw195lIMsajWAtoLPcna4lz/BWX8onPXJZWgjpC7EtyBMjTr33iQEP6RfUa5Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2822 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" On 02/09/2021 14:13, Chengwen Feng wrote: > 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 > --- > config/rte_config.h | 3 + > lib/dmadev/meson.build | 1 + > lib/dmadev/rte_dmadev.c | 614 +++++++++++++++++++++++++++++++++++++++++++ > lib/dmadev/rte_dmadev.h | 118 ++++++++- > lib/dmadev/rte_dmadev_core.h | 2 + > lib/dmadev/version.map | 1 + > 6 files changed, 727 insertions(+), 12 deletions(-) > create mode 100644 lib/dmadev/rte_dmadev.c > > diff --git a/config/rte_config.h b/config/rte_config.h > index 590903c..331a431 100644 > --- a/config/rte_config.h > +++ b/config/rte_config.h > @@ -81,6 +81,9 @@ > /* rawdev defines */ > #define RTE_RAWDEV_MAX_DEVS 64 > > +/* dmadev defines */ > +#define RTE_DMADEV_MAX_DEVS 64 > + > /* ip_fragmentation defines */ > #define RTE_LIBRTE_IP_FRAG_MAX_FRAG 4 > #undef RTE_LIBRTE_IP_FRAG_TBL_STAT > diff --git a/lib/dmadev/meson.build b/lib/dmadev/meson.build > index 833baf7..d2fc85e 100644 > --- a/lib/dmadev/meson.build > +++ b/lib/dmadev/meson.build > @@ -1,6 +1,7 @@ > # SPDX-License-Identifier: BSD-3-Clause > # Copyright(c) 2021 HiSilicon Limited. > > +sources = files('rte_dmadev.c') > headers = files('rte_dmadev.h') > indirect_headers += files('rte_dmadev_core.h') > driver_sdk_headers += files('rte_dmadev_pmd.h') > diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c > new file mode 100644 > index 0000000..877eead > --- /dev/null > +++ b/lib/dmadev/rte_dmadev.c > @@ -0,0 +1,614 @@ > +/* SPDX-License-Identifier: BSD-3-Clause > + * Copyright(c) 2021 HiSilicon Limited. > + * Copyright(c) 2021 Intel Corporation. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include "rte_dmadev.h" > +#include "rte_dmadev_pmd.h" > + Many of these includes can be removed from this file, as they are already included elsewhere (eg. rte_common.h via rte_dmadev.h). For example, you could remove: ctype.h, stdint.h, stdlib.h, rte_errno.h, rte_lcore.h, rte_memory.h, rte_malloc.h, rte_dev... Please run test-meson-builds.sh after removing to make sure there are no missing dependencies. With the above comment addressed, Reviewed-by: Kevin Laatz