[dpdk-dev] [PATCH] app/proc-info: fix security context info
Thomas Monjalon
thomas at monjalon.net
Fri Jan 15 12:25:07 CET 2021
24/12/2020 08:51, Hemant Agrawal:
> static void
> -show_security_context(uint16_t portid)
> +show_security_context(uint16_t portid, uint8_t inline_offload)
> {
> - void *p_ctx = rte_eth_dev_get_sec_ctx(portid);
> + void *p_ctx;
> const struct rte_security_capability *s_cap;
>
> + if (inline_offload)
> + p_ctx = rte_eth_dev_get_sec_ctx(portid);
> + else
> + p_ctx = rte_cryptodev_get_sec_ctx(portid);
> +
> if (p_ctx == NULL)
> return;
>
> @@ -859,7 +864,7 @@ show_port(void)
> }
>
> #ifdef RTE_LIB_SECURITY
> - show_security_context(i);
> + show_security_context(i, 1);
> #endif
> }
> }
> @@ -1224,7 +1229,7 @@ show_crypto(void)
> }
>
> #ifdef RTE_LIB_SECURITY
> - show_security_context(i);
> + show_security_context(i, 0);
> #endif
It seems this new parameter would better be a boolean.
More information about the dev
mailing list