From: Fan Zhang <roy.fan.zhang@intel.com>
To: dev@dpdk.org
Cc: cristian.dumitrescu@intel.com
Subject: [dpdk-dev] [PATCH 3/5] net/softnic: add symmetric crypto action
Date: Wed, 24 Oct 2018 13:49:03 +0100 [thread overview]
Message-ID: <20181024124905.5379-4-roy.fan.zhang@intel.com> (raw)
In-Reply-To: <20181024124905.5379-1-roy.fan.zhang@intel.com>
This patch adds symmetric crypto action support to softnic.
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
drivers/net/softnic/rte_eth_softnic_action.c | 11 +++++++++++
drivers/net/softnic/rte_eth_softnic_internals.h | 2 ++
drivers/net/softnic/rte_eth_softnic_thread.c | 10 ++++++++++
3 files changed, 23 insertions(+)
diff --git a/drivers/net/softnic/rte_eth_softnic_action.c b/drivers/net/softnic/rte_eth_softnic_action.c
index 2b74848c3..92c744dc9 100644
--- a/drivers/net/softnic/rte_eth_softnic_action.c
+++ b/drivers/net/softnic/rte_eth_softnic_action.c
@@ -386,6 +386,17 @@ softnic_table_action_profile_create(struct pmd_internals *p,
}
}
+ if (params->action_mask & (1LLU << RTE_TABLE_ACTION_SYM_CRYPTO)) {
+ status = rte_table_action_profile_action_register(ap,
+ RTE_TABLE_ACTION_SYM_CRYPTO,
+ ¶ms->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/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h
index 6322b3206..e12b8ae4c 100644
--- a/drivers/net/softnic/rte_eth_softnic_internals.h
+++ b/drivers/net/softnic/rte_eth_softnic_internals.h
@@ -328,6 +328,7 @@ struct softnic_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 softnic_table_action_profile {
@@ -950,6 +951,7 @@ struct softnic_table_rule_action {
struct rte_table_action_time_params time;
struct rte_table_action_tag_params tag;
struct rte_table_action_decap_params decap;
+ struct rte_table_action_sym_crypto_params sym_crypto;
};
struct rte_flow {
diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c
index c8a8d230b..4572adfa6 100644
--- a/drivers/net/softnic/rte_eth_softnic_thread.c
+++ b/drivers/net/softnic/rte_eth_softnic_thread.c
@@ -2498,6 +2498,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
next prev parent reply other threads:[~2018-10-24 12:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-24 12:49 [dpdk-dev] [PATCH 0/5] net/softnic: add symmetric crypto support Fan Zhang
2018-10-24 12:49 ` [dpdk-dev] [PATCH 1/5] net/softnic: add cryptodev Fan Zhang
2018-10-24 12:49 ` [dpdk-dev] [PATCH 2/5] net/softnic: configure crypto port Fan Zhang
2018-10-24 12:49 ` Fan Zhang [this message]
2018-10-24 12:49 ` [dpdk-dev] [PATCH 4/5] net/softnic: update cli parsing Fan Zhang
2018-10-24 12:49 ` [dpdk-dev] [PATCH 5/5] doc: update release note Fan Zhang
2018-10-26 10:22 ` [dpdk-dev] [PATCH 0/5] net/softnic: add symmetric crypto support 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=20181024124905.5379-4-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).