2 Copyright (c) 2017 Cisco and/or its affiliates.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * Note: to instantiate the template multiple times in a single file,
19 * #undef __included_cuckoo_template_h__...
21 #ifndef __included_cuckoo_common_h__
22 #define __included_cuckoo_common_h__
24 #include <vppinfra/types.h>
26 #define CLIB_CUCKOO_OPTIMIZE_PREFETCH 1
27 #define CLIB_CUCKOO_OPTIMIZE_UNROLL 1
28 #define CLIB_CUCKOO_OPTIMIZE_USE_COUNT_LIMITS_SEARCH 1
30 #define foreach_clib_cuckoo_error(F) \
31 F (CLIB_CUCKOO_ERROR_SUCCESS, 0, "success") \
32 F (CLIB_CUCKOO_ERROR_NOT_FOUND, -1, "object not found") \
33 F (CLIB_CUCKOO_ERROR_AGAIN, -2, "object busy")
37 #define F(n, v, s) n = v,
38 foreach_clib_cuckoo_error (F)
40 } clib_cuckoo_error_e;
47 } clib_cuckoo_lookup_info_t;
49 #endif /* __included_cuckoo_common_h__ */
54 * fd.io coding-style-patch-verification: ON
57 * eval: (c-set-style "gnu")