MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_lpm_delete_all

Function rte_lpm_delete_all

dpdk/lib/lpm/rte_lpm.c:1200–1218  ·  view source on GitHub ↗

* Delete all rules from the LPM table. */

Source from the content-addressed store, hash-verified

1198 * Delete all rules from the LPM table.
1199 */
1200void
1201rte_lpm_delete_all(struct rte_lpm *lpm)
1202{
1203 struct __rte_lpm *i_lpm;
1204
1205 i_lpm = container_of(lpm, struct __rte_lpm, lpm);
1206 /* Zero rule information. */
1207 memset(i_lpm->rule_info, 0, sizeof(i_lpm->rule_info));
1208
1209 /* Zero tbl24. */
1210 memset(i_lpm->lpm.tbl24, 0, sizeof(i_lpm->lpm.tbl24));
1211
1212 /* Zero tbl8. */
1213 memset(i_lpm->lpm.tbl8, 0, sizeof(i_lpm->lpm.tbl8[0])
1214 * RTE_LPM_TBL8_GROUP_NUM_ENTRIES * i_lpm->number_tbl8s);
1215
1216 /* Delete all rules form the rules table. */
1217 memset(i_lpm->rules_tbl, 0, sizeof(i_lpm->rules_tbl[0]) * i_lpm->max_rules);
1218}

Callers 4

test9Function · 0.50
test10Function · 0.50
test15Function · 0.50
test_lpm_perfFunction · 0.50

Calls 1

memsetFunction · 0.85

Tested by 4

test9Function · 0.40
test10Function · 0.40
test15Function · 0.40
test_lpm_perfFunction · 0.40