1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2020 Intel Corporation
5 #ifndef _INCLUDE_OBJ_H_
6 #define _INCLUDE_OBJ_H_
11 #include <rte_mempool.h>
12 #include <rte_swx_pipeline.h>
13 #include <rte_swx_ctl.h>
30 struct mempool_params {
38 TAILQ_ENTRY(mempool) node;
40 struct rte_mempool *m;
45 mempool_create(struct obj *obj,
47 struct mempool_params *params);
50 mempool_find(struct obj *obj,
56 #ifndef LINK_RXQ_RSS_MAX
57 #define LINK_RXQ_RSS_MAX 16
60 struct link_params_rss {
61 uint32_t queue_id[LINK_RXQ_RSS_MAX];
67 uint16_t port_id; /**< Valid only when *dev_name* is NULL. */
72 const char *mempool_name;
73 struct link_params_rss *rss;
85 TAILQ_ENTRY(link) node;
87 char dev_name[NAME_SIZE];
94 link_create(struct obj *obj,
96 struct link_params *params);
99 link_is_up(struct obj *obj, const char *name);
102 link_find(struct obj *obj, const char *name);
105 link_next(struct obj *obj, struct link *link);
116 TAILQ_ENTRY(ring) node;
117 char name[NAME_SIZE];
121 ring_create(struct obj *obj,
123 struct ring_params *params);
126 ring_find(struct obj *obj, const char *name);
132 TAILQ_ENTRY(pipeline) node;
133 char name[NAME_SIZE];
135 struct rte_swx_pipeline *p;
136 struct rte_swx_ctl_pipeline *ctl;
138 uint32_t timer_period_ms;
145 pipeline_create(struct obj *obj,
150 pipeline_find(struct obj *obj, const char *name);
152 #endif /* _INCLUDE_OBJ_H_ */