From: Ravi Kerur <rkerur@gmail.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v5 3/8] Move common functions in eal_lcore.c
Date: Thu, 16 Apr 2015 15:10:15 -0700 [thread overview]
Message-ID: <CAFb4SLAuTKJCSjCApatdXMK8dPCPTBf3iGFtmiZu5Ar4ZR_6=A@mail.gmail.com> (raw)
In-Reply-To: <1994225.GSe2cYm1g2@xps13>
On Thu, Apr 16, 2015 at 1:39 AM, Thomas Monjalon <thomas.monjalon@6wind.com>
wrote:
> 2015-04-09 12:40, Ravi Kerur:
> > Changes in v5
> > Rebase to latest code.
> >
> > Changes in v4
> > Implement cpu_detected() for BSD.
> > Have common RTE_LOG for Linux and BSD in rte_eal_cpu_init().
> > Remove RTE_EXEC_ENV_BSDAPP in common file.
> >
> > Changes in v3
> > Changed subject to be more explicit on file name inclusion.
> >
> > Changes in v2
> > None
> >
> > Changes in v1
> > Move common function in eal_lcore.c to librte_eal/common/
> > eal_common_lcore.c file.
> >
> > Following function is moved to eal_common_lcore.c file
> >
> > int rte_eal_cpu_init(void);
> >
> > Use RTE_EXEC_ENV_BSDAPP to differentiate minor differences in
> > common function.
> > Makefile changes to reflect new file added.
> > Fix checkpatch warnings and errors.
> >
> > Signed-off-by: Ravi Kerur <rkerur@gmail.com>
> [...]
> > --- a/lib/librte_eal/bsdapp/eal/eal_lcore.c
> > +++ b/lib/librte_eal/bsdapp/eal/eal_lcore.c
> [...]
> > static int
> > -get_ncpus(void)
> > +eal_get_ncpus(void)
>
> Why not keep it static as it seems to be specific to BSD handling?
>
It is static with the changes, "name" is changed from "get_ncpus" to
"eal_get_ncpus".
>
> > {
> > int mib[2] = {CTL_HW, HW_NCPU};
> > int ncpu;
> > @@ -59,63 +62,18 @@ get_ncpus(void)
> > return ncpu;
> > }
> [...]
> > -unsigned
> > -eal_cpu_socket_id(__rte_unused unsigned cpu_id)
> > +/* Check if a cpu is present by the presence of the
> > + * cpu information for it.
> > + */
> > +int
> > +eal_cpu_detected(unsigned lcore_id)
> > {
> > - return cpu_socket_id(cpu_id);
> > + const unsigned ncpus = eal_get_ncpus();
> > + return (lcore_id < ncpus);
> > }
>
>
>
>
next prev parent reply other threads:[~2015-04-16 22:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-09 19:38 [dpdk-dev] [PATCH v5 0/8] Move common functions in EAL Ravi Kerur
2015-04-09 19:40 ` Ravi Kerur
2015-04-09 19:40 ` [dpdk-dev] [PATCH v5 1/8] Move common functions in eal_thread.c Ravi Kerur
2015-04-14 13:59 ` Thomas Monjalon
2015-04-14 21:35 ` Ravi Kerur
2015-04-16 22:19 ` Ravi Kerur
2015-04-09 19:40 ` [dpdk-dev] [PATCH v5 2/8] Move common functions in eal.c Ravi Kerur
2015-04-16 8:24 ` Thomas Monjalon
2015-04-16 22:08 ` Ravi Kerur
2015-04-16 22:22 ` Ravi Kerur
2015-04-09 19:40 ` [dpdk-dev] [PATCH v5 3/8] Move common functions in eal_lcore.c Ravi Kerur
2015-04-16 8:39 ` Thomas Monjalon
2015-04-16 22:10 ` Ravi Kerur [this message]
2015-04-09 19:40 ` [dpdk-dev] [PATCH v5 4/8] Move common functions in eal_timer.c Ravi Kerur
2015-04-16 8:46 ` Thomas Monjalon
2015-04-16 22:11 ` Ravi Kerur
2015-04-09 19:40 ` [dpdk-dev] [PATCH v5 5/8] Move common functions in eal_memory.c Ravi Kerur
2015-04-16 8:52 ` Thomas Monjalon
2015-04-16 22:11 ` Ravi Kerur
2015-04-09 19:40 ` [dpdk-dev] [PATCH v5 6/8] Move common functions in eal_pci.c Ravi Kerur
2015-04-16 9:02 ` Thomas Monjalon
2015-04-16 22:12 ` 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='CAFb4SLAuTKJCSjCApatdXMK8dPCPTBf3iGFtmiZu5Ar4ZR_6=A@mail.gmail.com' \
--to=rkerur@gmail.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.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).