Lines Matching +full:lookup +full:- +full:table
1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
53 /** @internal Macro to enable/disable run-time checks. */
65 /** Bitmask used to indicate successful lookup */
82 * - valid_group == 0: entry stores a next hop
83 * - valid_group == 1: entry stores a group_index pointing to a tbl8
85 * - valid_group indicates whether the current tbl8 is in use or not
117 /** @internal Contains metadata about the rules table. */
125 struct nhop_object **nh_idx; /**< # -> idx mappings */
137 struct rte_lpm_rule_info rule_info[RTE_LPM_MAX_DEPTH]; /**< Rule info table. */
141 __rte_cache_aligned; /**< LPM tbl24 table. */
142 struct rte_lpm_tbl_entry *tbl8; /**< LPM tbl8 table. */
152 * NUMA socket ID for LPM table memory allocation
158 * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure
159 * - E_RTE_SECONDARY - function was called from a secondary process instance
160 * - EINVAL - invalid parameter passed to function
161 * - ENOSPC - the maximum number of memzones has already been allocated
162 * - EEXIST - a memzone with the same name already exists
163 * - ENOMEM - no appropriate memory area found in which to create memzone
177 * - ENOENT - required entry not available to return.
194 * Add a rule to the LPM table.
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
211 * Check if a rule is present in the LPM table,
230 * Delete a rule from the LPM table.
235 * IP of the rule to be deleted from the LPM table
237 * Depth of the rule to be deleted from the LPM table
250 * Delete all rules from the LPM table.
259 * Lookup an IP into the LPM table.
264 * IP to be looked up in the LPM table
266 * Next hop of the most specific rule found for IP (valid on lookup hit only)
268 * -EINVAL for incorrect arguments, -ENOENT on lookup miss, 0 on lookup hit
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()
284 /* Memory ordering is not required in lookup. Because dataflow in rte_lpm_lookup()
285 * dependency exists, compiler or HW won't be able to re-order in rte_lpm_lookup()
296 ptbl = (const uint32_t *)&lpm->tbl8[tbl8_index]; in rte_lpm_lookup()
301 return (tbl_entry & RTE_LPM_LOOKUP_SUCCESS) ? 0 : -ENOENT; in rte_lpm_lookup()
305 * Lookup multiple IP addresses in an LPM table. This may be implemented as a
311 * Array of IPs to be looked up in the LPM table
313 * Next hop of the most specific rule found for IP (valid on lookup hit only).
315 * value says whether the lookup was successful (bitmask
319 * Number of elements in ips (and next_hops) array to lookup. This should be a
322 * -EINVAL for incorrect arguments, otherwise 0
337 (next_hops == NULL)), -EINVAL); 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.
372 * Four IPs to be looked up in the LPM table
374 * Next hop of the most specific rule found for IP (valid on lookup hit only).
376 * If the lookup was successful for the given IP, then least significant byte
379 * If the lookup for the given IP failed, then corresponding element would
383 * if lookup would fail.