* [PATCH] test/crypto: fix warnings for optimization=1 build
@ 2022-06-10 22:09 Rahul Lakkireddy
2022-06-13 5:02 ` [EXT] " Anoob Joseph
2022-06-13 9:52 ` [PATCH v2] " Rahul Lakkireddy
0 siblings, 2 replies; 5+ messages in thread
From: Rahul Lakkireddy @ 2022-06-10 22:09 UTC (permalink / raw)
To: dev; +Cc: gakhil, roy.fan.zhang, stable
Skip IPSec ESN and antireplay cases, if there are no packets. Fixes
following warning when using optimization=1 build flag with GCC 11.
../app/test/test_cryptodev.c: In function ‘test_ipsec_pkt_replay’:
../app/test/test_cryptodev.c:10074:15: warning: ‘td_outb’ may be used uninitialized [-Wmaybe-uninitialized]
ret = test_ipsec_proto_process(td_outb, td_inb, nb_pkts, true,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&flags);
~~~~~~~
../app/test/test_cryptodev.c:9150:1: note: by argument 1 of type ‘const struct ipsec_test_data[]’ to ‘test_ipsec_proto_process’ declared here
test_ipsec_proto_process(const struct ipsec_test_data td[],
^~~~~~~~~~~~~~~~~~~~~~~~
../app/test/test_cryptodev.c:10056:32: note: ‘td_outb’ declared here
struct ipsec_test_data td_outb[IPSEC_TEST_PACKETS_MAX];
^~~~~~~
Fixes: d02c6bfcb99a ("test/crypto: add ESN and antireplay cases")
Cc: stable@dpdk.org
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
app/test/test_cryptodev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 524019ce0e..47ce3d8420 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -10058,6 +10058,9 @@ test_ipsec_pkt_replay(const void *test_data, const uint64_t esn[],
struct ipsec_test_flags flags;
uint32_t i = 0, ret = 0;
+ if (nb_pkts == 0)
+ return TEST_SKIPPED;
+
memset(&flags, 0, sizeof(flags));
flags.antireplay = true;
--
2.27.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [EXT] [PATCH] test/crypto: fix warnings for optimization=1 build
2022-06-10 22:09 [PATCH] test/crypto: fix warnings for optimization=1 build Rahul Lakkireddy
@ 2022-06-13 5:02 ` Anoob Joseph
2022-06-13 9:52 ` [PATCH v2] " Rahul Lakkireddy
1 sibling, 0 replies; 5+ messages in thread
From: Anoob Joseph @ 2022-06-13 5:02 UTC (permalink / raw)
To: Rahul Lakkireddy; +Cc: Akhil Goyal, roy.fan.zhang, stable, dev
Hi Rahul,
Please see inline.
Thanks,
Anoob
> -----Original Message-----
> From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
> Sent: Saturday, June 11, 2022 3:40 AM
> To: dev@dpdk.org
> Cc: Akhil Goyal <gakhil@marvell.com>; roy.fan.zhang@intel.com;
> stable@dpdk.org
> Subject: [EXT] [PATCH] test/crypto: fix warnings for optimization=1 build
>
> External Email
>
> ----------------------------------------------------------------------
> Skip IPSec ESN and antireplay cases, if there are no packets. Fixes following
> warning when using optimization=1 build flag with GCC 11.
>
> ../app/test/test_cryptodev.c: In function ‘test_ipsec_pkt_replay’:
> ../app/test/test_cryptodev.c:10074:15: warning: ‘td_outb’ may be used
> uninitialized [-Wmaybe-uninitialized]
> ret = test_ipsec_proto_process(td_outb, td_inb, nb_pkts, true,
>
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> &flags);
> ~~~~~~~
> ../app/test/test_cryptodev.c:9150:1: note: by argument 1 of type ‘const
> struct ipsec_test_data[]’ to ‘test_ipsec_proto_process’ declared here
> test_ipsec_proto_process(const struct ipsec_test_data td[],
> ^~~~~~~~~~~~~~~~~~~~~~~~
> ../app/test/test_cryptodev.c:10056:32: note: ‘td_outb’ declared here
> struct ipsec_test_data td_outb[IPSEC_TEST_PACKETS_MAX];
> ^~~~~~~
>
> Fixes: d02c6bfcb99a ("test/crypto: add ESN and antireplay cases")
> Cc: stable@dpdk.org
>
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
> ---
> app/test/test_cryptodev.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index
> 524019ce0e..47ce3d8420 100644
> --- a/app/test/test_cryptodev.c
> +++ b/app/test/test_cryptodev.c
> @@ -10058,6 +10058,9 @@ test_ipsec_pkt_replay(const void *test_data,
> const uint64_t esn[],
> struct ipsec_test_flags flags;
> uint32_t i = 0, ret = 0;
>
> + if (nb_pkts == 0)
> + return TEST_SKIPPED;
> +
[Anoob] nb_pkts == 0 would indicate a badly written test case. Might be better to return TEST_FAILED in that case.
> memset(&flags, 0, sizeof(flags));
> flags.antireplay = true;
>
> --
> 2.27.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] test/crypto: fix warnings for optimization=1 build
2022-06-10 22:09 [PATCH] test/crypto: fix warnings for optimization=1 build Rahul Lakkireddy
2022-06-13 5:02 ` [EXT] " Anoob Joseph
@ 2022-06-13 9:52 ` Rahul Lakkireddy
2022-06-13 9:54 ` [EXT] " Anoob Joseph
2022-06-15 15:08 ` Akhil Goyal
1 sibling, 2 replies; 5+ messages in thread
From: Rahul Lakkireddy @ 2022-06-13 9:52 UTC (permalink / raw)
To: dev; +Cc: gakhil, roy.fan.zhang, anoobj, daxuex.gao, stable
Fail IPSec ESN and antireplay cases, if there are no packets. Fixes
following warning when using optimization=1 build flag with GCC 11.
../app/test/test_cryptodev.c: In function ‘test_ipsec_pkt_replay’:
../app/test/test_cryptodev.c:10074:15: warning: ‘td_outb’ may be used uninitialized [-Wmaybe-uninitialized]
ret = test_ipsec_proto_process(td_outb, td_inb, nb_pkts, true,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&flags);
~~~~~~~
../app/test/test_cryptodev.c:9150:1: note: by argument 1 of type ‘const struct ipsec_test_data[]’ to ‘test_ipsec_proto_process’ declared here
test_ipsec_proto_process(const struct ipsec_test_data td[],
^~~~~~~~~~~~~~~~~~~~~~~~
../app/test/test_cryptodev.c:10056:32: note: ‘td_outb’ declared here
struct ipsec_test_data td_outb[IPSEC_TEST_PACKETS_MAX];
^~~~~~~
Bugzilla ID: 1032
Fixes: d02c6bfcb99a ("test/crypto: add ESN and antireplay cases")
Cc: stable@dpdk.org
Reported-by: Daxue Gao <daxuex.gao@intel.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
v2:
- Return TEST_FAILED, instead of TEST_SKIPPED
- Add the new Bugzilla ID in commit message
app/test/test_cryptodev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 524019ce0e..2766e0cc10 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -10058,6 +10058,9 @@ test_ipsec_pkt_replay(const void *test_data, const uint64_t esn[],
struct ipsec_test_flags flags;
uint32_t i = 0, ret = 0;
+ if (nb_pkts == 0)
+ return TEST_FAILED;
+
memset(&flags, 0, sizeof(flags));
flags.antireplay = true;
--
2.27.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [EXT] [PATCH v2] test/crypto: fix warnings for optimization=1 build
2022-06-13 9:52 ` [PATCH v2] " Rahul Lakkireddy
@ 2022-06-13 9:54 ` Anoob Joseph
2022-06-15 15:08 ` Akhil Goyal
1 sibling, 0 replies; 5+ messages in thread
From: Anoob Joseph @ 2022-06-13 9:54 UTC (permalink / raw)
To: Rahul Lakkireddy, dev; +Cc: Akhil Goyal, roy.fan.zhang, daxuex.gao, stable
> Fail IPSec ESN and antireplay cases, if there are no packets. Fixes following
> warning when using optimization=1 build flag with GCC 11.
>
> ../app/test/test_cryptodev.c: In function ‘test_ipsec_pkt_replay’:
> ../app/test/test_cryptodev.c:10074:15: warning: ‘td_outb’ may be used
> uninitialized [-Wmaybe-uninitialized]
> ret = test_ipsec_proto_process(td_outb, td_inb, nb_pkts, true,
>
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> &flags);
> ~~~~~~~
> ../app/test/test_cryptodev.c:9150:1: note: by argument 1 of type ‘const
> struct ipsec_test_data[]’ to ‘test_ipsec_proto_process’ declared here
> test_ipsec_proto_process(const struct ipsec_test_data td[],
> ^~~~~~~~~~~~~~~~~~~~~~~~
> ../app/test/test_cryptodev.c:10056:32: note: ‘td_outb’ declared here
> struct ipsec_test_data td_outb[IPSEC_TEST_PACKETS_MAX];
> ^~~~~~~
>
> Bugzilla ID: 1032
> Fixes: d02c6bfcb99a ("test/crypto: add ESN and antireplay cases")
> Cc: stable@dpdk.org
>
> Reported-by: Daxue Gao <daxuex.gao@intel.com>
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [EXT] [PATCH v2] test/crypto: fix warnings for optimization=1 build
2022-06-13 9:52 ` [PATCH v2] " Rahul Lakkireddy
2022-06-13 9:54 ` [EXT] " Anoob Joseph
@ 2022-06-15 15:08 ` Akhil Goyal
1 sibling, 0 replies; 5+ messages in thread
From: Akhil Goyal @ 2022-06-15 15:08 UTC (permalink / raw)
To: Rahul Lakkireddy, dev; +Cc: roy.fan.zhang, Anoob Joseph, daxuex.gao, stable
> Fail IPSec ESN and antireplay cases, if there are no packets. Fixes
> following warning when using optimization=1 build flag with GCC 11.
>
> ../app/test/test_cryptodev.c: In function ‘test_ipsec_pkt_replay’:
> ../app/test/test_cryptodev.c:10074:15: warning: ‘td_outb’ may be used
> uninitialized [-Wmaybe-uninitialized]
> ret = test_ipsec_proto_process(td_outb, td_inb, nb_pkts, true,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> &flags);
> ~~~~~~~
> ../app/test/test_cryptodev.c:9150:1: note: by argument 1 of type ‘const struct
> ipsec_test_data[]’ to ‘test_ipsec_proto_process’ declared here
> test_ipsec_proto_process(const struct ipsec_test_data td[],
> ^~~~~~~~~~~~~~~~~~~~~~~~
> ../app/test/test_cryptodev.c:10056:32: note: ‘td_outb’ declared here
> struct ipsec_test_data td_outb[IPSEC_TEST_PACKETS_MAX];
> ^~~~~~~
>
> Bugzilla ID: 1032
> Fixes: d02c6bfcb99a ("test/crypto: add ESN and antireplay cases")
> Cc: stable@dpdk.org
>
> Reported-by: Daxue Gao <daxuex.gao@intel.com>
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-06-15 15:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10 22:09 [PATCH] test/crypto: fix warnings for optimization=1 build Rahul Lakkireddy
2022-06-13 5:02 ` [EXT] " Anoob Joseph
2022-06-13 9:52 ` [PATCH v2] " Rahul Lakkireddy
2022-06-13 9:54 ` [EXT] " Anoob Joseph
2022-06-15 15:08 ` Akhil Goyal
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).