All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aaron Conole <aconole@redhat.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: konstantin.ananyev@intel.com,  dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 1/2] acl: remove use of weak functions
Date: Wed, 10 Apr 2019 10:08:55 -0400	[thread overview]
Message-ID: <f7timvmeyvc.fsf@dhcp-25.97.bos.redhat.com> (raw)
In-Reply-To: <20190410140232.GD718@bricha3-MOBL.ger.corp.intel.com> (Bruce Richardson's message of "Wed, 10 Apr 2019 15:02:32 +0100")

Bruce Richardson <bruce.richardson@intel.com> writes:

> On Wed, Apr 10, 2019 at 09:54:02AM -0400, Aaron Conole wrote:
>> Bruce Richardson <bruce.richardson@intel.com> writes:
>> 
>> > Weak functions don't work well with static libraries and require the
>> > use of "whole-archive" flag to ensure that the correct function is used
>> > when linking. Since the weak functions are only used as placeholders
>> > within this library alone, we can replace them with non-weak functions
>> > using preprocessor ifdefs.
>> >
>> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> ---
>> > lib/librte_acl/meson.build |  7 ++++++- lib/librte_acl/rte_acl.c   | 18
>> > ++++++++++++++---- mk/rte.app.mk              |  3 --- 3 files changed,
>> > 20 insertions(+), 8 deletions(-)
>> >
>> > diff --git a/lib/librte_acl/meson.build b/lib/librte_acl/meson.build
>> > index 2207dbafe..98ece7d85 100644 --- a/lib/librte_acl/meson.build +++
>> > b/lib/librte_acl/meson.build @@ -6,7 +6,7 @@ sources =
>> > files('acl_bld.c', 'acl_gen.c', 'acl_run_scalar.c', 'rte_acl.c',
>> > 'tb_mem.c') headers = files('rte_acl.h', 'rte_acl_osdep.h')
>> >  
>> > -if arch_subdir == 'x86' +if dpdk_conf.has('RTE_ARCH_X86') sources +=
>> > files('acl_run_sse.c')
>> >  
>> >  	# compile AVX2 version if either: @@ -28,4 +28,9 @@ if arch_subdir
>> >  	== 'x86' cflags += '-DCC_AVX2_SUPPORT' endif
>> >  
>> > +elif dpdk_conf.has('RTE_ARCH_ARM') or dpdk_conf.has('RTE_ARCH_ARM64')
>> > +	cflags += '-flax-vector-conversions' +	sources +=
>> > files('acl_run_neon.c')
>> 
>> This will also need -Wno-uninitialized (otherwise it will generate
>> warnings about the search_neon_4 and search_neon_8 functions).
>> 
>> But I don't like papering over these conversions.  I'd prefer instead the
>> patches I posted at:
>> 
>> http://mails.dpdk.org/archives/dev/2019-April/129540.html and
>> http://mails.dpdk.org/archives/dev/2019-April/129541.html
>> 
>> Are you opposed to merging those?
>> 
> Nope, not in the least. I'm happy enough to rework this patch on top of
> those - I'd just had forgotten about them in my rush to get a potential
> solution out here.  I did these up quickly to show how easy it is to remove
> the need for the weak functions and the subsequent linker "--whole-archive"
> flag.
>
> /Bruce
>
> PS: I see your patch 2 does not include the Wno-uninitialized flag, is it
> not needed in your patch, or just an oversight?

It isn't needed, I resolved the issue with an explicit initialization.

  reply	other threads:[~2019-04-10 14:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 13:45 [dpdk-dev] [PATCH 0/2] remove use of weak functions from libraries Bruce Richardson
2019-04-10 13:45 ` [dpdk-dev] [PATCH 1/2] acl: remove use of weak functions Bruce Richardson
2019-04-10 13:54   ` Aaron Conole
2019-04-10 14:02     ` Bruce Richardson
2019-04-10 14:08       ` Aaron Conole [this message]
2019-04-10 14:57   ` Ananyev, Konstantin
2019-04-10 13:45 ` [dpdk-dev] [PATCH 2/2] bpf: " Bruce Richardson
2019-04-10 14:07   ` Aaron Conole
2019-04-10 14:27     ` Bruce Richardson
2019-04-10 14:57   ` Ananyev, Konstantin
2019-05-27 14:13 ` [dpdk-dev] [PATCH 0/2] remove use of weak functions from libraries David Marchand
2019-05-27 15:41   ` Bruce Richardson
2019-05-27 20:57     ` Aaron Conole
2019-05-28  8:06       ` Bruce Richardson
2019-06-05 14:41 ` Thomas Monjalon

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=f7timvmeyvc.fsf@dhcp-25.97.bos.redhat.com \
    --to=aconole@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.