From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 65071A0C54;
	Fri,  3 Sep 2021 17:30:34 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 289B1410D7;
	Fri,  3 Sep 2021 17:30:33 +0200 (CEST)
Received: from mga12.intel.com (mga12.intel.com [192.55.52.136])
 by mails.dpdk.org (Postfix) with ESMTP id 66B5E40E78
 for <dev@dpdk.org>; Fri,  3 Sep 2021 17:30:31 +0200 (CEST)
X-IronPort-AV: E=McAfee;i="6200,9189,10096"; a="198992671"
X-IronPort-AV: E=Sophos;i="5.85,265,1624345200"; d="scan'208";a="198992671"
Received: from fmsmga007.fm.intel.com ([10.253.24.52])
 by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 03 Sep 2021 08:30:29 -0700
X-IronPort-AV: E=Sophos;i="5.85,265,1624345200"; d="scan'208";a="462420410"
Received: from bricha3-mobl.ger.corp.intel.com ([10.252.26.152])
 by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA;
 03 Sep 2021 08:30:25 -0700
Date: Fri, 3 Sep 2021 16:30:21 +0100
From: Bruce Richardson <bruce.richardson@intel.com>
To: Kevin Laatz <kevin.laatz@intel.com>
Cc: Chengwen Feng <fengchengwen@huawei.com>, thomas@monjalon.net,
 ferruh.yigit@intel.com, jerinj@marvell.com, jerinjacobk@gmail.com,
 andrew.rybchenko@oktetlabs.ru, dev@dpdk.org,
 mb@smartsharesystems.com, nipun.gupta@nxp.com,
 hemant.agrawal@nxp.com, maxime.coquelin@redhat.com,
 honnappa.nagarahalli@arm.com, david.marchand@redhat.com,
 sburla@marvell.com, pkapoor@marvell.com,
 konstantin.ananyev@intel.com, conor.walsh@intel.com
Message-ID: <YTI/jWmrCWeMzStV@bricha3-MOBL.ger.corp.intel.com>
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>
 <513a3f70-96fc-bc68-08c9-c3a2bba1748a@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <513a3f70-96fc-bc68-08c9-c3a2bba1748a@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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Fri, Sep 03, 2021 at 04:13:41PM +0100, Kevin Laatz wrote:
> On 02/09/2021 14:13, Chengwen Feng wrote:
> > +++ 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 <ctype.h>
> > +#include <inttypes.h>
> > +#include <stdint.h>
> > +#include <stdio.h>
> > +#include <stdlib.h>
> > +#include <string.h>
> > +
> > +#include <rte_debug.h>
> > +#include <rte_dev.h>
> > +#include <rte_eal.h>
> > +#include <rte_errno.h>
> > +#include <rte_lcore.h>
> > +#include <rte_log.h>
> > +#include <rte_memory.h>
> > +#include <rte_memzone.h>
> > +#include <rte_malloc.h>
> > +#include <rte_string_fns.h>
> > +
> > +#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.
> 
> <snip>
> 
Actually, first the rte_dmadev.h header should probably have excess headers
stripped. Doing quick compilation testing, I still get ok builds from the
patchset with "rte_common.h", "rte_dev.h", "rte_errno.h" and "rte_memory.h"
removed. On the other hand, for completeness, I believe "stdint.h" should
be added for the "uint*_t" types, leaving the top-of-file header includes
as:

#include <stdint.h>      /* for uint* types */
#include <rte_compat.h>  /* for __rte_experimental */

Note: this is not from comprehensive tests just quick builds and looking at
the code.

Regards,
/Bruce