Lines Matching full:lpm
10 * RTE Longest Prefix Match (LPM)
31 /** Max number of characters in LPM name. */
34 /** Maximum depth value possible for IPv4 LPM. */
104 /** LPM configuration structure. */
130 /** @internal LPM structure. */
132 /* LPM metadata. */
134 char name[RTE_LPM_NAMESIZE]; /**< Name of the lpm. */
135 uint32_t max_rules; /**< Max. balanced rules per lpm. */
139 /* LPM Tables. */
141 __rte_cache_aligned; /**< LPM tbl24 table. */
142 struct rte_lpm_tbl_entry *tbl8; /**< LPM tbl8 table. */
143 struct rte_lpm_rule *rules_tbl; /**< LPM rules. */
147 * Create an LPM object.
150 * LPM object name
152 * NUMA socket ID for LPM table memory allocation
156 * Handle to LPM object on success, NULL otherwise with rte_errno set
170 * Find an existing LPM object and return a pointer to it.
173 * Name of the lpm object as passed to rte_lpm_create()
175 * Pointer to lpm object or NULL if object not found with rte_errno
183 * Free an LPM object.
185 * @param lpm
186 * LPM object handle
191 rte_lpm_free(struct rte_lpm *lpm);
194 * Add a rule to the LPM table.
196 * @param lpm
197 * LPM object handle
199 * IP of the rule to be added to the LPM table
201 * Depth of the rule to be added to the LPM table
203 * Next hop of the rule to be added to the LPM table
208 rte_lpm_add(struct rte_lpm *lpm, uint32_t ip, uint8_t depth, uint32_t next_hop);
211 * Check if a rule is present in the LPM table,
214 * @param lpm
215 * LPM object handle
226 rte_lpm_is_rule_present(struct rte_lpm *lpm, uint32_t ip, uint8_t depth,
230 * Delete a rule from the LPM table.
232 * @param lpm
233 * LPM object handle
235 * IP of the rule to be deleted from the LPM table
237 * Depth of the rule to be deleted from the LPM table
246 rte_lpm_delete(struct rte_lpm *lpm, uint32_t ip, uint8_t depth,
250 * Delete all rules from the LPM table.
252 * @param lpm
253 * LPM object handle
256 rte_lpm_delete_all(struct rte_lpm *lpm);
259 * Lookup an IP into the LPM table.
261 * @param lpm
262 * LPM object handle
264 * IP to be looked up in the LPM table
271 rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop) in rte_lpm_lookup() argument
278 RTE_LPM_RETURN_IF_TRUE(((lpm == NULL) || (next_hop == NULL)), -EINVAL); in rte_lpm_lookup()
281 ptbl = (const uint32_t *)(&lpm->tbl24[tbl24_index]); in rte_lpm_lookup()
296 ptbl = (const uint32_t *)&lpm->tbl8[tbl8_index]; in rte_lpm_lookup()
305 * Lookup multiple IP addresses in an LPM table. This may be implemented as a
308 * @param lpm
309 * LPM object handle
311 * Array of IPs to be looked up in the LPM table
324 #define rte_lpm_lookup_bulk(lpm, ips, next_hops, n) \ argument
325 rte_lpm_lookup_bulk_func(lpm, ips, next_hops, n)
328 rte_lpm_lookup_bulk_func(const struct rte_lpm *lpm, const uint32_t *ips, in rte_lpm_lookup_bulk_func() argument
336 RTE_LPM_RETURN_IF_TRUE(((lpm == NULL) || (ips == NULL) || in rte_lpm_lookup_bulk_func()
345 ptbl = (const uint32_t *)&lpm->tbl24[tbl24_indexes[i]]; in rte_lpm_lookup_bulk_func()
356 ptbl = (const uint32_t *)&lpm->tbl8[tbl8_index]; in rte_lpm_lookup_bulk_func()
367 * Lookup four IP addresses in an LPM table.
369 * @param lpm
370 * LPM object handle
372 * Four IPs to be looked up in the LPM table
387 rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4],