| /dpdk/app/test/ |
| H A D | test_lpm6.c | 223 rte_lpm6_free(lpm); in test2() 249 rte_lpm6_free(lpm); in test3() 287 rte_lpm6_free(lpm); in test4() 325 rte_lpm6_free(lpm); in test5() 363 rte_lpm6_free(lpm); in test6() 401 rte_lpm6_free(lpm); in test7() 439 rte_lpm6_free(lpm); in test8() 485 rte_lpm6_free(lpm); in test9() 530 rte_lpm6_free(lpm); in test10() 590 rte_lpm6_free(lpm); in test11() [all …]
|
| H A D | test_lpm.c | 142 rte_lpm_free(lpm); in test1() 168 rte_lpm_free(lpm); in test2() 205 rte_lpm_free(lpm); in test3() 243 rte_lpm_free(lpm); in test4() 277 rte_lpm_free(lpm); in test5() 315 rte_lpm_free(lpm); in test6() 361 rte_lpm_free(lpm); in test7() 450 rte_lpm_free(lpm); in test8() 612 rte_lpm_free(lpm); in test9() 810 rte_lpm_free(lpm); in test10() [all …]
|
| H A D | test_lpm6_perf.c | 67 struct rte_lpm6 *lpm = NULL; in test_lpm6_perf() local 90 lpm = rte_lpm6_create(__func__, SOCKET_ID_ANY, &config); in test_lpm6_perf() 91 TEST_LPM_ASSERT(lpm != NULL); in test_lpm6_perf() 97 if (rte_lpm6_add(lpm, large_route_table[i].ip, in test_lpm6_perf() 116 if (rte_lpm6_lookup(lpm, large_ips_table[j].ip, in test_lpm6_perf() 142 rte_lpm6_lookup_bulk_func(lpm, ip_batch, next_hops, NUM_IPS_ENTRIES); in test_lpm6_perf() 159 status += rte_lpm6_delete(lpm, large_route_table[i].ip, in test_lpm6_perf() 168 rte_lpm6_delete_all(lpm); in test_lpm6_perf() 169 rte_lpm6_free(lpm); in test_lpm6_perf()
|
| H A D | test_lpm_perf.c | 31 struct rte_lpm *lpm; variable 535 TEST_LPM_ASSERT(lpm != NULL); in test_lpm_rcu_perf_multi_writer() 546 if (rte_lpm_rcu_qsbr_add(lpm, &rcu_cfg) != 0) { in test_lpm_rcu_perf_multi_writer() 587 rte_lpm_free(lpm); in test_lpm_rcu_perf_multi_writer() 589 lpm = NULL; in test_lpm_rcu_perf_multi_writer() 600 rte_lpm_free(lpm); in test_lpm_rcu_perf_multi_writer() 630 TEST_LPM_ASSERT(lpm != NULL); in test_lpm_perf() 636 if (rte_lpm_add(lpm, large_route_table[i].ip, in test_lpm_perf() 646 if (lpm->tbl24[i].valid) in test_lpm_perf() 764 rte_lpm_delete_all(lpm); in test_lpm_perf() [all …]
|
| H A D | test_func_reentrancy.c | 347 struct rte_lpm *lpm; in lpm_clean() local 350 lpm = rte_lpm_find_existing("fr_test_once"); in lpm_clean() 351 if (lpm != NULL) in lpm_clean() 352 rte_lpm_free(lpm); in lpm_clean() 357 if ((lpm = rte_lpm_find_existing(lpm_name)) != NULL) in lpm_clean() 358 rte_lpm_free(lpm); in lpm_clean() 366 struct rte_lpm *lpm; in lpm_create_free() local 380 if (lpm != NULL) in lpm_create_free() 388 if (NULL == lpm) in lpm_create_free() 392 if (lpm != rte_lpm_find_existing(lpm_name)) in lpm_create_free() [all …]
|
| /dpdk/lib/table/ |
| H A D | rte_table_lpm_ipv6.c | 103 lpm->lpm = rte_lpm6_create(p->name, socket_id, &lpm6_config); in rte_table_lpm_ipv6_create() 104 if (lpm->lpm == NULL) { in rte_table_lpm_ipv6_create() 105 rte_free(lpm); in rte_table_lpm_ipv6_create() 117 return lpm; in rte_table_lpm_ipv6_create() 132 rte_lpm6_free(lpm->lpm); in rte_table_lpm_ipv6_free() 133 rte_free(lpm); in rte_table_lpm_ipv6_free() 159 uint8_t *nht_entry = &lpm->nht[i * lpm->entry_size]; in nht_find_existing() 207 status = rte_lpm6_is_rule_present(lpm->lpm, ip_prefix->ip, in rte_table_lpm_ipv6_entry_add() 220 nht_entry = &lpm->nht[nht_pos * lpm->entry_size]; in rte_table_lpm_ipv6_entry_add() 295 memcpy(entry, &lpm->nht[nht_pos * lpm->entry_size], in rte_table_lpm_ipv6_entry_delete() [all …]
|
| H A D | rte_table_lpm.c | 106 lpm->lpm = rte_lpm_create(p->name, socket_id, &lpm_config); in rte_table_lpm_create() 108 if (lpm->lpm == NULL) { in rte_table_lpm_create() 120 return lpm; in rte_table_lpm_create() 135 rte_lpm_free(lpm->lpm); in rte_table_lpm_free() 136 rte_free(lpm); in rte_table_lpm_free() 162 uint8_t *nht_entry = &lpm->nht[i * lpm->entry_size]; in nht_find_existing() 210 status = rte_lpm_is_rule_present(lpm->lpm, ip_prefix->ip, in rte_table_lpm_entry_add() 223 nht_entry = &lpm->nht[nht_pos * lpm->entry_size]; in rte_table_lpm_entry_add() 271 status = rte_lpm_is_rule_present(lpm->lpm, ip_prefix->ip, in rte_table_lpm_entry_delete() 294 memcpy(entry, &lpm->nht[nht_pos * lpm->entry_size], in rte_table_lpm_entry_delete() [all …]
|
| /dpdk/lib/lpm/ |
| H A D | rte_lpm6.c | 177 if (lpm->tbl8_pool_pos == lpm->number_tbl8s) in tbl8_get() 182 *tbl8_ind = lpm->tbl8_pool[lpm->tbl8_pool_pos++]; in tbl8_get() 196 lpm->tbl8_pool[--lpm->tbl8_pool_pos] = tbl8_ind; in tbl8_put() 206 return lpm->number_tbl8s - lpm->tbl8_pool_pos; in tbl8_available() 312 mem_size = sizeof(*lpm) + (sizeof(lpm->tbl8[0]) * in rte_lpm6_create() 323 lpm = NULL; in rte_lpm6_create() 351 strlcpy(lpm->name, name, sizeof(lpm->name)); in rte_lpm6_create() 1088 memset(lpm->tbl24, 0, sizeof(lpm->tbl24)); in rte_lpm6_delete_bulk_func() 1089 memset(lpm->tbl8, 0, sizeof(lpm->tbl8[0]) in rte_lpm6_delete_bulk_func() 1112 memset(lpm->tbl24, 0, sizeof(lpm->tbl24)); in rte_lpm6_delete_all() [all …]
|
| H A D | rte_lpm.c | 51 struct rte_lpm lpm; member 238 lpm = &i_lpm->lpm; in rte_lpm_create() 245 return lpm; in rte_lpm_create() 261 i_lpm = container_of(lpm, struct __rte_lpm, lpm); in rte_lpm_free() 312 i_lpm = container_of(lpm, struct __rte_lpm, lpm); in rte_lpm_rcu_qsbr_add() 810 i_lpm = container_of(lpm, struct __rte_lpm, lpm); in rte_lpm_add() 864 i_lpm = container_of(lpm, struct __rte_lpm, lpm); in rte_lpm_is_rule_present() 1157 i_lpm = container_of(lpm, struct __rte_lpm, lpm); in rte_lpm_delete() 1205 i_lpm = container_of(lpm, struct __rte_lpm, lpm); in rte_lpm_delete_all() 1210 memset(i_lpm->lpm.tbl24, 0, sizeof(i_lpm->lpm.tbl24)); in rte_lpm_delete_all() [all …]
|
| H A D | rte_lpm.h | 186 rte_lpm_free(struct rte_lpm *lpm); 258 rte_lpm_delete(struct rte_lpm *lpm, uint32_t ip, uint8_t depth); 267 rte_lpm_delete_all(struct rte_lpm *lpm); 282 rte_lpm_lookup(struct rte_lpm *lpm, uint32_t ip, uint32_t *next_hop) in rte_lpm_lookup() argument 292 ptbl = (const uint32_t *)(&lpm->tbl24[tbl24_index]); in rte_lpm_lookup() 307 ptbl = (const uint32_t *)&lpm->tbl8[tbl8_index]; in rte_lpm_lookup() 335 #define rte_lpm_lookup_bulk(lpm, ips, next_hops, n) \ argument 336 rte_lpm_lookup_bulk_func(lpm, ips, next_hops, n) 347 RTE_LPM_RETURN_IF_TRUE(((lpm == NULL) || (ips == NULL) || in rte_lpm_lookup_bulk_func() 356 ptbl = (const uint32_t *)&lpm->tbl24[tbl24_indexes[i]]; in rte_lpm_lookup_bulk_func() [all …]
|
| H A D | rte_lpm6.h | 79 rte_lpm6_free(struct rte_lpm6 *lpm); 96 rte_lpm6_add(struct rte_lpm6 *lpm, const uint8_t *ip, uint8_t depth, 115 rte_lpm6_is_rule_present(struct rte_lpm6 *lpm, const uint8_t *ip, uint8_t depth, 131 rte_lpm6_delete(struct rte_lpm6 *lpm, const uint8_t *ip, uint8_t depth); 148 rte_lpm6_delete_bulk_func(struct rte_lpm6 *lpm, 158 rte_lpm6_delete_all(struct rte_lpm6 *lpm); 173 rte_lpm6_lookup(const struct rte_lpm6 *lpm, const uint8_t *ip, uint32_t *next_hop); 192 rte_lpm6_lookup_bulk_func(const struct rte_lpm6 *lpm,
|
| H A D | rte_lpm_sse.h | 18 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 D | rte_lpm_neon.h | 19 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 D | rte_lpm_altivec.h | 19 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()
|
| H A D | rte_lpm_sve.h | 16 __rte_lpm_lookup_vec(const struct rte_lpm *lpm, const uint32_t *ips, in __rte_lpm_lookup_vec() argument 30 v_tbl24 = svld1_gather_index(pg, (const uint32_t *)lpm->tbl24, in __rte_lpm_lookup_vec() 53 v_tbl8 = svld1_gather_index(pv, (const uint32_t *)lpm->tbl8, in __rte_lpm_lookup_vec() 67 rte_lpm_lookupx4(const struct rte_lpm *lpm, xmm_t ip, uint32_t hop[4], in rte_lpm_lookupx4() argument 76 __rte_lpm_lookup_vec(lpm, ips, hop, 4); in rte_lpm_lookupx4()
|
| /dpdk/examples/ip_pipeline/examples/ |
| H A D | route.cli | 47 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 D | route_ecmp.cli | 38 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 …
|
| /dpdk/drivers/net/softnic/ |
| H A D | rte_eth_softnic_pipeline.c | 814 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 …]
|
| /dpdk/examples/ip_pipeline/ |
| H A D | pipeline.c | 789 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 …]
|
| /dpdk/examples/ipsec-secgw/ |
| H A D | rt.c | 129 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()
|
| /dpdk/lib/node/ |
| H A D | ip4_lookup.c | 29 struct rte_lpm *lpm; member 39 (((struct ip4_lookup_node_ctx *)ctx)->lpm) 54 struct rte_lpm *lpm = IP4_LOOKUP_NODE_LPM(node->ctx); in ip4_lookup_node_process_scalar() local 86 rc = rte_lpm_lookup(lpm, rte_be_to_cpu_32(ipv4_hdr->dst_addr), in ip4_lookup_node_process_scalar()
|
| H A D | ip4_lookup_neon.h | 14 struct rte_lpm *lpm = IP4_LOOKUP_NODE_LPM(node->ctx); in ip4_lookup_node_process_vec() local 114 rte_lpm_lookupx4(lpm, dip, result.u32, drop_nh); in ip4_lookup_node_process_vec() 201 rc = rte_lpm_lookup(lpm, rte_be_to_cpu_32(ipv4_hdr->dst_addr), in ip4_lookup_node_process_vec()
|
| /dpdk/examples/ip_fragmentation/ |
| H A D | main.c | 131 struct rte_lpm *lpm; member 278 if (rte_lpm_lookup(rxq->lpm, ip_dst, &next_hop) == 0 && in l3fwd_simple_forward() 720 struct rte_lpm *lpm; in init_routing_table() local 727 lpm = socket_lpm[socket]; in init_routing_table() 730 ret = rte_lpm_add(lpm, in init_routing_table() 782 struct rte_lpm *lpm; in init_mem() local 836 lpm = rte_lpm_create(buf, socket, &lpm_config); in init_mem() 837 if (lpm == NULL) { in init_mem() 841 socket_lpm[socket] = lpm; in init_mem() 943 rxq->lpm = socket_lpm[socket]; in main()
|
| /dpdk/examples/ip_reassembly/ |
| H A D | main.c | 135 struct rte_lpm *lpm; member 366 if (rte_lpm_lookup(rxq->lpm, ip_dst, &next_hop) == 0 && in reassemble() 766 struct rte_lpm *lpm; in init_routing_table() local 773 lpm = socket_lpm[socket]; in init_routing_table() 776 ret = rte_lpm_add(lpm, in init_routing_table() 907 struct rte_lpm *lpm; in init_mem() local 933 lpm = rte_lpm_create(buf, socket, &lpm_config); in init_mem() 934 if (lpm == NULL) { in init_mem() 938 socket_lpm[socket] = lpm; in init_mem() 1077 rxq->lpm = socket_lpm[socket]; in main()
|
| /dpdk/app/test-fib/ |
| H A D | main.c | 843 struct rte_lpm *lpm = NULL; in run_v4() local 919 lpm = rte_lpm_create("test_lpm", -1, &lpm_conf); in run_v4() 920 if (lpm == NULL) { in run_v4() 927 ret = rte_lpm_add(lpm, rt[i + j].addr, in run_v4() 1000 rte_lpm_delete(lpm, rt[i + j].addr, in run_v4() 1043 struct rte_lpm6 *lpm = NULL; in run_v6() local 1115 if (lpm == NULL) { in run_v6() 1122 ret = rte_lpm6_add(lpm, rt[i + j].addr, in run_v6() 1155 ret = rte_lpm6_lookup_bulk_func(lpm, in run_v6() 1170 rte_lpm6_lookup_bulk_func(lpm, in run_v6() [all …]
|