DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] security: fix enum start value
@ 2017-12-13  7:15 Akhil Goyal
  2017-12-13 10:24 ` Radu Nicolau
  2018-01-09  8:44 ` De Lara Guarch, Pablo
  0 siblings, 2 replies; 4+ messages in thread
From: Akhil Goyal @ 2017-12-13  7:15 UTC (permalink / raw)
  To: dev
  Cc: declan.doherty, pablo.de.lara.guarch, hemant.agrawal,
	radu.nicolau, borisp, aviadye, thomas, Akhil Goyal

enum should be initialized with 1 so that unitialized(memset)
memory may not be treated as a valid enum value.

Fixes: c261d1431bd8 ("security: introduce security API and framework")

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 lib/librte_security/rte_security.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h
index 653929b..39b624b 100644
--- a/lib/librte_security/rte_security.h
+++ b/lib/librte_security/rte_security.h
@@ -60,7 +60,7 @@ extern "C" {
 
 /** IPSec protocol mode */
 enum rte_security_ipsec_sa_mode {
-	RTE_SECURITY_IPSEC_SA_MODE_TRANSPORT,
+	RTE_SECURITY_IPSEC_SA_MODE_TRANSPORT = 1,
 	/**< IPSec Transport mode */
 	RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,
 	/**< IPSec Tunnel mode */
@@ -68,7 +68,7 @@ enum rte_security_ipsec_sa_mode {
 
 /** IPSec Protocol */
 enum rte_security_ipsec_sa_protocol {
-	RTE_SECURITY_IPSEC_SA_PROTO_AH,
+	RTE_SECURITY_IPSEC_SA_PROTO_AH = 1,
 	/**< AH protocol */
 	RTE_SECURITY_IPSEC_SA_PROTO_ESP,
 	/**< ESP protocol */
@@ -76,7 +76,7 @@ enum rte_security_ipsec_sa_protocol {
 
 /** IPSEC tunnel type */
 enum rte_security_ipsec_tunnel_type {
-	RTE_SECURITY_IPSEC_TUNNEL_IPV4,
+	RTE_SECURITY_IPSEC_TUNNEL_IPV4 = 1,
 	/**< Outer header is IPv4 */
 	RTE_SECURITY_IPSEC_TUNNEL_IPV6,
 	/**< Outer header is IPv6 */
@@ -252,7 +252,7 @@ enum rte_security_session_action_type {
 
 /** Security session protocol definition */
 enum rte_security_session_protocol {
-	RTE_SECURITY_PROTOCOL_IPSEC,
+	RTE_SECURITY_PROTOCOL_IPSEC = 1,
 	/**< IPsec Protocol */
 	RTE_SECURITY_PROTOCOL_MACSEC,
 	/**< MACSec Protocol */
-- 
2.9.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] security: fix enum start value
  2017-12-13  7:15 [dpdk-dev] [PATCH] security: fix enum start value Akhil Goyal
@ 2017-12-13 10:24 ` Radu Nicolau
  2018-01-09  8:44 ` De Lara Guarch, Pablo
  1 sibling, 0 replies; 4+ messages in thread
From: Radu Nicolau @ 2017-12-13 10:24 UTC (permalink / raw)
  To: Akhil Goyal, dev
  Cc: declan.doherty, pablo.de.lara.guarch, hemant.agrawal, borisp,
	aviadye, thomas


On 12/13/2017 7:15 AM, Akhil Goyal wrote:
> enum should be initialized with 1 so that unitialized(memset)
> memory may not be treated as a valid enum value.
>
> Fixes: c261d1431bd8 ("security: introduce security API and framework")
>
> Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
> ---
>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] security: fix enum start value
  2017-12-13  7:15 [dpdk-dev] [PATCH] security: fix enum start value Akhil Goyal
  2017-12-13 10:24 ` Radu Nicolau
@ 2018-01-09  8:44 ` De Lara Guarch, Pablo
  2018-01-09  8:46   ` De Lara Guarch, Pablo
  1 sibling, 1 reply; 4+ messages in thread
From: De Lara Guarch, Pablo @ 2018-01-09  8:44 UTC (permalink / raw)
  To: Akhil Goyal, dev
  Cc: Doherty, Declan, hemant.agrawal, Nicolau, Radu, borisp, aviadye, thomas



> -----Original Message-----
> From: Akhil Goyal [mailto:akhil.goyal@nxp.com]
> Sent: Wednesday, December 13, 2017 7:15 AM
> To: dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; hemant.agrawal@nxp.com; Nicolau,
> Radu <radu.nicolau@intel.com>; borisp@mellanox.com;
> aviadye@mellanox.com; thomas@monjalon.net; Akhil Goyal
> <akhil.goyal@nxp.com>
> Subject: [PATCH] security: fix enum start value
> 
> enum should be initialized with 1 so that unitialized(memset) memory may
> not be treated as a valid enum value.
> 
> Fixes: c261d1431bd8 ("security: introduce security API and framework")
> 
> Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>

Applied to dpdk-next-crypto.
Thanks,

Pablo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] security: fix enum start value
  2018-01-09  8:44 ` De Lara Guarch, Pablo
@ 2018-01-09  8:46   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 4+ messages in thread
From: De Lara Guarch, Pablo @ 2018-01-09  8:46 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, Akhil Goyal, dev
  Cc: Doherty, Declan, hemant.agrawal, Nicolau, Radu, borisp, aviadye,
	thomas, stable



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch,
> Pablo
> Sent: Tuesday, January 9, 2018 8:44 AM
> To: Akhil Goyal <akhil.goyal@nxp.com>; dev@dpdk.org
> Cc: Doherty, Declan <declan.doherty@intel.com>;
> hemant.agrawal@nxp.com; Nicolau, Radu <radu.nicolau@intel.com>;
> borisp@mellanox.com; aviadye@mellanox.com; thomas@monjalon.net
> Subject: Re: [dpdk-dev] [PATCH] security: fix enum start value
> 
> 
> 
> > -----Original Message-----
> > From: Akhil Goyal [mailto:akhil.goyal@nxp.com]
> > Sent: Wednesday, December 13, 2017 7:15 AM
> > To: dev@dpdk.org
> > Cc: Doherty, Declan <declan.doherty@intel.com>; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>; hemant.agrawal@nxp.com; Nicolau,
> > Radu <radu.nicolau@intel.com>; borisp@mellanox.com;
> > aviadye@mellanox.com; thomas@monjalon.net; Akhil Goyal
> > <akhil.goyal@nxp.com>
> > Subject: [PATCH] security: fix enum start value
> >
> > enum should be initialized with 1 so that unitialized(memset) memory
> > may not be treated as a valid enum value.
> >
> > Fixes: c261d1431bd8 ("security: introduce security API and framework")
> >
Cc: stable@dpdk.org

> > Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
> 
> Applied to dpdk-next-crypto.
> Thanks,
> 
> Pablo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-09  8:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-13  7:15 [dpdk-dev] [PATCH] security: fix enum start value Akhil Goyal
2017-12-13 10:24 ` Radu Nicolau
2018-01-09  8:44 ` De Lara Guarch, Pablo
2018-01-09  8:46   ` De Lara Guarch, Pablo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).