From: "Mattias Rönnblom" <hofors@lysator.liu.se>
To: "Stephen Hemminger" <stephen@networkplumber.org>,
"Mattias Rönnblom" <mattias.ronnblom@ericsson.com>
Cc: dev@dpdk.org, David Marchand <david.marchand@redhat.com>
Subject: Re: [PATCH 2/2] devtools: forbid the use of ffs compiler builtins
Date: Thu, 17 Oct 2024 07:50:06 +0200 [thread overview]
Message-ID: <c8ceb855-4c12-4562-a6d7-7e1917838ba2@lysator.liu.se> (raw)
In-Reply-To: <20241016080424.3f614ac2@hermes.local>
On 2024-10-16 17:04, Stephen Hemminger wrote:
> On Wed, 16 Oct 2024 15:54:11 +0200
> Mattias Rönnblom <mattias.ronnblom@ericsson.com> wrote:
>
>> Extend checkpatches.sh to detect the use of __builtin_(ffs|ffsll).
>>
>> These intrinsics are not available in MSVC, and there are perfectly
>> serviceable alternatives in <rte_bitops.h>.
>>
>> Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
>> Suggested-by: David Marchand <david.marchand@redhat.com>
>
> Shouldn't this apply to all _builtin_ functions.
>
Aren̈́'t GCC builtins pretty much standard? So any driver not targeting
Windows should be fine, although it would be better to use a DPDK wrapper.
> There are a lot of drivers still doing this.
I would suggest we fix this when someone has taken the time to
improve/modernize/extend <rte_bitops.h> further (e.g., with _Generic
versions of all bit fiddling and count functions and "all" __builtins
are covered).
I guess other APIs also may need to be extended (for non-bitops builtins).
next prev parent reply other threads:[~2024-10-17 5:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 13:54 [PATCH 1/2] bitset: discontinue the use of GCC builtin Mattias Rönnblom
2024-10-16 13:54 ` [PATCH 2/2] devtools: forbid the use of ffs compiler builtins Mattias Rönnblom
2024-10-16 15:04 ` Stephen Hemminger
2024-10-16 15:32 ` David Marchand
2024-10-16 15:39 ` Stephen Hemminger
2024-10-16 20:55 ` David Marchand
2024-10-17 5:50 ` Mattias Rönnblom [this message]
2024-10-16 15:19 ` [PATCH 1/2] bitset: discontinue the use of GCC builtin David Marchand
2024-10-16 20:55 ` David Marchand
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=c8ceb855-4c12-4562-a6d7-7e1917838ba2@lysator.liu.se \
--to=hofors@lysator.liu.se \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=mattias.ronnblom@ericsson.com \
--cc=stephen@networkplumber.org \
/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).