DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Andre Muezerie <andremue@linux.microsoft.com>
Cc: dev@dpdk.org, hkalra@marvell.com, kirankumark@marvell.com,
	 ndabilpuram@marvell.com, skori@marvell.com,
	skoteshwar@marvell.com
Subject: Re: [PATCH v2] drivers: remove __rte_used from functions for compatibility with MSVC
Date: Wed, 28 May 2025 11:57:17 +0530	[thread overview]
Message-ID: <CALBAE1NG1tN6vE4TaOEOknZA=Q5Lb3p0GaOOK4LjeXpCVw+RdQ@mail.gmail.com> (raw)
In-Reply-To: <1748375344-10254-1-git-send-email-andremue@linux.microsoft.com>

On Wed, May 28, 2025 at 1:27 AM Andre Muezerie
<andremue@linux.microsoft.com> wrote:
>
> With gcc, the macro __rte_used translates to __attribute__((used)).
> MSVC has something to the same effect, but harder to use and with some
> limitations (one being that it cannot be used with "static"). Therefore,
> it makes sense to avoid __rte_used in some cases.
>
> The functions modified in this patch don't really need to use __rte_used.
> Instead, these functions can be involved in same ifdefs used in the
> callers. That way, they are only defined when needed (when
> someone is actually calling the function). Doing so makes the code
> compatible with MSVC and avoids compiler warnings about functions being
> defined but not used.
>
> Signed-off-by: Andre Muezerie <andremue@linux.microsoft.com>
> Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---

>
> -static __rte_used inline void
> +#if defined(RTE_ARCH_ARM64)
> +#if !defined(CNXK_DIS_TMPLT_FUNC)

Please change to #if defined(RTE_ARCH_ARM64) &&
!defined(CNXK_DIS_TMPLT_FUNC) in all instances.

  reply	other threads:[~2025-05-28  6:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-04  1:47 [PATCH] " Andre Muezerie
2025-05-27  5:02 ` [EXTERNAL] " Jerin Jacob
2025-05-27  7:02   ` Pavan Nikhilesh Bhagavatula
2025-05-27 19:49 ` [PATCH v2] " Andre Muezerie
2025-05-28  6:27   ` Jerin Jacob [this message]
2025-05-28 13:22 ` [PATCH v3] " Andre Muezerie
2025-05-29  5:53   ` Jerin Jacob

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='CALBAE1NG1tN6vE4TaOEOknZA=Q5Lb3p0GaOOK4LjeXpCVw+RdQ@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=andremue@linux.microsoft.com \
    --cc=dev@dpdk.org \
    --cc=hkalra@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.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).