1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2019-2020 Broadcom
6 /* Truflow Table APIs and supporting code */
12 #include <sys/param.h>
13 #include <rte_common.h>
14 #include <rte_errno.h>
15 #include "hsi_struct_def_dpdk.h"
18 #include "tf_session.h"
23 #include "tf_resources.h"
26 #define PTU_PTE_VALID 0x1UL
27 #define PTU_PTE_LAST 0x2UL
28 #define PTU_PTE_NEXT_TO_LAST 0x4UL
30 /* Number of pointers per page_size */
31 #define MAX_PAGE_PTRS(page_size) ((page_size) / sizeof(void *))
33 /* API defined in tf_tbl.h */
35 tf_init_tbl_pool(struct tf_session *session)
39 for (dir = 0; dir < TF_DIR_MAX; dir++) {
40 session->ext_pool_2_scope[dir][TF_EXT_POOL_0] =