+ vlib_cli_output (vm, "%U\n", format_crypto_worker, i, verbose);
+ }
+ /* *INDENT-ON* */
+
+ return error;
+}
+
+static clib_error_t *
+show_dpdk_crypto_placement_fn (vlib_main_t * vm, unformat_input_t * input,
+ vlib_cli_command_t * cmd)
+{
+ return common_crypto_placement_fn (vm, input, cmd, 0);
+}
+
+static clib_error_t *
+show_dpdk_crypto_placement_v_fn (vlib_main_t * vm, unformat_input_t * input,
+ vlib_cli_command_t * cmd)
+{
+ return common_crypto_placement_fn (vm, input, cmd, 1);
+}
+
+/*?
+ * This command is used to display the DPDK Crypto device placement.
+ *
+ * @cliexpar
+ * Example of displaying the DPDK Crypto device placement:
+ * @cliexstart{show dpdk crypto placement}
+ * vpp# show dpdk crypto placement
+ * Thread 1 (vpp_wk_0):
+ * cryptodev_aesni_mb_p dev-id 0 inbound-queue 0 outbound-queue 1
+ * cryptodev_aesni_gcm_ dev-id 1 inbound-queue 0 outbound-queue 1
+ *
+ * Thread 2 (vpp_wk_1):
+ * cryptodev_aesni_mb_p dev-id 0 inbound-queue 2 outbound-queue 3
+ * cryptodev_aesni_gcm_ dev-id 1 inbound-queue 2 outbound-queue 3
+ * @cliexend
+?*/
+/* *INDENT-OFF* */
+VLIB_CLI_COMMAND (show_dpdk_crypto_placement, static) = {
+ .path = "show dpdk crypto placement",
+ .short_help = "show dpdk crypto placement",
+ .function = show_dpdk_crypto_placement_fn,
+};
+/* *INDENT-ON* */
+
+/*?
+ * This command is used to display the DPDK Crypto device placement
+ * with verbose output.
+ *
+ * @cliexpar
+ * Example of displaying the DPDK Crypto device placement verbose:
+ * @cliexstart{show dpdk crypto placement verbose}
+ * vpp# show dpdk crypto placement verbose
+ * Thread 1 (vpp_wk_0):
+ * cryptodev_aesni_mb_p dev-id 0 inbound-queue 0 outbound-queue 1
+ * Cipher: aes-cbc-128, aes-cbc-192, aes-cbc-256, aes-ctr-128, aes-ctr-192, aes-ctr-256
+ * Auth: md5-96, sha1-96, sha-256-128, sha-384-192, sha-512-256
+ * cryptodev_aesni_gcm_ dev-id 1 inbound-queue 0 outbound-queue 1
+ * Cipher: aes-gcm-128, aes-gcm-192, aes-gcm-256
+ * Auth:
+ *
+ * Thread 2 (vpp_wk_1):
+ * cryptodev_aesni_mb_p dev-id 0 inbound-queue 2 outbound-queue 3
+ * Cipher: aes-cbc-128, aes-cbc-192, aes-cbc-256, aes-ctr-128, aes-ctr-192, aes-ctr-256
+ * Auth: md5-96, sha1-96, sha-256-128, sha-384-192, sha-512-256
+ * cryptodev_aesni_gcm_ dev-id 1 inbound-queue 2 outbound-queue 3
+ * Cipher: aes-gcm-128, aes-gcm-192, aes-gcm-256
+ * Auth:
+ *
+ * @cliexend
+?*/
+/* *INDENT-OFF* */
+VLIB_CLI_COMMAND (show_dpdk_crypto_placement_v, static) = {
+ .path = "show dpdk crypto placement verbose",
+ .short_help = "show dpdk crypto placement verbose",
+ .function = show_dpdk_crypto_placement_v_fn,
+};
+/* *INDENT-ON* */
+
+static clib_error_t *
+set_dpdk_crypto_placement_fn (vlib_main_t * vm,
+ unformat_input_t * input,
+ vlib_cli_command_t * cmd)
+{
+ unformat_input_t _line_input, *line_input = &_line_input;
+ dpdk_crypto_main_t *dcm = &dpdk_crypto_main;
+ crypto_worker_main_t *cwm;
+ crypto_dev_t *dev;
+ u32 thread_idx, i;
+ u16 res_idx, *idx;
+ u8 dev_idx, auto_en = 0;
+
+ if (!unformat_user (input, unformat_line_input, line_input))
+ return clib_error_return (0, "invalid syntax");
+
+ while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
+ {
+ if (unformat (line_input, "%u %u", &dev_idx, &thread_idx))
+ ;
+ else if (unformat (line_input, "auto"))
+ auto_en = 1;