From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A70D4A0540; Mon, 13 Jul 2020 15:19:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 07A931D66C; Mon, 13 Jul 2020 15:19:31 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id DDB341D66A for ; Mon, 13 Jul 2020 15:19:28 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id AA37020006A; Mon, 13 Jul 2020 15:19:28 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 9765C2000A0; Mon, 13 Jul 2020 15:19:26 +0200 (CEST) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 8D8E7402C8; Mon, 13 Jul 2020 21:19:23 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org Cc: maryam.tahhan@intel.com, reshma.pattan@intel.com, Hemant Agrawal Date: Mon, 13 Jul 2020 18:45:01 +0530 Message-Id: <20200713131501.17422-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200713131501.17422-1-hemant.agrawal@nxp.com> References: <20200711095343.10523-1-hemant.agrawal@nxp.com> <20200713131501.17422-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 2/2] app/proc-info: add crypto security context info X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch adds the crypto based security context info. Also improve the flag printing to SECURITY OFFLOAD from INLINE. Signed-off-by: Hemant Agrawal --- app/proc-info/main.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index a5d16765b..34acea12a 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -1169,7 +1169,7 @@ display_crypto_feature_info(uint64_t x) printf("\t\t + AESNI: CPU (%c), HW (%c)\n", (x & RTE_CRYPTODEV_FF_CPU_AESNI) ? 'y' : 'n', (x & RTE_CRYPTODEV_FF_HW_ACCELERATED) ? 'y' : 'n'); - printf("\t\t + INLINE (%c)\n", + printf("\t\t + SECURITY OFFLOAD (%c)\n", (x & RTE_CRYPTODEV_FF_SECURITY) ? 'y' : 'n'); printf("\t\t + ARM: NEON (%c), CE (%c)\n", (x & RTE_CRYPTODEV_FF_CPU_NEON) ? 'y' : 'n', @@ -1226,6 +1226,26 @@ show_crypto(void) stats.dequeued_count, stats.dequeue_err_count); } +#ifdef RTE_LIBRTE_SECURITY + void *p_ctx = rte_eth_dev_get_sec_ctx(i); + printf("\t -- security context - %p\n", p_ctx); + + if (p_ctx) { + printf("\t -- size %u\n", + rte_security_session_get_size(p_ctx)); + const struct rte_security_capability *s_cap = + rte_security_capabilities_get(p_ctx); + if (s_cap) { + printf("\t -- action (0x%x), protocol (0x%x)," + " offload flags (0x%x)\n", + s_cap->action, + s_cap->protocol, + s_cap->ol_flags); + printf("\t -- capabilities - oper type %x\n", + s_cap->crypto_capabilities->op); + } + } +#endif } } -- 2.17.1