[v2,5/7] app/proc-info: hide crypto-context display

Message ID 20200506195758.27057-6-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series app/proc-info enhancements |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Stephen Hemminger May 6, 2020, 7:57 p.m. UTC
  If crypto context is not present, no point in displaying it.
Also fix spelling error.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 app/proc-info/main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
  

Patch

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index c4f1f99e7d5d..804c0fd63b3e 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -779,12 +779,11 @@  show_port(void)
 			}
 		}
 
-		printf("  - cyrpto context\n");
 #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("  - crypto context\n");
+			printf("\t  -- security context - %p\n", p_ctx);
 			printf("\t  -- size %u\n",
 					rte_security_session_get_size(p_ctx));
 			const struct rte_security_capability *s_cap =