summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/dpdk/device/dpdk.h1
-rwxr-xr-xsrc/plugins/dpdk/device/init.c3
-rw-r--r--src/plugins/dpdk/ipsec/cli.c3
-rw-r--r--src/plugins/dpdk/ipsec/dpdk_crypto_ipsec_doc.md18
-rw-r--r--src/plugins/dpdk/ipsec/ipsec.c10
-rw-r--r--src/plugins/dpdk/ipsec/ipsec.h1
6 files changed, 8 insertions, 28 deletions
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index 90e93e75483..82e5938ace2 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -323,7 +323,6 @@ typedef struct
u8 *uio_driver_name;
u8 no_multi_seg;
u8 enable_tcp_udp_checksum;
- u8 cryptodev;
/* Required config parameters */
u8 coremask_set_manually;
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 33ecde4461d..e20b25852cd 100755
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -995,9 +995,6 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
else if (unformat (input, "no-multi-seg"))
conf->no_multi_seg = 1;
- else if (unformat (input, "enable-cryptodev"))
- conf->cryptodev = 1;
-
else if (unformat (input, "dev default %U", unformat_vlib_cli_sub_input,
&sub_input))
{
diff --git a/src/plugins/dpdk/ipsec/cli.c b/src/plugins/dpdk/ipsec/cli.c
index 3ae8c9b886d..a9314065003 100644
--- a/src/plugins/dpdk/ipsec/cli.c
+++ b/src/plugins/dpdk/ipsec/cli.c
@@ -20,12 +20,11 @@
static void
dpdk_ipsec_show_mapping (vlib_main_t * vm, u16 detail_display)
{
- dpdk_config_main_t *conf = &dpdk_config_main;
dpdk_crypto_main_t *dcm = &dpdk_crypto_main;
vlib_thread_main_t *tm = vlib_get_thread_main ();
u32 i, skip_master;
- if (!conf->cryptodev)
+ if (!dcm->enabled)
{
vlib_cli_output (vm, "DPDK Cryptodev support is disabled\n");
return;
diff --git a/src/plugins/dpdk/ipsec/dpdk_crypto_ipsec_doc.md b/src/plugins/dpdk/ipsec/dpdk_crypto_ipsec_doc.md
index b3d3cc4853a..5a9f9c6e6e2 100644
--- a/src/plugins/dpdk/ipsec/dpdk_crypto_ipsec_doc.md
+++ b/src/plugins/dpdk/ipsec/dpdk_crypto_ipsec_doc.md
@@ -23,15 +23,7 @@ Set new default next nodes:
### How to enable VPP IPSec with DPDK Cryptodev support
-DPDK Cryptodev is supported in DPDK enabled VPP.
-By default, only HW Cryptodev is supported but needs to be explicetly enabled with the following config option:
-
-```
-dpdk {
- enable-cryptodev
-}
-```
-
+DPDK Cryptodev is supported in DPDK enabled VPP and by default only HW Cryptodev is supported.
To enable SW Cryptodev support (AESNI-MB-PMD and GCM-PMD), we need the following env option:
vpp_uses_dpdk_cryptodev_sw=yes
@@ -47,15 +39,15 @@ When enabling SW Cryptodev support, it means that you need to pre-build the requ
VPP allocates crypto resources based on a best effort approach:
* first allocate Hardware crypto resources, then Software.
-* if there are not enough crypto resources for all workers, the graph node is not modifed, therefore the default VPP IPsec implementation based in OpenSSL is used. The following message is displayed:
+* if there are not enough crypto resources for all workers, the graph node is not modifed and the default VPP IPsec implementation based in OpenSSL is used. The following message is displayed:
- 0: dpdk_ipsec_init: not enough cryptodevs for ipsec
+ 0: dpdk_ipsec_init: not enough Cryptodevs, default to OpenSSL IPsec
### Configuration example
-To enable DPDK Cryptodev the user just need to provide the startup.conf option
-as mentioned previously.
+To enable DPDK Cryptodev the user just need to provide cryptodevs int the
+startup.conf.
Example startup.conf:
diff --git a/src/plugins/dpdk/ipsec/ipsec.c b/src/plugins/dpdk/ipsec/ipsec.c
index 5d8f4fba7f3..7066564d41b 100644
--- a/src/plugins/dpdk/ipsec/ipsec.c
+++ b/src/plugins/dpdk/ipsec/ipsec.c
@@ -224,7 +224,6 @@ static uword
dpdk_ipsec_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
vlib_frame_t * f)
{
- dpdk_config_main_t *conf = &dpdk_config_main;
ipsec_main_t *im = &ipsec_main;
dpdk_crypto_main_t *dcm = &dpdk_crypto_main;
vlib_thread_main_t *tm = vlib_get_thread_main ();
@@ -235,19 +234,12 @@ dpdk_ipsec_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
i32 dev_id, ret;
u32 i, skip_master;
- if (!conf->cryptodev)
- {
- clib_warning ("DPDK Cryptodev support is disabled, "
- "default to OpenSSL IPsec");
- return 0;
- }
-
if (check_cryptodev_queues () < 0)
{
- conf->cryptodev = 0;
clib_warning ("not enough Cryptodevs, default to OpenSSL IPsec");
return 0;
}
+ dcm->enabled = 1;
vec_alloc (dcm->workers_main, tm->n_vlib_mains);
_vec_len (dcm->workers_main) = tm->n_vlib_mains;
diff --git a/src/plugins/dpdk/ipsec/ipsec.h b/src/plugins/dpdk/ipsec/ipsec.h
index f0f793c022b..d7940345bfc 100644
--- a/src/plugins/dpdk/ipsec/ipsec.h
+++ b/src/plugins/dpdk/ipsec/ipsec.h
@@ -83,6 +83,7 @@ typedef struct
{
struct rte_mempool **cop_pools;
crypto_worker_main_t *workers_main;
+ u8 enabled;
} dpdk_crypto_main_t;
dpdk_crypto_main_t dpdk_crypto_main;