DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Ravi Kerur <rkerur@gmail.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v6 2/6] Move common functions in eal.c
Date: Wed, 22 Apr 2015 10:21:41 +0100	[thread overview]
Message-ID: <20150422092141.GD5652@bricha3-MOBL3> (raw)
In-Reply-To: <CAFb4SLD32rR2_=5+U3St7iHid1h+UcvHvTYd8NhdUPGV6i1kXQ@mail.gmail.com>

On Tue, Apr 21, 2015 at 12:13:22PM -0700, Ravi Kerur wrote:
> On Tue, Apr 21, 2015 at 7:36 AM, Bruce Richardson <
> bruce.richardson@intel.com> wrote:
> 
> > On Sat, Apr 18, 2015 at 12:43:07PM -0700, Ravi Kerur wrote:
> > > Changes in v6
> > > Split eal_common_system.c and eal_common_runtime.c into
> > > eal_common_sysfs.c
> > > eal_common_mem_cfg.c
> > > eal_common_proc_type.c
> > > eal_comm_app_usage.c
> > > based on functionality.
> > >
> > > Changes in v5
> > > Rebase to latest code.
> > >
> > > Changes in v4
> > > Remove eal_externs.h file, instead use  _get_ and _set_ APIS
> > > to access those variables.
> > > Split eal_common.c into eal_common_system.c and
> > > and eal_common_runtime.c
> > > rte_eal prefix functions are moved to _runtime_ and
> > > eal prefix functions are moved to _system_ files respectively.
> > >
> > > Changes in v3
> > > Changed subject to be more explicit on file name inclusion.
> > >
> > > Changes in v2
> > > In function rte_eal_config_create remove #ifdef _BSDAPP_
> > > and initialize mem_cfg_addr unconditionally.
> > >
> > > Changes in v1
> > > Move common functions in eal.c to librte_eal/common/eal_common.c.
> > >
> > > Following functions are moved to eal_common.c file.
> > >
> > > struct rte_config *rte_eal_get_configuration(void);
> > > int eal_parse_sysfs_value(const char *filename, unsigned long *val);
> > > static void rte_eal_config_create(void);
> > > enum rte_proc_type_t eal_proc_type_detect(void);
> > > void rte_eal_config_init(void);
> > > rte_usage_hook_t rte_set_application_usage_hook(rte_usage_hook_t
> > > usage_func);
> > > inline size_t eal_get_hugepage_mem_size(void);
> > > void eal_check_mem_on_local_socket(void);
> > > int sync_func(__attribute__((unused)) void *arg);
> > > inline void rte_eal_mcfg_complete(void);
> > > int rte_eal_has_hugepages(void);
> > > enum rte_lcore_role_t rte_eal_lcore_role(unsigned lcore_id);
> > > enum rte_proc_type_t rte_eal_process_type(void);
> > >
> > > Makefile changes to reflect new files added.
> > > Fix checkpatch warnings and errors.
> > >
> > > Signed-off-by: Ravi Kerur <rkerur@gmail.com>
> > > ---
> > >  lib/librte_eal/bsdapp/eal/Makefile           |   4 +
> > >  lib/librte_eal/bsdapp/eal/eal.c              | 271
> > +++---------------------
> > >  lib/librte_eal/common/eal_common_app_usage.c |  63 ++++++
> > >  lib/librte_eal/common/eal_common_mem_cfg.c   | 217 ++++++++++++++++++++
> > >  lib/librte_eal/common/eal_common_proc_type.c |  58 ++++++
> > >  lib/librte_eal/common/eal_common_sysfs.c     | 163 +++++++++++++++
> > >  lib/librte_eal/common/eal_hugepages.h        |   1 +
> > >  lib/librte_eal/common/eal_private.h          |  78 +++++++
> > >  lib/librte_eal/common/include/rte_eal.h      |   4 +
> > >  lib/librte_eal/linuxapp/eal/Makefile         |   4 +
> > >  lib/librte_eal/linuxapp/eal/eal.c            | 296
> > ++++-----------------------
> > >  11 files changed, 668 insertions(+), 491 deletions(-)
> > >  create mode 100644 lib/librte_eal/common/eal_common_app_usage.c
> > >  create mode 100644 lib/librte_eal/common/eal_common_mem_cfg.c
> > >  create mode 100644 lib/librte_eal/common/eal_common_proc_type.c
> > >  create mode 100644 lib/librte_eal/common/eal_common_sysfs.c
> > >
> > On applying this patch in the series I'm getting compiler errors. With
> > clang on
> > linux (and BSD), I get errors about undefined inline functions e.g.:
> >
> > In file included from /home/bruce/
> > dpdk.org/lib/librte_eal/linuxapp/eal/eal.c:84:
> > /home/bruce/dpdk.org/lib/librte_eal/common/eal_hugepages.h:66:15: error:
> > inline function 'eal_get_hugepage_mem_size' is not defined
> > [-Werror,-Wundefined-inline]
> > inline size_t eal_get_hugepage_mem_size(void);
> >               ^
> >       /home/bruce/dpdk.org/lib/librte_eal/linuxapp/eal/eal.c:549:29:
> > note: used here
> >                               internal_config.memory =
> > eal_get_hugepage_mem_size();
> >
> > ICC is also giving a (different error):
> >
> >   CC eal_common_sysfs.o
> >   /home/bruce/dpdk.org/lib/librte_eal/common/eal_common_sysfs.c(159):
> > error #188: enumerated type mixed with another type
> >                   return -1;
> >
> >
> Thanks Bruce for reporting these errors. My plan was to wait for final "OK"
> from Thomas for v6 patches esp. on changes for split in eal.c and eal_pci.c
> files. Currently my testing includes
> 
> 1. Compiling with gcc 4.8.2 on Ubuntu and freeBSD
> 2. "make test" and testpmd on Linux
> 3. Basic testpmd on freeBSD
> 
> I will definitely fix these before sending out next version.
> 
> Regarding installation of "ICC" compiler, I had tried following Intel
> reference
> 
> https://software.intel.com/en-us/articles/intel-compilers-linux-installation-help
> 
> At least my understanding was it required License from Intel. Please let me
> know for any alternate way of getting ICC.
> 
> Thanks,
> Ravi
> 
>
I'm just flagging the ICC error as an FYI, given that you are fixing other
compiler errors anyway. Since ICC is an Intel product and we
don't expect all contributors to have it, we in Intel will take responsibility
for submitting patches to ensure ICC compiles the DPDK code ok.

