On 2024-10-16 17:04, Stephen Hemminger wrote:
On Wed, 16 Oct 2024 15:54:11 +0200
Mattias Rönnblom <[email protected]> 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 <[email protected]>
Suggested-by: David Marchand <[email protected]>

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).

Reply via email to