app/procinfo: fix build without rte_security
authorHemant Agrawal <hemant.agrawal@nxp.com>
Fri, 18 Oct 2019 07:56:12 +0000 (13:26 +0530)
committerAkhil Goyal <akhil.goyal@nxp.com>
Wed, 23 Oct 2019 14:57:06 +0000 (16:57 +0200)
This patch fixes the compilation issues when
RTE_LIBRTE_SECURITY is disabled.

Fixes: 8a37f37fc243 ("app/procinfo: add --show-port")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
app/proc-info/main.c

index a3f854b..8cf501d 100644 (file)
@@ -30,7 +30,9 @@
 #include <rte_string_fns.h>
 #include <rte_metrics.h>
 #include <rte_cycles.h>
+#ifdef RTE_LIBRTE_SECURITY
 #include <rte_security.h>
+#endif
 #include <rte_cryptodev.h>
 #include <rte_tm.h>
 #include <rte_hexdump.h>
@@ -733,6 +735,7 @@ 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);
 
@@ -751,6 +754,7 @@ show_port(void)
                                                s_cap->crypto_capabilities->op);
                        }
                }
+#endif
        }
 
        STATS_BDR_STR(50, "");