From: Thinh Tran <thinhtr@linux.vnet.ibm.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, David Christensen <drc@linux.vnet.ibm.com>
Subject: Re: [dpdk-dev] [PATCH v2] eal/ppc64: improve rte_rdtsc with ppc_get_timebase
Date: Wed, 11 Mar 2020 15:26:31 -0500 [thread overview]
Message-ID: <be5b4413-7c53-80bf-3a7c-1574605c64b2@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAJFAV8xP4cgLrCdJcak-pWVso2kez7ESNzjUrxaTWnUtQgg2YQ@mail.gmail.com>
Hi David, Thanks for your response.
We were worry about breaking the DPDK/FreeBSD on power, may hit the
similar bug:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241146
From my understanding, and also from the documentation
https://doc.dpdk.org/guides/freebsd_gsg/install_from_ports.html
DPDK is supported, glibc may not be required by default, and it is not
clear what the supported architectures are.
So if FreeBSD does not support DPDK on powerpc or
FreeBSD supports DPDK on powerpc and requires glibc installed,
then the GLIBC guard can be removed
This is unknown to me.
Agreed. __powerpc__ guard is not necessary in this path and will be removed.
Thanks,
Thinh Tran
On 3/10/2020 7:55 AM, David Marchand wrote:
> On Fri, Jan 31, 2020 at 11:04 PM Thinh Tran <thinhtr@linux.vnet.ibm.com> wrote:
>>
>> __ppc_get_timebase() is GNU extension and is more efficient
>>
>> v2: Advoid breaking other ppc_64 flatforms. The __ppc_get_timebase()
>> seems to be specific to powerpc platform and with GLIBC.
>
> dpdk only supports glibc at the moment.
> https://doc.dpdk.org/guides/linux_gsg/sys_reqs.html#system-software
>
> Now the 1M$ question is which C library are you using and on which platform :-).
>
>>
>> Signed-off-by: Thinh Tran <thinhtr@linux.vnet.ibm.com>
>> ---
>> lib/librte_eal/common/include/arch/ppc_64/rte_cycles.h | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/lib/librte_eal/common/include/arch/ppc_64/rte_cycles.h b/lib/librte_eal/common/include/arch/ppc_64/rte_cycles.h
>> index 8f2e98642..1c3fd556e 100644
>> --- a/lib/librte_eal/common/include/arch/ppc_64/rte_cycles.h
>> +++ b/lib/librte_eal/common/include/arch/ppc_64/rte_cycles.h
>> @@ -14,6 +14,9 @@ extern "C" {
>>
>> #include <rte_byteorder.h>
>> #include <rte_common.h>
>> +#if defined(__powerpc__) && defined(__GLIBC__)
>> +#include <sys/platform/ppc.h>
>> +#endif
>
> libc headers must come first:
> https://doc.dpdk.org/guides/contributing/coding_style.html#header-includes
>
> Why do you need the __powerpc__ guard?
>
>>
>> /**
>> * Read the time base register.
>> @@ -24,6 +27,9 @@ extern "C" {
>> static inline uint64_t
>> rte_rdtsc(void)
>> {
>> +#if defined(__powerpc__) && defined(__GLIBC__)
>> + return __ppc_get_timebase();
>> +#else
>> union {
>> uint64_t tsc_64;
>> RTE_STD_C11
>> @@ -50,6 +56,7 @@ rte_rdtsc(void)
>> [tmp] "=r"(tmp)
>> );
>> return tsc.tsc_64;
>> +#endif /* __powerpc__ && __GLIBC__ */
>> }
>>
>> static inline uint64_t
>> --
>> 2.17.1
>>
>
>
prev parent reply other threads:[~2020-03-11 20:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-28 21:02 [dpdk-dev] [PATCH] " Thinh Tran
2020-01-31 0:15 ` David Christensen
2020-01-31 14:54 ` Thinh Tran
2020-01-31 22:03 ` [dpdk-dev] [PATCH v2] " Thinh Tran
2020-02-04 18:00 ` David Christensen
2020-02-05 21:29 ` David Marchand
2020-02-10 17:53 ` Thinh Tran
2020-03-10 12:55 ` David Marchand
2020-03-11 20:26 ` Thinh Tran [this message]
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=be5b4413-7c53-80bf-3a7c-1574605c64b2@linux.vnet.ibm.com \
--to=thinhtr@linux.vnet.ibm.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=drc@linux.vnet.ibm.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).