DPDK patches and discussions
 help / color / mirror / Atom feed
From: "David Harton (dharton)" <dharton@cisco.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
	Bruce Richardson <bruce.richardson@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"beilei.xing@intel.com" <beilei.xing@intel.com>,
	"qi.z.zhang@intel.com" <qi.z.zhang@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: Eliminate weak symbols in i40e_rxtx.c
Date: Tue, 4 Jun 2019 16:19:47 +0000	[thread overview]
Message-ID: <BN6PR11MB39559A811EBE4230F42182B8AA150@BN6PR11MB3955.namprd11.prod.outlook.com> (raw)
In-Reply-To: <aaebdbc4-c9e1-fafe-6791-11f1b57c6b62@intel.com>


> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit@intel.com>
> Sent: Tuesday, June 04, 2019 12:00 PM
> To: Bruce Richardson <bruce.richardson@intel.com>; David Harton (dharton)
> <dharton@cisco.com>
> Cc: dev@dpdk.org; beilei.xing@intel.com; qi.z.zhang@intel.com
> Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: Eliminate weak symbols in
> i40e_rxtx.c
> 
> On 5/16/2019 3:08 PM, Bruce Richardson wrote:
> > On Wed, May 15, 2019 at 12:13:46PM -0400, David Harton wrote:
> >> Use of weak symbols can hide makefile errors especially when custom
> >> makefiles are used.  Removing the use of weak symbols to avoid a stub
> >> function being linked in production code.
> >>
> >> Signed-off-by: David Harton <dharton@cisco.com>
> >> ---
> >>
> >> v2 - added CC_AVX2_SUPPORT check to code enabling avx2 vectors
> >>
> > Testing a few compiles here, this breaks when vector mode is disabled,
> > because it's possible that CC_AVX2_SUPPORT=1 when VECTOR=n. I'd
> > suggest adding "ifeq ($(CONFIG_RTE_LIBRTE_I40E_INC_VECTOR),y) ...
> > endif" around the block in the makefile checking for AVX2 support, so
> > that we never set AVX2 unless we have vector support.
> 
> Concern is this is pushing vectorization support more to compile time
> configuration. Do we really have to select if to use vector PMD or not in
> compile time?
> 
> Can't we get rid of the 'CONFIG_RTE_LIBRTE_I40E_INC_VECTOR' config option
> completely? As done in the ICE driver now.
> 
> Isn't it better to compile vectorization support in as much as possible
> and do the vector or scalar path selection in runtime, this patch may
> prevent us to do that, weak functions enables us being more dynamic.

Choosing a vector dynamically can be done without the use of weak symbols.

IMHO, weak symbols should really be used for cross library support where a user wants to override a 3rd party function not within a lib.  In fact the weak symbol usage may preclude supporting all the variants you might need/want to select.

> 
> >
> > With this change, you can include my ack in v3.
> >
> > /Bruce
> >
> > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> >


  reply	other threads:[~2019-06-04 16:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-15 13:05 [dpdk-dev] [PATCH] " David Harton
2019-05-15 13:05 ` David Harton
2019-05-15 14:13 ` Bruce Richardson
2019-05-15 14:13   ` Bruce Richardson
2019-05-15 16:13 ` [dpdk-dev] [PATCH v2] " David Harton
2019-05-15 16:13   ` David Harton
2019-05-16 14:08   ` Bruce Richardson
2019-06-04 15:59     ` Ferruh Yigit
2019-06-04 16:19       ` David Harton (dharton) [this message]
2019-06-06  9:07         ` Ferruh Yigit
2019-06-04 16:25       ` Bruce Richardson
2019-05-16 18:28   ` [dpdk-dev] [PATCH v3] " David Harton
2019-05-17 10:21     ` Bruce Richardson
2019-05-29 17:18       ` Zhang, Qi Z

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=BN6PR11MB39559A811EBE4230F42182B8AA150@BN6PR11MB3955.namprd11.prod.outlook.com \
    --to=dharton@cisco.com \
    --cc=beilei.xing@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=qi.z.zhang@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 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).