[PATCH 1/5] config/riscv: add flag for using Zbc extension
Stephen Hemminger
stephen at networkplumber.org
Tue Jun 18 22:03:18 CEST 2024
On Tue, 18 Jun 2024 18:41:29 +0100
Daniel Gregory <daniel.gregory at bytedance.com> wrote:
> diff --git a/config/riscv/meson.build b/config/riscv/meson.build
> index 07d7d9da23..4bda4089bd 100644
> --- a/config/riscv/meson.build
> +++ b/config/riscv/meson.build
> @@ -26,6 +26,13 @@ flags_common = [
> # read from /proc/device-tree/cpus/timebase-frequency. This property is
> # guaranteed on Linux, as riscv time_init() requires it.
> ['RTE_RISCV_TIME_FREQ', 0],
> +
> + # Use RISC-V Carry-less multiplication extension (Zbc) for hardware
> + # implementations of CRC-32C (lib/hash/rte_crc_riscv64.h), CRC-32 and CRC-16
> + # (lib/net/net_crc_zbc.c). Requires intrinsics available in GCC 14.1.0+ and
> + # Clang 18.1.0+
> + # Make sure to add '_zbc' to your target's -march below
> + ['RTE_RISCV_ZBC', false],
> ]
Please do not add more config options via compile flags.
It makes it impossible for distros to ship one version.
Instead, detect at compile or runtime
More information about the dev
mailing list