DPDK patches and discussions
 help / color / mirror / Atom feed
From: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
To: dev@dpdk.org
Cc: Jasvinder Singh <jasvinder.singh@intel.com>,
	Hongjun Ni <hongjun.ni@intel.com>
Subject: [dpdk-dev] [PATCH 05/12] examples/ip_pipeline: track table rules on delete
Date: Fri,  2 Nov 2018 11:36:56 +0000	[thread overview]
Message-ID: <1541158623-29742-5-git-send-email-cristian.dumitrescu@intel.com> (raw)
In-Reply-To: <1541158623-29742-1-git-send-email-cristian.dumitrescu@intel.com>

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>
---
 examples/ip_pipeline/thread.c | 8 ++++++++
 1 file changed, 8 insertions(+)

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);
-- 
2.7.4

  parent reply	other threads:[~2018-11-02 11:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-02 11:36 [dpdk-dev] [PATCH 01/12] examples/ip_pipeline: add rule list per table Cristian Dumitrescu
2018-11-02 11:36 ` [dpdk-dev] [PATCH 02/12] examples/ip_pipeline: track table rules on add Cristian Dumitrescu
2018-11-02 11:36 ` [dpdk-dev] [PATCH 03/12] examples/ip_pipeline: track table rules on add bulk Cristian Dumitrescu
2018-11-02 11:36 ` [dpdk-dev] [PATCH 04/12] examples/ip_pipeline: track rules on add default Cristian Dumitrescu
2018-11-02 11:36 ` Cristian Dumitrescu [this message]
2018-11-02 11:36 ` [dpdk-dev] [PATCH 06/12] examples/ip_pipeline: track rules on delete default Cristian Dumitrescu
2018-11-02 11:36 ` [dpdk-dev] [PATCH 07/12] examples/ip_pipeline: support rule stats read Cristian Dumitrescu
2018-11-02 11:36 ` [dpdk-dev] [PATCH 08/12] examples/ip_pipeline: support meter " Cristian Dumitrescu
2018-11-02 11:37 ` [dpdk-dev] [PATCH 09/12] examples/ip_pipeline: support rule TTL " Cristian Dumitrescu
2018-11-02 11:37 ` [dpdk-dev] [PATCH 10/12] examples/ip_pipeline: support rule time read Cristian Dumitrescu
2018-11-02 11:37 ` [dpdk-dev] [PATCH 11/12] examples/ip_pipeline: support table rule show Cristian Dumitrescu
2018-11-02 11:37 ` [dpdk-dev] [PATCH 12/12] examples/ip_pipeline: fix port and table stats read Cristian Dumitrescu
2018-11-02 12:39 ` [dpdk-dev] [PATCH 01/12] examples/ip_pipeline: add rule list per table Dumitrescu, Cristian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1541158623-29742-5-git-send-email-cristian.dumitrescu@intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=hongjun.ni@intel.com \
    --cc=jasvinder.singh@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).