/Bruce

  reply	other threads:[~2015-04-22  9:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-18 19:42 [dpdk-dev] [PATCH v6 0/6] Move common functions in EAL Ravi Kerur
2015-04-18 19:43 ` [dpdk-dev] [PATCH v6 1/6] Move common functions in eal_thread.c Ravi Kerur
2015-04-18 19:43   ` [dpdk-dev] [PATCH v6 2/6] Move common functions in eal.c Ravi Kerur
2015-04-21 14:36     ` Bruce Richardson
2015-04-21 19:13       ` Ravi Kerur
2015-04-22  9:21         ` Bruce Richardson [this message]
2015-04-22 15:37           ` Ravi Kerur
2015-04-18 19:43   ` [dpdk-dev] [PATCH v6 3/6] Move common functions in eal_lcore.c Ravi Kerur
2015-04-18 19:43   ` [dpdk-dev] [PATCH v6 4/6] Move common functions in eal_timer.c Ravi Kerur
2015-04-18 19:43   ` [dpdk-dev] [PATCH v6 5/6] Move common functions in eal_memory.c Ravi Kerur
2015-04-18 19:43   ` [dpdk-dev] [PATCH v6 6/6] Move common functions in eal_pci.c Ravi Kerur
2015-04-21 14:25   ` [dpdk-dev] [PATCH v6 1/6] Move common functions in eal_thread.c Bruce Richardson
2015-04-21 19:28     ` Ravi Kerur
2015-04-22  9:03       ` Bruce Richardson
2015-04-22 15:39         ` Ravi Kerur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150422092141.GD5652@bricha3-MOBL3 \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=rkerur@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).