8ea4143883
Add dedicated parameter structure for cuckoo hash. The cuckoo hash from librte_hash uses slightly different prototype for the hash function (no key_mask parameter, 32-bit seed and return value) that require either of the following approaches: 1/ Function pointer conversion: gcc 8.1 warning [1], misleading [2] 2/ Union within the parameter structure: pollutes a very generic API parameter structure with some implementation dependent detail (i.e. key mask not available for one of the available implementations) 3/ Using opaque pointer for hash function: same issue from 2/ 4/ Different parameter structure: avoid issue from 2/; hopefully, it won't be long before librte_hash implements the key mask feature, so the generic API structure could be used. [1] http://www.dpdk.org/ml/archives/dev/2018-April/094950.html [2] http://www.dpdk.org/ml/archives/dev/2018-April/096250.html Fixes: 5a80bf0ae613 ("table: add cuckoo hash") Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
60 lines
1.9 KiB
Makefile
60 lines
1.9 KiB
Makefile
# SPDX-License-Identifier: BSD-3-Clause
|
|
# Copyright(c) 2010-2016 Intel Corporation
|
|
|
|
include $(RTE_SDK)/mk/rte.vars.mk
|
|
|
|
#
|
|
# library name
|
|
#
|
|
LIB = librte_table.a
|
|
|
|
CFLAGS += -O3
|
|
CFLAGS += $(WERROR_FLAGS)
|
|
LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf -lrte_port
|
|
LDLIBS += -lrte_lpm -lrte_hash
|
|
ifeq ($(CONFIG_RTE_LIBRTE_ACL),y)
|
|
LDLIBS += -lrte_acl
|
|
endif
|
|
|
|
EXPORT_MAP := rte_table_version.map
|
|
|
|
LIBABIVER := 3
|
|
|
|
#
|
|
# all source are stored in SRCS-y
|
|
#
|
|
SRCS-$(CONFIG_RTE_LIBRTE_TABLE) += rte_table_lpm.c
|
|
SRCS-$(CONFIG_RTE_LIBRTE_TABLE) += rte_table_lpm_ipv6.c
|
|
ifeq ($(CONFIG_RTE_LIBRTE_ACL),y)
|
|
SRCS-$(CONFIG_RTE_LIBRTE_TABLE) += rte_table_acl.c
|
|
endif
|
|
SRCS-$(CONFIG_RTE_LIBRTE_TABLE) += rte_table_hash_cuckoo.c
|
|
SRCS-$(CONFIG_RTE_LIBRTE_TABLE) += rte_table_hash_key8.c
|
|
SRCS-$(CONFIG_RTE_LIBRTE_TABLE) += rte_table_hash_key16.c
|
|
SRCS-$(CONFIG_RTE_LIBRTE_TABLE) += rte_table_hash_key32.c
|
|
SRCS-$(CONFIG_RTE_LIBRTE_TABLE) += rte_table_hash_ext.c
|
|
SRCS-$(CONFIG_RTE_LIBRTE_TABLE) += rte_table_hash_lru.c
|
|
SRCS-$(CONFIG_RTE_LIBRTE_TABLE) += rte_table_array.c
|
|
SRCS-$(CONFIG_RTE_LIBRTE_TABLE) += rte_table_stub.c
|
|
|
|
# install includes
|
|
SYMLINK-$(CONFIG_RTE_LIBRTE_TABLE)-include += rte_table.h
|
|
SYMLINK-$(CONFIG_RTE_LIBRTE_TABLE)-include += rte_table_lpm.h
|
|
SYMLINK-$(CONFIG_RTE_LIBRTE_TABLE)-include += rte_table_lpm_ipv6.h
|
|
ifeq ($(CONFIG_RTE_LIBRTE_ACL),y)
|
|
SYMLINK-$(CONFIG_RTE_LIBRTE_TABLE)-include += rte_table_acl.h
|
|
endif
|
|
SYMLINK-$(CONFIG_RTE_LIBRTE_TABLE)-include += rte_table_hash.h
|
|
SYMLINK-$(CONFIG_RTE_LIBRTE_TABLE)-include += rte_table_hash_cuckoo.h
|
|
SYMLINK-$(CONFIG_RTE_LIBRTE_TABLE)-include += rte_lru.h
|
|
ifeq ($(CONFIG_RTE_ARCH_X86),y)
|
|
SYMLINK-$(CONFIG_RTE_LIBRTE_TABLE)-include += rte_lru_x86.h
|
|
endif
|
|
ifeq ($(CONFIG_RTE_ARCH_ARM64),y)
|
|
SYMLINK-$(CONFIG_RTE_LIBRTE_TABLE)-include += rte_lru_arm64.h
|
|
endif
|
|
SYMLINK-$(CONFIG_RTE_LIBRTE_TABLE)-include += rte_table_array.h
|
|
SYMLINK-$(CONFIG_RTE_LIBRTE_TABLE)-include += rte_table_stub.h
|
|
|
|
include $(RTE_SDK)/mk/rte.lib.mk
|