DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] test/ipsec: fix performance test failure
@ 2022-06-17 17:18 Vladimir Medvedkin
  2022-06-21 11:08 ` [EXT] " Akhil Goyal
  2022-06-21 13:30 ` [PATCH v2] " Vladimir Medvedkin
  0 siblings, 2 replies; 5+ messages in thread
From: Vladimir Medvedkin @ 2022-06-17 17:18 UTC (permalink / raw)
  To: dev; +Cc: savinay.dharmappa, stable, Konstantin Ananyev, Bernard Iremonger

This patch initializes with 0 rte_ipsec_sa_prm inside the ipsec_sa struct.
Before it was passed uninitialized to rte_ipsec_sa_init(),
which does not check whether prm->ipsec_xform.esn.value is greater
than sa->sqn_mask.

Bugzilla ID: 1023
Fixes: f7f3ac6dcbe2 ("test/ipsec: add performance cases")
Cc: savinay.dharmappa@intel.com
Cc: stable@dpdk.org

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
 app/test/test_ipsec_perf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/test_ipsec_perf.c b/app/test/test_ipsec_perf.c
index 346a851648..580cad00f6 100644
--- a/app/test/test_ipsec_perf.c
+++ b/app/test/test_ipsec_perf.c
@@ -592,8 +592,8 @@ testsuite_teardown(void)
 static int
 test_libipsec_perf(void)
 {
-	struct ipsec_sa sa_out;
-	struct ipsec_sa sa_in;
+	struct ipsec_sa sa_out = { 0 };
+	struct ipsec_sa sa_in = { 0 };
 	uint32_t i;
 	int ret;
 
-- 
2.25.1


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

* RE: [EXT] [PATCH] test/ipsec: fix performance test failure
  2022-06-17 17:18 [PATCH] test/ipsec: fix performance test failure Vladimir Medvedkin
@ 2022-06-21 11:08 ` Akhil Goyal
  2022-06-21 13:30 ` [PATCH v2] " Vladimir Medvedkin
  1 sibling, 0 replies; 5+ messages in thread
From: Akhil Goyal @ 2022-06-21 11:08 UTC (permalink / raw)
  To: Vladimir Medvedkin, dev
  Cc: savinay.dharmappa, stable, Konstantin Ananyev, Bernard Iremonger

> This patch initializes with 0 rte_ipsec_sa_prm inside the ipsec_sa struct.
> Before it was passed uninitialized to rte_ipsec_sa_init(),
> which does not check whether prm->ipsec_xform.esn.value is greater
> than sa->sqn_mask.
> 
> Bugzilla ID: 1023
> Fixes: f7f3ac6dcbe2 ("test/ipsec: add performance cases")
> Cc: savinay.dharmappa@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Please fix compilation issues reported by CI

../app/test/test_ipsec_perf.c: In function 'test_libipsec_perf':
../app/test/test_ipsec_perf.c:595:9: error: missing braces around initializer [-Werror=missing-braces]
  struct ipsec_sa sa_out = { 0 };
         ^
../app/test/test_ipsec_perf.c:595:9: error: (near initialization for 'sa_out.ss') [-Werror=missing-braces]
../app/test/test_ipsec_perf.c:596:9: error: missing braces around initializer [-Werror=missing-braces]
  struct ipsec_sa sa_in = { 0 };
         ^
../app/test/test_ipsec_perf.c:596:9: error: (near initialization for 'sa_in.ss') [-Werror=missing-braces]
cc1: all warnings being treated as errors

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

* [PATCH v2] test/ipsec: fix performance test failure
  2022-06-17 17:18 [PATCH] test/ipsec: fix performance test failure Vladimir Medvedkin
  2022-06-21 11:08 ` [EXT] " Akhil Goyal
@ 2022-06-21 13:30 ` Vladimir Medvedkin
  2022-06-21 17:23   ` [EXT] " Akhil Goyal
  2022-06-23 11:18   ` Jiang, YuX
  1 sibling, 2 replies; 5+ messages in thread
From: Vladimir Medvedkin @ 2022-06-21 13:30 UTC (permalink / raw)
  To: dev; +Cc: gakhil, stable, Konstantin Ananyev, Bernard Iremonger

This patch initializes with 0 rte_ipsec_sa_prm inside the ipsec_sa struct.
Before it was passed uninitialized to rte_ipsec_sa_init(),
which does not check whether prm->ipsec_xform.esn.value is greater
than sa->sqn_mask.

Bugzilla ID: 1023
Fixes: f7f3ac6dcbe2 ("test/ipsec: add performance cases")
Cc: stable@dpdk.org

Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---

Notes:
    v2:
     - fix gcc4 warnings

 app/test/test_ipsec_perf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/test_ipsec_perf.c b/app/test/test_ipsec_perf.c
index 346a851648..11de9a6aac 100644
--- a/app/test/test_ipsec_perf.c
+++ b/app/test/test_ipsec_perf.c
@@ -592,8 +592,8 @@ testsuite_teardown(void)
 static int
 test_libipsec_perf(void)
 {
-	struct ipsec_sa sa_out;
-	struct ipsec_sa sa_in;
+	struct ipsec_sa sa_out = { .sa_prm = { 0 } };
+	struct ipsec_sa sa_in = { .sa_prm = { 0 } };
 	uint32_t i;
 	int ret;
 
-- 
2.25.1


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

* RE: [EXT] [PATCH v2] test/ipsec: fix performance test failure
  2022-06-21 13:30 ` [PATCH v2] " Vladimir Medvedkin
@ 2022-06-21 17:23   ` Akhil Goyal
  2022-06-23 11:18   ` Jiang, YuX
  1 sibling, 0 replies; 5+ messages in thread
From: Akhil Goyal @ 2022-06-21 17:23 UTC (permalink / raw)
  To: Vladimir Medvedkin, dev; +Cc: stable, Konstantin Ananyev, Bernard Iremonger

> This patch initializes with 0 rte_ipsec_sa_prm inside the ipsec_sa struct.
> Before it was passed uninitialized to rte_ipsec_sa_init(),
> which does not check whether prm->ipsec_xform.esn.value is greater
> than sa->sqn_mask.
> 
> Bugzilla ID: 1023
> Fixes: f7f3ac6dcbe2 ("test/ipsec: add performance cases")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> ---
> 
> Notes:
>     v2:
>      - fix gcc4 warnings
Applied to dpdk-next-crypto

Thanks.

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

* RE: [PATCH v2] test/ipsec: fix performance test failure
  2022-06-21 13:30 ` [PATCH v2] " Vladimir Medvedkin
  2022-06-21 17:23   ` [EXT] " Akhil Goyal
@ 2022-06-23 11:18   ` Jiang, YuX
  1 sibling, 0 replies; 5+ messages in thread
From: Jiang, YuX @ 2022-06-23 11:18 UTC (permalink / raw)
  To: Medvedkin, Vladimir, dev, Jiang, YuX
  Cc: gakhil, stable, Konstantin Ananyev, Iremonger, Bernard

> -----Original Message-----
> From: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> Sent: Tuesday, June 21, 2022 9:31 PM
> To: dev@dpdk.org
> Cc: gakhil@marvell.com; stable@dpdk.org; Konstantin Ananyev
> <konstantin.v.ananyev@yandex.ru>; Iremonger, Bernard
> <bernard.iremonger@intel.com>
> Subject: [PATCH v2] test/ipsec: fix performance test failure
> 
> This patch initializes with 0 rte_ipsec_sa_prm inside the ipsec_sa struct.
> Before it was passed uninitialized to rte_ipsec_sa_init(), which does not
> check whether prm->ipsec_xform.esn.value is greater than sa->sqn_mask.
> 
> Bugzilla ID: 1023
> Fixes: f7f3ac6dcbe2 ("test/ipsec: add performance cases")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> ---
> 
> Notes:
>     v2:
>      - fix gcc4 warnings
> 
>  app/test/test_ipsec_perf.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test/test_ipsec_perf.c b/app/test/test_ipsec_perf.c index
> 346a851648..11de9a6aac 100644
> --- a/app/test/test_ipsec_perf.c
> +++ b/app/test/test_ipsec_perf.c
> @@ -592,8 +592,8 @@ testsuite_teardown(void)  static int
>  test_libipsec_perf(void)
>  {
> -	struct ipsec_sa sa_out;
> -	struct ipsec_sa sa_in;
> +	struct ipsec_sa sa_out = { .sa_prm = { 0 } };
> +	struct ipsec_sa sa_in = { .sa_prm = { 0 } };
>  	uint32_t i;
>  	int ret;
> 
> --
> 2.25.1
Tested-by: Yu Jiang  <YuX.Jiang@intel.com>

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

end of thread, other threads:[~2022-06-23 11:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-17 17:18 [PATCH] test/ipsec: fix performance test failure Vladimir Medvedkin
2022-06-21 11:08 ` [EXT] " Akhil Goyal
2022-06-21 13:30 ` [PATCH v2] " Vladimir Medvedkin
2022-06-21 17:23   ` [EXT] " Akhil Goyal
2022-06-23 11:18   ` Jiang, YuX

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).