Home
last modified time | relevance | path

Searched refs:lpm (Results 1 – 25 of 75) sorted by relevance

123

/f-stack/freebsd/contrib/dpdk_rte_lpm/
H A Drte_lpm.c179 lpm = NULL; in rte_lpm_create()
209 lpm = NULL; in rte_lpm_create()
231 strlcpy(lpm->name, name, sizeof(lpm->name)); in rte_lpm_create()
240 return lpm; in rte_lpm_create()
348 lpm->rules_tbl[lpm->rule_info[i - 1].first_rule
377 lpm->rules_tbl[lpm->rule_info[depth - 1].first_rule
382 lpm->rules_tbl[lpm->rule_info[i].first_rule - 1] =
383 lpm->rules_tbl[lpm->rule_info[i].first_rule
1099 memset(lpm->tbl24, 0, sizeof(lpm->tbl24)); in rte_lpm_delete_all()
1102 memset(lpm->tbl8, 0, sizeof(lpm->tbl8[0]) in rte_lpm_delete_all()
[all …]
H A Drte_lpm6.c179 if (lpm->tbl8_pool_pos == lpm->number_tbl8s) in tbl8_get()
184 *tbl8_ind = lpm->tbl8_pool[lpm->tbl8_pool_pos++]; in tbl8_get()
198 lpm->tbl8_pool[--lpm->tbl8_pool_pos] = tbl8_ind; in tbl8_put()
208 return lpm->number_tbl8s - lpm->tbl8_pool_pos; in tbl8_available()
315 mem_size = sizeof(*lpm) + (sizeof(lpm->tbl8[0]) * in rte_lpm6_create()
327 lpm = NULL; in rte_lpm6_create()
356 strlcpy(lpm->name, name, sizeof(lpm->name)); in rte_lpm6_create()
1114 memset(lpm->tbl24, 0, sizeof(lpm->tbl24));
1115 memset(lpm->tbl8, 0, sizeof(lpm->tbl8[0])
1138 memset(lpm->tbl24, 0, sizeof(lpm->tbl24));
[all …]
H A Drte_lpm.h191 rte_lpm_free(struct rte_lpm *lpm);
246 rte_lpm_delete(struct rte_lpm *lpm, uint32_t ip, uint8_t depth,
256 rte_lpm_delete_all(struct rte_lpm *lpm);
271 rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop) in rte_lpm_lookup() argument
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()
324 #define rte_lpm_lookup_bulk(lpm, ips, next_hops, n) \ argument
325 rte_lpm_lookup_bulk_func(lpm, ips, next_hops, n)
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()
[all …]
H A Drte_lpm6.h87 rte_lpm6_free(struct rte_lpm6 *lpm);
104 rte_lpm6_add(struct rte_lpm6 *lpm, const uint8_t *ip, uint8_t depth,
123 rte_lpm6_is_rule_present(struct rte_lpm6 *lpm, const uint8_t *ip, uint8_t depth,
139 rte_lpm6_delete(struct rte_lpm6 *lpm, const uint8_t *ip, uint8_t depth,
157 rte_lpm6_delete_bulk_func(struct rte_lpm6 *lpm,
167 rte_lpm6_delete_all(struct rte_lpm6 *lpm);
182 rte_lpm6_lookup(const struct rte_lpm6 *lpm, const uint8_t *ip, uint32_t *next_hop);
201 rte_lpm6_lookup_bulk_func(const struct rte_lpm6 *lpm,
H A Ddpdk_lpm.c65 struct rte_lpm *lpm; member
81 struct rte_lpm *lpm; in lookup_ptr() local
86 lpm = (struct rte_lpm *)algo_data; in lookup_ptr()
237 if (dd->lpm != NULL) in destroy_table()
238 rte_lpm_free(dd->lpm); in destroy_table()
276 dd->lpm, abuf, plen, nhidx, ret); in add_route_cb()
309 dp->arg = dd->lpm; in check_dump_success()
331 struct rte_lpm *lpm; in build_table() local
344 lpm = rte_lpm_create("test", 0, &cfg); in build_table()
345 if (lpm == NULL) { in build_table()
[all …]
H A Ddpdk_lpm6.h52 rte_lpm6_free(struct rte_lpm6 *lpm);
54 rte_lpm6_add(struct rte_lpm6 *lpm, const uint8_t *ip, uint8_t depth,
/f-stack/dpdk/app/test/
H A Dtest_lpm6.c212 rte_lpm6_free(lpm); in test2()
238 rte_lpm6_free(lpm); in test3()
276 rte_lpm6_free(lpm); in test4()
314 rte_lpm6_free(lpm); in test5()
352 rte_lpm6_free(lpm); in test6()
390 rte_lpm6_free(lpm); in test7()
428 rte_lpm6_free(lpm); in test8()
474 rte_lpm6_free(lpm); in test9()
519 rte_lpm6_free(lpm); in test10()
579 rte_lpm6_free(lpm); in test11()
[all …]
H A Dtest_lpm.c131 rte_lpm_free(lpm); in test1()
157 rte_lpm_free(lpm); in test2()
194 rte_lpm_free(lpm); in test3()
232 rte_lpm_free(lpm); in test4()
266 rte_lpm_free(lpm); in test5()
304 rte_lpm_free(lpm); in test6()
350 rte_lpm_free(lpm); in test7()
439 rte_lpm_free(lpm); in test8()
601 rte_lpm_free(lpm); in test9()
799 rte_lpm_free(lpm); in test10()
[all …]
H A Dtest_lpm6_perf.c56 struct rte_lpm6 *lpm = NULL; in test_lpm6_perf() local
79 lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config); in test_lpm6_perf()
80 TEST_LPM_ASSERT(lpm != NULL); in test_lpm6_perf()
86 if (rte_lpm6_add(lpm, large_route_table[i].ip, in test_lpm6_perf()
105 if (rte_lpm6_lookup(lpm, large_ips_table[j].ip, in test_lpm6_perf()
131 rte_lpm6_lookup_bulk_func(lpm, ip_batch, next_hops, NUM_IPS_ENTRIES); in test_lpm6_perf()
148 status += rte_lpm6_delete(lpm, large_route_table[i].ip, in test_lpm6_perf()
157 rte_lpm6_delete_all(lpm); in test_lpm6_perf()
158 rte_lpm6_free(lpm); in test_lpm6_perf()
H A Dtest_lpm_perf.c21 struct rte_lpm *lpm; variable
525 TEST_LPM_ASSERT(lpm != NULL); in test_lpm_rcu_perf_multi_writer()
536 if (rte_lpm_rcu_qsbr_add(lpm, &rcu_cfg) != 0) { in test_lpm_rcu_perf_multi_writer()
577 rte_lpm_free(lpm); in test_lpm_rcu_perf_multi_writer()
579 lpm = NULL; in test_lpm_rcu_perf_multi_writer()
590 rte_lpm_free(lpm); in test_lpm_rcu_perf_multi_writer()
620 TEST_LPM_ASSERT(lpm != NULL); in test_lpm_perf()
626 if (rte_lpm_add(lpm, large_route_table[i].ip, in test_lpm_perf()
636 if (lpm->tbl24[i].valid) in test_lpm_perf()
754 rte_lpm_delete_all(lpm); in test_lpm_perf()
[all …]
H A Dtest_func_reentrancy.c338 struct rte_lpm *lpm; in lpm_clean() local
344 if ((lpm = rte_lpm_find_existing(lpm_name)) != NULL) in lpm_clean()
345 rte_lpm_free(lpm); in lpm_clean()
353 struct rte_lpm *lpm; in lpm_create_free() local
366 lpm = rte_lpm_create("fr_test_once", SOCKET_ID_ANY, &config); in lpm_create_free()
367 if (lpm != NULL) in lpm_create_free()
374 lpm = rte_lpm_create(lpm_name, SOCKET_ID_ANY, &config); in lpm_create_free()
375 if (NULL == lpm) in lpm_create_free()
379 if (lpm != rte_lpm_find_existing(lpm_name)) in lpm_create_free()
382 rte_lpm_free(lpm); in lpm_create_free()
/f-stack/dpdk/lib/librte_table/
H A Drte_table_lpm_ipv6.c106 lpm->lpm = rte_lpm6_create(p->name, socket_id, &lpm6_config); in rte_table_lpm_ipv6_create()
107 if (lpm->lpm == NULL) { in rte_table_lpm_ipv6_create()
108 rte_free(lpm); in rte_table_lpm_ipv6_create()
120 return lpm; in rte_table_lpm_ipv6_create()
135 rte_lpm6_free(lpm->lpm); in rte_table_lpm_ipv6_free()
136 rte_free(lpm); in rte_table_lpm_ipv6_free()
162 uint8_t *nht_entry = &lpm->nht[i * lpm->entry_size]; in nht_find_existing()
210 status = rte_lpm6_is_rule_present(lpm->lpm, ip_prefix->ip, in rte_table_lpm_ipv6_entry_add()
223 nht_entry = &lpm->nht[nht_pos * lpm->entry_size]; in rte_table_lpm_ipv6_entry_add()
298 memcpy(entry, &lpm->nht[nht_pos * lpm->entry_size], in rte_table_lpm_ipv6_entry_delete()
[all …]
H A Drte_table_lpm.c108 lpm->lpm = rte_lpm_create(p->name, socket_id, &lpm_config); in rte_table_lpm_create()
110 if (lpm->lpm == NULL) { in rte_table_lpm_create()
122 return lpm; in rte_table_lpm_create()
137 rte_lpm_free(lpm->lpm); in rte_table_lpm_free()
138 rte_free(lpm); in rte_table_lpm_free()
164 uint8_t *nht_entry = &lpm->nht[i * lpm->entry_size]; in nht_find_existing()
212 status = rte_lpm_is_rule_present(lpm->lpm, ip_prefix->ip, in rte_table_lpm_entry_add()
225 nht_entry = &lpm->nht[nht_pos * lpm->entry_size]; in rte_table_lpm_entry_add()
273 status = rte_lpm_is_rule_present(lpm->lpm, ip_prefix->ip, in rte_table_lpm_entry_delete()
296 memcpy(entry, &lpm->nht[nht_pos * lpm->entry_size], in rte_table_lpm_entry_delete()
[all …]
/f-stack/dpdk/lib/librte_lpm/
H A Drte_lpm6.c184 if (lpm->tbl8_pool_pos == lpm->number_tbl8s) in tbl8_get()
189 *tbl8_ind = lpm->tbl8_pool[lpm->tbl8_pool_pos++]; in tbl8_get()
203 lpm->tbl8_pool[--lpm->tbl8_pool_pos] = tbl8_ind; in tbl8_put()
213 return lpm->number_tbl8s - lpm->tbl8_pool_pos; in tbl8_available()
317 mem_size = sizeof(*lpm) + (sizeof(lpm->tbl8[0]) * in rte_lpm6_create()
328 lpm = NULL; in rte_lpm6_create()
356 strlcpy(lpm->name, name, sizeof(lpm->name)); in rte_lpm6_create()
1093 memset(lpm->tbl24, 0, sizeof(lpm->tbl24)); in rte_lpm6_delete_bulk_func()
1094 memset(lpm->tbl8, 0, sizeof(lpm->tbl8[0]) in rte_lpm6_delete_bulk_func()
1117 memset(lpm->tbl24, 0, sizeof(lpm->tbl24)); in rte_lpm6_delete_all()
[all …]
H A Drte_lpm.c58 struct rte_lpm lpm; member
245 lpm = &i_lpm->lpm; in rte_lpm_create()
252 return lpm; in rte_lpm_create()
268 i_lpm = container_of(lpm, struct __rte_lpm, lpm); in rte_lpm_free()
319 i_lpm = container_of(lpm, struct __rte_lpm, lpm); in rte_lpm_rcu_qsbr_add()
817 i_lpm = container_of(lpm, struct __rte_lpm, lpm); in rte_lpm_add()
871 i_lpm = container_of(lpm, struct __rte_lpm, lpm); in rte_lpm_is_rule_present()
1164 i_lpm = container_of(lpm, struct __rte_lpm, lpm); in rte_lpm_delete()
1212 i_lpm = container_of(lpm, struct __rte_lpm, lpm); in rte_lpm_delete_all()
1217 memset(i_lpm->lpm.tbl24, 0, sizeof(i_lpm->lpm.tbl24)); in rte_lpm_delete_all()
[all …]
H A Drte_lpm.h190 rte_lpm_free(struct rte_lpm *lpm);
262 rte_lpm_delete(struct rte_lpm *lpm, uint32_t ip, uint8_t depth);
271 rte_lpm_delete_all(struct rte_lpm *lpm);
286 rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop) in rte_lpm_lookup() argument
296 ptbl = (const uint32_t *)(&lpm->tbl24[tbl24_index]); in rte_lpm_lookup()
311 ptbl = (const uint32_t *)&lpm->tbl8[tbl8_index]; in rte_lpm_lookup()
339 #define rte_lpm_lookup_bulk(lpm, ips, next_hops, n) \ argument
340 rte_lpm_lookup_bulk_func(lpm, ips, next_hops, n)
351 RTE_LPM_RETURN_IF_TRUE(((lpm == NULL) || (ips == NULL) || in rte_lpm_lookup_bulk_func()
360 ptbl = (const uint32_t *)&lpm->tbl24[tbl24_indexes[i]]; in rte_lpm_lookup_bulk_func()
[all …]
H A Drte_lpm6.h80 rte_lpm6_free(struct rte_lpm6 *lpm);
97 rte_lpm6_add(struct rte_lpm6 *lpm, const uint8_t *ip, uint8_t depth,
116 rte_lpm6_is_rule_present(struct rte_lpm6 *lpm, const uint8_t *ip, uint8_t depth,
132 rte_lpm6_delete(struct rte_lpm6 *lpm, const uint8_t *ip, uint8_t depth);
149 rte_lpm6_delete_bulk_func(struct rte_lpm6 *lpm,
159 rte_lpm6_delete_all(struct rte_lpm6 *lpm);
174 rte_lpm6_lookup(const struct rte_lpm6 *lpm, const uint8_t *ip, uint32_t *next_hop);
193 rte_lpm6_lookup_bulk_func(const struct rte_lpm6 *lpm,
H A Drte_lpm_sse.h18 rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4], in rte_lpm_lookupx4() argument
54 ptbl = (const uint32_t *)&lpm->tbl24[(uint32_t)idx]; in rte_lpm_lookupx4()
56 ptbl = (const uint32_t *)&lpm->tbl24[idx >> 32]; in rte_lpm_lookupx4()
61 ptbl = (const uint32_t *)&lpm->tbl24[(uint32_t)idx]; in rte_lpm_lookupx4()
63 ptbl = (const uint32_t *)&lpm->tbl24[idx >> 32]; in rte_lpm_lookupx4()
86 ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[0]]; in rte_lpm_lookupx4()
93 ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[1]]; in rte_lpm_lookupx4()
100 ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[2]]; in rte_lpm_lookupx4()
107 ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[3]]; in rte_lpm_lookupx4()
H A Drte_lpm_neon.h19 rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4], in rte_lpm_lookupx4() argument
53 ptbl = (const uint32_t *)&lpm->tbl24[(uint32_t)idx]; in rte_lpm_lookupx4()
55 ptbl = (const uint32_t *)&lpm->tbl24[idx >> 32]; in rte_lpm_lookupx4()
60 ptbl = (const uint32_t *)&lpm->tbl24[(uint32_t)idx]; in rte_lpm_lookupx4()
62 ptbl = (const uint32_t *)&lpm->tbl24[idx >> 32]; in rte_lpm_lookupx4()
85 ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[0]]; in rte_lpm_lookupx4()
92 ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[1]]; in rte_lpm_lookupx4()
99 ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[2]]; in rte_lpm_lookupx4()
106 ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[3]]; in rte_lpm_lookupx4()
H A Drte_lpm_altivec.h19 rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4], in rte_lpm_lookupx4() argument
54 ptbl = (const uint32_t *)&lpm->tbl24[idx]; in rte_lpm_lookupx4()
59 ptbl = (const uint32_t *)&lpm->tbl24[idx]; in rte_lpm_lookupx4()
64 ptbl = (const uint32_t *)&lpm->tbl24[idx]; in rte_lpm_lookupx4()
69 ptbl = (const uint32_t *)&lpm->tbl24[idx]; in rte_lpm_lookupx4()
92 ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[0]]; in rte_lpm_lookupx4()
99 ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[1]]; in rte_lpm_lookupx4()
106 ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[2]]; in rte_lpm_lookupx4()
113 ptbl = (const uint32_t *)&lpm->tbl8[i8.u32[3]]; in rte_lpm_lookupx4()
/f-stack/dpdk/examples/ip_pipeline/examples/
H A Droute.cli47 pipeline PIPELINE0 table match lpm ipv4 offset 286 size 4K action AP0
57 pipeline PIPELINE0 table 0 rule add match lpm ipv4 100.0.0.0 10 action fwd port 0 encap ether a0:a1…
58 pipeline PIPELINE0 table 0 rule add match lpm ipv4 100.64.0.0 10 action fwd port 1 encap ether b0:b…
59 pipeline PIPELINE0 table 0 rule add match lpm ipv4 100.128.0.0 10 action fwd port 2 encap ether c0:…
60 pipeline PIPELINE0 table 0 rule add match lpm ipv4 100.192.0.0 10 action fwd port 3 encap ether d0:…
H A Droute_ecmp.cli38 pipeline PIPELINE0 table match lpm ipv4 offset 286 size 4K action APRT
49 pipeline PIPELINE0 table 0 rule add match lpm ipv4 100.0.0.0 10 action fwd table 1 balance 0 0 0 0 …
50 pipeline PIPELINE0 table 0 rule add match lpm ipv4 100.64.0.0 10 action fwd table 1 balance 1 1 1 1…
51 pipeline PIPELINE0 table 0 rule add match lpm ipv4 100.128.0.0 10 action fwd table 1 balance 2 2 2 …
52 pipeline PIPELINE0 table 0 rule add match lpm ipv4 100.192.0.0 10 action fwd table 1 balance 3 3 3 …
/f-stack/dpdk/drivers/net/softnic/
H A Drte_eth_softnic_pipeline.c814 struct rte_table_lpm_params lpm; in softnic_pipeline_table_create() member
972 if (params->match.lpm.n_rules == 0) in softnic_pipeline_table_create()
975 switch (params->match.lpm.key_size) { in softnic_pipeline_table_create()
978 pp.lpm.name = name; in softnic_pipeline_table_create()
979 pp.lpm.n_rules = params->match.lpm.n_rules; in softnic_pipeline_table_create()
980 pp.lpm.number_tbl8s = TABLE_LPM_NUMBER_TBL8; in softnic_pipeline_table_create()
981 pp.lpm.flags = 0; in softnic_pipeline_table_create()
984 pp.lpm.offset = params->match.lpm.key_offset; in softnic_pipeline_table_create()
987 p.arg_create = &pp.lpm; in softnic_pipeline_table_create()
1047 if (params->match.lpm.key_size == 4) in softnic_pipeline_table_create()
[all …]
/f-stack/dpdk/examples/ip_pipeline/
H A Dpipeline.c789 struct rte_table_lpm_params lpm; in pipeline_table_create() member
946 if (params->match.lpm.n_rules == 0) in pipeline_table_create()
949 switch (params->match.lpm.key_size) { in pipeline_table_create()
952 pp.lpm.name = name; in pipeline_table_create()
953 pp.lpm.n_rules = params->match.lpm.n_rules; in pipeline_table_create()
954 pp.lpm.number_tbl8s = TABLE_LPM_NUMBER_TBL8; in pipeline_table_create()
955 pp.lpm.flags = 0; in pipeline_table_create()
958 pp.lpm.offset = params->match.lpm.key_offset; in pipeline_table_create()
961 p.arg_create = &pp.lpm; in pipeline_table_create()
1022 if (params->match.lpm.key_size == 4) in pipeline_table_create()
[all …]
/f-stack/dpdk/examples/ipsec-secgw/
H A Drt.c129 struct rte_lpm *lpm; in rt_init() local
156 lpm = rte_lpm_create(name, socket_id, &conf); in rt_init()
157 if (lpm == NULL) in rt_init()
163 ret = rte_lpm_add(lpm, rt_ip4[i].ip, rt_ip4[i].depth, in rt_init()
204 ctx->rt_ip4 = (struct rt_ctx *)lpm; in rt_init()

123