DPDK patches and discussions
 help / color / mirror / Atom feed
From: fengchengwen <fengchengwen@huawei.com>
To: David Marchand <david.marchand@redhat.com>
Cc: <thomas@monjalon.net>, <stephen@networkplumber.org>,
	<dev@dpdk.org>, Bruce Richardson <bruce.richardson@intel.com>
Subject: Re: [PATCH v5 0/5] add semicolon when export any symbol
Date: Thu, 4 Sep 2025 08:24:47 +0800	[thread overview]
Message-ID: <abd687d3-acb9-4692-98a4-73ec03154efe@huawei.com> (raw)
In-Reply-To: <CAJFAV8yTwKR3oBJ-N68je_=aUL5Dg4_h_H8zgB3ZvLzrLbQtNQ@mail.gmail.com>

Hi David,

On 9/3/2025 3:04 PM, David Marchand wrote:
> Hello,
> 
> On Wed, 3 Sept 2025 at 04:05, Chengwen Feng <fengchengwen@huawei.com> wrote:
>>
>> Currently, the RTE_EXPORT_INTERNAL_SYMBOL, RTE_EXPORT_SYMBOL and
>> RTE_EXPORT_EXPERIMENTAL_SYMBOL are placed at the beginning of APIs,
>> but don't end with a semicolon. As a result, some IDEs cannot identify
>> the APIs and cannot quickly jump to the definition.
>>
>> A semicolon is added to the end of above RTE_EXPORT_XXX_SYMBOL in this
>> commit.
>>
>> And also redefine RTE_EXPORT_XXX_SYMBOL:
>> #define RTE_EXPORT_XXX_SYMBOL(x, x) extern int dummy_rte_export_symbol
>>
>> Chengwen Feng (5):
>>   lib: add semicolon when export symbol
>>   lib: add semicolon when export experimental symbol
>>   lib: add semicolon when export internal symbol
>>   drivers: add semicolon when export any symbol
>>   doc: update ABI versioning guide
> 
> I am skeptical about this series.
> 
> The current positionning should be seen as an additional info on the
> return type, in the definition of the symbol.
> Does it mean that this IDE would fail if we add any kind of
> macros/attribute involving the symbol name?

I tried vscode and SI (source insight), and found user could use "token macro" in SI
to make the IDE skip such symbol (so use ctrl+ will quick jump to definition), but
I can't find such setting for vscode.

> 
> Afaics, ctags can be taught to skip those macros and just behaves
> correctly by adding in its config file:
> -DRTE_EXPORT_EXPERIMENTAL_SYMBOL(a)=
> -DRTE_EXPORT_INTERNAL_SYMBOL(a)=
> -DRTE_EXPORT_SYMBOL(a)=

How about add note in DPDK document if don't apply this commit?

> 
> I think another option would be to move the call to export macros
> after the whole definition of the symbol, though I prefer the current
> position for readability.

If not add a semi, it will affect next API:
int A()
RTE_EXPORT_SYMBOL(A)

int B()

> 
> 


      reply	other threads:[~2025-09-04  0:24 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-28  2:59 [PATCH] dpdk: support quick jump to API definition Chengwen Feng
2025-08-29  2:34 ` [PATCH v2 0/3] " Chengwen Feng
2025-08-29  2:34   ` [PATCH v2 1/3] lib: " Chengwen Feng
2025-08-29  2:34   ` [PATCH v2 2/3] drivers: " Chengwen Feng
2025-08-29  2:34   ` [PATCH v2 3/3] doc: update ABI versioning guide Chengwen Feng
2025-09-01  1:21 ` [PATCH v3 0/5] add semicolon when export any symbol Chengwen Feng
2025-09-01  1:21   ` [PATCH v3 1/5] lib: add semicolon when export symbol Chengwen Feng
2025-09-01  1:21   ` [PATCH v3 2/5] lib: add semicolon when export experimental symbol Chengwen Feng
2025-09-06  4:14     ` Stephen Hemminger
2025-09-01  1:21   ` [PATCH v3 3/5] lib: add semicolon when export internal symbol Chengwen Feng
2025-09-01  1:21   ` [PATCH v3 4/5] drivers: add semicolon when export any symbol Chengwen Feng
2025-09-01  1:21   ` [PATCH v3 5/5] doc: update ABI versioning guide Chengwen Feng
2025-09-01 10:46 ` [PATCH v4 0/5] add semicolon when export any symbol Chengwen Feng
2025-09-01 10:46   ` [PATCH v4 1/5] lib: add semicolon when export symbol Chengwen Feng
2025-09-01 10:46   ` [PATCH v4 2/5] lib: add semicolon when export experimental symbol Chengwen Feng
2025-09-01 10:46   ` [PATCH v4 3/5] lib: add semicolon when export internal symbol Chengwen Feng
2025-09-01 10:46   ` [PATCH v4 4/5] drivers: add semicolon when export any symbol Chengwen Feng
2025-09-01 10:46   ` [PATCH v4 5/5] doc: update ABI versioning guide Chengwen Feng
2025-09-03  2:05 ` [PATCH v5 0/5] add semicolon when export any symbol Chengwen Feng
2025-09-03  2:05   ` [PATCH v5 1/5] lib: add semicolon when export symbol Chengwen Feng
2025-09-03  2:05   ` [PATCH v5 2/5] lib: add semicolon when export experimental symbol Chengwen Feng
2025-09-03  2:05   ` [PATCH v5 3/5] lib: add semicolon when export internal symbol Chengwen Feng
2025-09-03  2:05   ` [PATCH v5 4/5] drivers: add semicolon when export any symbol Chengwen Feng
2025-09-03  2:05   ` [PATCH v5 5/5] doc: update ABI versioning guide Chengwen Feng
2025-09-03  7:04   ` [PATCH v5 0/5] add semicolon when export any symbol David Marchand
2025-09-04  0:24     ` fengchengwen [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=abd687d3-acb9-4692-98a4-73ec03154efe@huawei.com \
    --to=fengchengwen@huawei.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.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).