33 #ifndef _RTE_DIST_PRIV_H_
34 #define _RTE_DIST_PRIV_H_
49 #define RTE_DISTRIB_PREFIX "DT_"
57 #define RTE_DISTRIB_FLAG_BITS 4
58 #define RTE_DISTRIB_FLAGS_MASK (0x0F)
59 #define RTE_DISTRIB_NO_BUF 0
60 #define RTE_DISTRIB_GET_BUF (1)
61 #define RTE_DISTRIB_RETURN_BUF (2)
62 #define RTE_DISTRIB_VALID_BUF (4)
64 #define RTE_DISTRIB_BACKLOG_SIZE 8
65 #define RTE_DISTRIB_BACKLOG_MASK (RTE_DISTRIB_BACKLOG_SIZE - 1)
67 #define RTE_DISTRIB_MAX_RETURNS 128
68 #define RTE_DISTRIB_RETURNS_MASK (RTE_DISTRIB_MAX_RETURNS - 1)
75 #define RTE_DISTRIB_MAX_WORKERS 64
77 #define RTE_DISTRIBUTOR_NAMESIZE 32
86 union rte_distributor_buffer_v20 {
87 volatile int64_t bufptr64;
88 char pad[RTE_CACHE_LINE_SIZE*3];
95 #define RTE_DIST_BURST_SIZE 8
97 struct rte_distributor_backlog {
108 struct rte_mbuf *mbufs[RTE_DISTRIB_MAX_RETURNS];
111 struct rte_distributor_v20 {
112 TAILQ_ENTRY(rte_distributor_v20) next;
115 unsigned int num_workers;
119 uint64_t in_flight_bitmask;
125 struct rte_distributor_backlog backlog[RTE_DISTRIB_MAX_WORKERS];
133 enum rte_distributor_match_function {
134 RTE_DIST_MATCH_SCALAR = 0,
135 RTE_DIST_MATCH_VECTOR,
136 RTE_DIST_NUM_MATCH_FNS
148 volatile int64_t bufptr64[RTE_DIST_BURST_SIZE]
153 volatile int64_t retptr64[RTE_DIST_BURST_SIZE]
161 struct rte_distributor {
162 TAILQ_ENTRY(rte_distributor) next;
165 unsigned int num_workers;
166 unsigned int alg_type;
183 enum rte_distributor_match_function dist_match_fn;
185 struct rte_distributor_v20 *d_v20;
189 find_match_scalar(struct rte_distributor *d,
191 uint16_t *output_ptr);
194 find_match_vec(struct rte_distributor *d,
196 uint16_t *output_ptr);