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

Function table_rule_add

dpdk/examples/ip_pipeline/pipeline.c:1008–1022  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1006}
1007
1008void
1009table_rule_add(struct table *table,
1010 struct table_rule *new_rule)
1011{
1012 struct table_rule *existing_rule;
1013
1014 existing_rule = table_rule_find(table, &new_rule->match);
1015 if (existing_rule == NULL)
1016 TAILQ_INSERT_TAIL(&table->rules, new_rule, node);
1017 else {
1018 TAILQ_INSERT_AFTER(&table->rules, existing_rule, new_rule, node);
1019 TAILQ_REMOVE(&table->rules, existing_rule, node);
1020 free(existing_rule);
1021 }
1022}
1023
1024void
1025table_rule_add_bulk(struct table *table,

Callers 1

pipeline_table_rule_addFunction · 0.85

Calls 2

table_rule_findFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected