DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andre Muezerie <andremue@linux.microsoft.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
	Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [PATCH 0/5] use portable macro for weak linking
Date: Fri, 7 Feb 2025 06:37:50 -0800	[thread overview]
Message-ID: <20250207143750.GA8577@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> (raw)
In-Reply-To: <CAJFAV8z6enOtK6kU+EOEELjWS1N_dk8odHn67B1mrA=2BPxfyQ@mail.gmail.com>

On Fri, Feb 07, 2025 at 09:47:19AM +0100, David Marchand wrote:
> On Tue, Dec 24, 2024 at 4:06 AM Andre Muezerie
> <andremue@linux.microsoft.com> wrote:
> >
> > MSVC uses pragmas to indicate weak linking, so the old __rte_weak
> > attribute needs to made into a macro so that the same syntax can
> > be used for MSVC and other compilers like gcc.
> >
> > Andre Muezerie (5):
> >   lib/eal: add portable macro for weak linking
> >   app/test-compress-perf: use portable macro for weak linking
> >   drivers/bus: use portable macro for weak linking
> >   drivers/common: use portable macro for weak linking
> >   drivers/net: use portable macro for weak linking
> 
> I am not a fan of the weak linking stuff in the first place.
> Reading the code with __rte_weak, I always wonder which symbol is used when...
> I prefer explicit linking and no duplicate symbols end up in the binaries.
> 
> I posted a RFC, can you have a look?
> https://inbox.dpdk.org/dev/20250207083252.3131588-1-david.marchand@redhat.com/
> 
> 
> -- 
> David Marchand

I also had the same questions about which symbols were being used the first time I looked at the code.
Therefore, I think your proposal makes the code easier to understand and is a better approach.
--
Andre Muezerie


      reply	other threads:[~2025-02-07 14:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-24  3:05 Andre Muezerie
2024-12-24  3:05 ` [PATCH 1/5] lib/eal: add " Andre Muezerie
2024-12-24  3:05 ` [PATCH 2/5] app/test-compress-perf: use " Andre Muezerie
2024-12-24  3:05 ` [PATCH 3/5] drivers/bus: " Andre Muezerie
2024-12-24  3:05 ` [PATCH 4/5] drivers/common: " Andre Muezerie
2024-12-24  3:05 ` [PATCH 5/5] drivers/net: " Andre Muezerie
2025-02-07  8:47 ` [PATCH 0/5] " David Marchand
2025-02-07 14:37   ` Andre Muezerie [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=20250207143750.GA8577@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net \
    --to=andremue@linux.microsoft.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).