DPDK patches and discussions
 help / color / mirror / Atom feed
From: Fan Zhang <roy.fan.zhang@intel.com>
To: dev@dpdk.org
Cc: cristian.dumitrescu@intel.com, "Zhang,
	Roy Fan" <roy.fan.zhang@intel.com>,
	Zhang
Subject: [dpdk-dev] [PATCH v2 4/7] examples/ip_pipeline: add symmetric crypto action
Date: Fri, 28 Sep 2018 13:26:12 +0100	[thread overview]
Message-ID: <20180928122615.48390-5-roy.fan.zhang@intel.com> (raw)
In-Reply-To: <20180928122615.48390-1-roy.fan.zhang@intel.com>

From: "Zhang, Roy Fan" <roy.fan.zhang@intel.com>

This patch adds symmetric crypto action support to ip_pipeline
application.

Signed-off-by: Zhang, Roy Fan <roy.fan.zhang@intel.com>
Acked-by: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
---
 examples/ip_pipeline/action.c   | 11 +++++++++++
 examples/ip_pipeline/action.h   |  1 +
 examples/ip_pipeline/pipeline.h |  1 +
 examples/ip_pipeline/thread.c   | 10 ++++++++++
 4 files changed, 23 insertions(+)

diff --git a/examples/ip_pipeline/action.c b/examples/ip_pipeline/action.c
index 20497c3c7..a0f97bee7 100644
--- a/examples/ip_pipeline/action.c
+++ b/examples/ip_pipeline/action.c
@@ -333,6 +333,17 @@ table_action_profile_create(const char *name,
 		}
 	}
 
+	if (params->action_mask & (1LLU << RTE_TABLE_ACTION_SYM_CRYPTO)) {
+		status = rte_table_action_profile_action_register(ap,
+			RTE_TABLE_ACTION_SYM_CRYPTO,
+			&params->sym_crypto);
+
+		if (status) {
+			rte_table_action_profile_free(ap);
+			return NULL;
+		}
+	}
+
 	status = rte_table_action_profile_freeze(ap);
 	if (status) {
 		rte_table_action_profile_free(ap);
diff --git a/examples/ip_pipeline/action.h b/examples/ip_pipeline/action.h
index 417200e86..cde17e69a 100644
--- a/examples/ip_pipeline/action.h
+++ b/examples/ip_pipeline/action.h
@@ -53,6 +53,7 @@ struct table_action_profile_params {
 	struct rte_table_action_nat_config nat;
 	struct rte_table_action_ttl_config ttl;
 	struct rte_table_action_stats_config stats;
+	struct rte_table_action_sym_crypto_config sym_crypto;
 };
 
 struct table_action_profile {
diff --git a/examples/ip_pipeline/pipeline.h b/examples/ip_pipeline/pipeline.h
index fb283e558..b6b9dc06f 100644
--- a/examples/ip_pipeline/pipeline.h
+++ b/examples/ip_pipeline/pipeline.h
@@ -281,6 +281,7 @@ struct table_rule_action {
 	struct rte_table_action_ttl_params ttl;
 	struct rte_table_action_stats_params stats;
 	struct rte_table_action_time_params time;
+	struct rte_table_action_sym_crypto_params sym_crypto;
 };
 
 int
diff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c
index 7fc03332e..ca741952a 100644
--- a/examples/ip_pipeline/thread.c
+++ b/examples/ip_pipeline/thread.c
@@ -2476,6 +2476,16 @@ action_convert(struct rte_table_action *a,
 			return status;
 	}
 
+	if (action->action_mask & (1LLU << RTE_TABLE_ACTION_SYM_CRYPTO)) {
+		status = rte_table_action_apply(a,
+			data,
+			RTE_TABLE_ACTION_SYM_CRYPTO,
+			&action->sym_crypto);
+
+		if (status)
+			return status;
+	}
+
 	return 0;
 }
 
-- 
2.13.6

  parent reply	other threads:[~2018-09-28 12:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28  8:19 [dpdk-dev] [PATCH] pipeline: add symmetric crypto to table action Zhang, Roy Fan
2018-09-28 12:26 ` [dpdk-dev] [PATCH v2 0/7] pipeline: add symmetric crypto to action Fan Zhang
2018-09-28 12:26   ` [dpdk-dev] [PATCH v2 1/7] " Fan Zhang
2018-09-28 12:26   ` [dpdk-dev] [PATCH v2 2/7] examples/ip_pipeline: add cryptodev Fan Zhang
2018-09-28 12:26   ` [dpdk-dev] [PATCH v2 3/7] examples/ip_pipeline: configure crypto port Fan Zhang
2018-09-28 12:26   ` Fan Zhang [this message]
2018-09-28 12:26   ` [dpdk-dev] [PATCH v2 5/7] examples/ip_pipeline: update cli parsing Fan Zhang
2018-09-28 12:26   ` [dpdk-dev] [PATCH v2 6/7] examples/ip_pipeline: add script Fan Zhang
2018-09-28 12:26   ` [dpdk-dev] [PATCH v2 7/7] doc: update action documentation Fan Zhang
2018-10-01 17:26   ` [dpdk-dev] [PATCH v2 0/7] pipeline: add symmetric crypto to action 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=20180928122615.48390-5-roy.fan.zhang@intel.com \
    --to=roy.fan.zhang@intel.com \
    --cc=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    /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).