summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-10-30 18:14:46 +0000
committerCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-11-02 12:29:51 +0100
commitf6df5f539918ae7cc1154f3eb6117fba1d5b7b16 (patch)
tree5370302dcdb74694d6b427af4bed8ebf63f4dfec /examples
parentd2cb41c2bfd0e365bca34f5553d68f8b3cc00f1a (diff)
downloaddpdk-f6df5f539918ae7cc1154f3eb6117fba1d5b7b16.zip
dpdk-f6df5f539918ae7cc1154f3eb6117fba1d5b7b16.tar.gz
dpdk-f6df5f539918ae7cc1154f3eb6117fba1d5b7b16.tar.xz
examples/ip_pipeline: track rules on delete default
Support table rule tracking on table rule delete default operation. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/ip_pipeline/thread.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c
index a3cd3c0..1baad67 100644
--- a/examples/ip_pipeline/thread.c
+++ b/examples/ip_pipeline/thread.c
@@ -1741,6 +1741,7 @@ pipeline_table_rule_delete_default(const char *pipeline_name,
uint32_t table_id)
{
struct pipeline *p;
+ struct table *table;
struct pipeline_msg_req *req;
struct pipeline_msg_rsp *rsp;
int status;
@@ -1754,11 +1755,16 @@ pipeline_table_rule_delete_default(const char *pipeline_name,
(table_id >= p->n_tables))
return -1;
+ table = &p->table[table_id];
+
if (!pipeline_is_running(p)) {
status = rte_pipeline_table_default_entry_delete(p->p,
table_id,
NULL);
+ if (status == 0)
+ table_rule_default_delete(table);
+
return status;
}
@@ -1778,6 +1784,8 @@ pipeline_table_rule_delete_default(const char *pipeline_name,
/* Read response */
status = rsp->status;
+ if (status == 0)
+ table_rule_default_delete(table);
/* Free response */
pipeline_msg_free(rsp);