Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4D37C27C53 for ; Wed, 19 Jun 2024 07:08:33 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D0C524026E; Wed, 19 Jun 2024 09:08:32 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 2C0CE4021D for ; Wed, 19 Jun 2024 09:08:16 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id E571020778; Wed, 19 Jun 2024 09:08:15 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: [PATCH 1/5] config/riscv: add flag for using Zbc extension Content-Transfer-Encoding: quoted-printable Date: Wed, 19 Jun 2024 09:08:14 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F53C@smartserver.smartshare.dk> In-Reply-To: <20240618130318.0efacceb@hermes.local> X-MimeOLE: Produced By Microsoft Exchange V6.5 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH 1/5] config/riscv: add flag for using Zbc extension Thread-Index: AdrBupP4Z5fzfUbERBaPK+iH8XLf4AAXEiog References: <20240618174133.33457-1-daniel.gregory@bytedance.com> <20240618174133.33457-2-daniel.gregory@bytedance.com> <20240618130318.0efacceb@hermes.local> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Stephen Hemminger" , "Daniel Gregory" Cc: "Stanislaw Kardach" , "Bruce Richardson" , , "Liang Ma" , "Punit Agrawal" , "Pengcheng Wang" , "Chunsong Feng" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > From: Stephen Hemminger [mailto:stephen@networkplumber.org] 1/5] config/riscv: add flag for using Zbc extension >=20 > On Tue, 18 Jun 2024 18:41:29 +0100 > Daniel Gregory wrote: >=20 > > 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 =3D [ > > # 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], > > ] >=20 > Please do not add more config options via compile flags. > It makes it impossible for distros to ship one version. >=20 > Instead, detect at compile or runtime Build time detection is not possible for cross builds.