diff mbox series

app/proc-info: fix compilation with no security

Message ID 20191018075613.2784-2-hemant.agrawal@nxp.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers show
Series app/proc-info: fix compilation with no security | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed

Commit Message

Hemant Agrawal Oct. 18, 2019, 7:56 a.m. UTC
This patch fixes the compilation issues when
RTE_LIBRTE_SECURITY is disabled.

Fixes: 8a37f37fc243 ("app/procinfo: add --show-port")
Cc: stable@dpdk.org
Cc: vipin.varghese@intel.com

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 app/proc-info/main.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Thierry Herbelot Oct. 18, 2019, 8:09 a.m. UTC | #1
On 10/18/19 9:56 AM, Hemant Agrawal wrote:
> This patch fixes the compilation issues when
> RTE_LIBRTE_SECURITY is disabled.
> 
> Fixes: 8a37f37fc243 ("app/procinfo: add --show-port")
> Cc: stable@dpdk.org
> Cc: vipin.varghese@intel.com
> 
> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
> ---
>   app/proc-info/main.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/app/proc-info/main.c b/app/proc-info/main.c
> index a3f854b89..8cf501d06 100644
> --- a/app/proc-info/main.c
> +++ b/app/proc-info/main.c
> @@ -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, "");
> 

Acked-by: Thierry Herbelot <thierry.herbelot@6wind.com>
Akhil Goyal Oct. 23, 2019, 2:46 p.m. UTC | #2
> On 10/18/19 9:56 AM, Hemant Agrawal wrote:
> > This patch fixes the compilation issues when
> > RTE_LIBRTE_SECURITY is disabled.
> >
> > Fixes: 8a37f37fc243 ("app/procinfo: add --show-port")
> > Cc: stable@dpdk.org
> > Cc: vipin.varghese@intel.com
> >
> > 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>

Applied to dpdk-next-crypto

Thanks.
Akhil Goyal Oct. 23, 2019, 2:48 p.m. UTC | #3
> On 10/18/19 9:56 AM, Hemant Agrawal wrote:
> > This patch fixes the compilation issues when
> > RTE_LIBRTE_SECURITY is disabled.
> >
> > Fixes: 8a37f37fc243 ("app/procinfo: add --show-port")
> > Cc: stable@dpdk.org
> > Cc: vipin.varghese@intel.com
> >
> > 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>

Applied to dpdk-next-crypto

Thanks.
diff mbox series

Patch

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index a3f854b89..8cf501d06 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -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, "");