summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-10-30 18:12:41 +0000
committerCristian Dumitrescu <cristian.dumitrescu@intel.com>2018-11-02 12:29:30 +0100
commitd2cb41c2bfd0e365bca34f5553d68f8b3cc00f1a (patch)
tree2b9ed2a1d41614ed0f43a6e68b95b6db3df44a30 /examples
parentc348ec0594765c5407e28d1a40e09ad624705cfd (diff)
downloaddpdk-d2cb41c2bfd0e365bca34f5553d68f8b3cc00f1a.zip
dpdk-d2cb41c2bfd0e365bca34f5553d68f8b3cc00f1a.tar.gz
dpdk-d2cb41c2bfd0e365bca34f5553d68f8b3cc00f1a.tar.xz
examples/ip_pipeline: track table rules on delete
Support table rule tracking on table rule delete operation. Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com> Signed-off-by: Hongjun Ni <hongjun.ni@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 d2daacc..a3cd3c0 100644
--- a/examples/ip_pipeline/thread.c
+++ b/examples/ip_pipeline/thread.c
@@ -1672,6 +1672,7 @@ pipeline_table_rule_delete(const char *pipeline_name,
struct table_rule_match *match)
{
struct pipeline *p;
+ struct table *table;
struct pipeline_msg_req *req;
struct pipeline_msg_rsp *rsp;
int status;
@@ -1687,6 +1688,8 @@ pipeline_table_rule_delete(const char *pipeline_name,
match_check(match, p, table_id))
return -1;
+ table = &p->table[table_id];
+
if (!pipeline_is_running(p)) {
union table_rule_match_low_level match_ll;
int key_found;
@@ -1701,6 +1704,9 @@ pipeline_table_rule_delete(const char *pipeline_name,
&key_found,
NULL);
+ if (status == 0)
+ table_rule_delete(table, match);
+
return status;
}
@@ -1721,6 +1727,8 @@ pipeline_table_rule_delete(const char *pipeline_name,
/* Read response */
status = rsp->status;
+ if (status == 0)
+ table_rule_delete(table, match);
/* Free response */
pipeline_msg_free(rsp);