[PATCH v11 21/22] hash: move rte_hash_set_alg out header
Ruifeng Wang
Ruifeng.Wang at arm.com
Thu Feb 23 08:11:06 CET 2023
> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Thursday, February 23, 2023 5:56 AM
> To: dev at dpdk.org
> Cc: Stephen Hemminger <stephen at networkplumber.org>; Yipeng Wang <yipeng1.wang at intel.com>;
> Sameh Gobriel <sameh.gobriel at intel.com>; Bruce Richardson <bruce.richardson at intel.com>;
> Vladimir Medvedkin <vladimir.medvedkin at intel.com>; Ruifeng Wang <Ruifeng.Wang at arm.com>
> Subject: [PATCH v11 21/22] hash: move rte_hash_set_alg out header
>
> The code for setting algorithm for hash is not at all perf sensitive, and doing it inline
> has a couple of problems. First, it means that if multiple files include the header, then
> the initialization gets done multiple times. But also, it makes it harder to fix usage of
> RTE_LOG().
>
> Despite what the checking script say. This is not an ABI change, the previous version
> inlined the same code; therefore both old and new code will work the same.
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
> lib/hash/meson.build | 1 +
> lib/hash/rte_crc_arm64.h | 8 ++---
> lib/hash/rte_crc_x86.h | 10 +++---
> lib/hash/rte_hash_crc.c | 68 ++++++++++++++++++++++++++++++++++++++++
> lib/hash/rte_hash_crc.h | 48 ++--------------------------
> lib/hash/version.map | 7 +++++
> 6 files changed, 88 insertions(+), 54 deletions(-) create mode 100644
> lib/hash/rte_hash_crc.c
>
> diff --git a/lib/hash/meson.build b/lib/hash/meson.build index e56ee8572564..c345c6f561fc
> 100644
> --- a/lib/hash/meson.build
> +++ b/lib/hash/meson.build
> @@ -19,6 +19,7 @@ indirect_headers += files(
>
> sources = files(
> 'rte_cuckoo_hash.c',
> + 'rte_hash_crc.c',
I suppose this list is alphabetically ordered.
> 'rte_fbk_hash.c',
> 'rte_thash.c',
> 'rte_thash_gfni.c'
<snip>
> diff --git a/lib/hash/rte_hash_crc.h b/lib/hash/rte_hash_crc.h index
> 0249ad16c5b6..e8145ee44204 100644
> --- a/lib/hash/rte_hash_crc.h
> +++ b/lib/hash/rte_hash_crc.h
> @@ -20,8 +20,6 @@ extern "C" {
> #include <rte_branch_prediction.h>
> #include <rte_common.h>
> #include <rte_config.h>
> -#include <rte_cpuflags.h>
A couple of files need update with this change.
rte_cpuflags.h should be included in rte_fbk_hash.c (for ARM) and rte_efd.c.
> -#include <rte_log.h>
>
> #include "rte_crc_sw.h"
>
<snip>
More information about the dev
mailing list