summaryrefslogtreecommitdiff
path: root/drivers/net/softnic
diff options
context:
space:
mode:
authorFan Zhang <roy.fan.zhang@intel.com>2018-10-24 13:49:03 +0100
committerThomas Monjalon <thomas@monjalon.net>2018-10-26 14:13:45 +0200
commit3b7f2b9e17d8e2c02935eea16f306384bdf1641a (patch)
treec23483efe0cc2e3a1d172834e9bd015c74a782e7 /drivers/net/softnic
parente0e52c7c2975f3815c248b3d3a91b466b382a804 (diff)
downloaddpdk-3b7f2b9e17d8e2c02935eea16f306384bdf1641a.zip
dpdk-3b7f2b9e17d8e2c02935eea16f306384bdf1641a.tar.gz
dpdk-3b7f2b9e17d8e2c02935eea16f306384bdf1641a.tar.xz
net/softnic: add symmetric crypto action
This patch adds symmetric crypto action support to softnic. Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Diffstat (limited to 'drivers/net/softnic')
-rw-r--r--drivers/net/softnic/rte_eth_softnic_action.c11
-rw-r--r--drivers/net/softnic/rte_eth_softnic_internals.h2
-rw-r--r--drivers/net/softnic/rte_eth_softnic_thread.c10
3 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/softnic/rte_eth_softnic_action.c b/drivers/net/softnic/rte_eth_softnic_action.c
index 2b74848..92c744d 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,
+ &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/drivers/net/softnic/rte_eth_softnic_internals.h b/drivers/net/softnic/rte_eth_softnic_internals.h
index 6322b32..e12b8ae 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 c8a8d23..4572adf 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;
}