1 /******************************************************************************
3 * Copyright (c) 2019 Intel.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 *******************************************************************************/
21 * @brief Definitions and support functions to process XRAN packet
23 * @ingroup group_source_xran
24 * @author Intel Corporation
30 #include <rte_common.h>
32 #include <rte_hash_crc.h>
34 #define DEFAULT_HASH_FUNC rte_hash_crc
37 struct rte_hash *xran_section_init_hash(uint16_t dir, uint16_t cid, int max_num_sections);
38 void xran_section_free_hash(struct rte_hash *hash);
40 void xran_section_reset_hash(struct rte_hash *hash);
41 int xran_section_add_hash(const struct rte_hash *hash, uint16_t section_id, int index);
42 int xran_section_lookup(const struct rte_hash *hash, uint16_t section_id);
43 int xran_section_iterate(const struct rte_hash *hash, uint32_t *next);