* [dpdk-dev] [PATCH 1/5] test/ipsec: fix failures in tests 12 and 13
@ 2019-05-22 13:38 Bernard Iremonger
2019-05-22 13:38 ` [dpdk-dev] [PATCH 2/5] test/ipsec: fix log messages in tests Bernard Iremonger
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Bernard Iremonger @ 2019-05-22 13:38 UTC (permalink / raw)
To: dev, konstantin.ananyev, akhil.goyal; +Cc: Bernard Iremonger, stable
Calling rte_cryptodev_enqueue_burst() in a loop for 1
packet at a time results in some random mbufs with 36 leading 0's.
Calling rte_cryptodev_enqueue_burst() for a burst of packets solves
this issue.
Fixes: 59d7353b0df0 ("test/ipsec: fix test suite setup")
Cc: stable@dpdk.org
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
app/test/test_ipsec.c | 34 +++++++++++++++++++---------------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 64e56c0..9859cb9 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -897,13 +897,14 @@ crypto_ipsec_2sa(void)
"rte_ipsec_pkt_crypto_prepare fail\n");
return TEST_FAILED;
}
- k = rte_cryptodev_enqueue_burst(ts_params->valid_dev, 0,
- ut_params->cop + i, 1);
- if (k != 1) {
- RTE_LOG(ERR, USER1,
- "rte_cryptodev_enqueue_burst fail\n");
- return TEST_FAILED;
- }
+ }
+
+ k = rte_cryptodev_enqueue_burst(ts_params->valid_dev, 0,
+ ut_params->cop, BURST_SIZE);
+ if (k != BURST_SIZE) {
+ RTE_LOG(ERR, USER1,
+ "rte_cryptodev_enqueue_burst fail k=%u\n", k);
+ return TEST_FAILED;
}
if (crypto_dequeue_burst(BURST_SIZE) == TEST_FAILED)
@@ -1012,12 +1013,14 @@ crypto_ipsec_4grp_check_cnt(uint32_t grp_ind, struct rte_ipsec_group *grp)
return rc;
}
+#define GRP_4 4
+
static int
crypto_ipsec_2sa_4grp(void)
{
struct ipsec_testsuite_params *ts_params = &testsuite_params;
struct ipsec_unitest_params *ut_params = &unittest_params;
- struct rte_ipsec_group grp[BURST_SIZE];
+ struct rte_ipsec_group grp[GRP_4];
uint32_t k, ng, i, j;
uint32_t rc = 0;
@@ -1032,13 +1035,14 @@ crypto_ipsec_2sa_4grp(void)
"rte_ipsec_pkt_crypto_prepare fail\n");
return TEST_FAILED;
}
- k = rte_cryptodev_enqueue_burst(ts_params->valid_dev, 0,
- ut_params->cop + i, 1);
- if (k != 1) {
- RTE_LOG(ERR, USER1,
- "rte_cryptodev_enqueue_burst fail\n");
- return TEST_FAILED;
- }
+ }
+
+ k = rte_cryptodev_enqueue_burst(ts_params->valid_dev, 0,
+ ut_params->cop, BURST_SIZE);
+ if (k != BURST_SIZE) {
+ RTE_LOG(ERR, USER1,
+ "rte_cryptodev_enqueue_burst fail k=%u\n", k);
+ return TEST_FAILED;
}
if (crypto_dequeue_burst(BURST_SIZE) == TEST_FAILED)
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 2/5] test/ipsec: fix log messages in tests
2019-05-22 13:38 [dpdk-dev] [PATCH 1/5] test/ipsec: fix failures in tests 12 and 13 Bernard Iremonger
@ 2019-05-22 13:38 ` Bernard Iremonger
2019-05-22 13:38 ` [dpdk-dev] [PATCH 3/5] test/ipsec: reorder tests Bernard Iremonger
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Bernard Iremonger @ 2019-05-22 13:38 UTC (permalink / raw)
To: dev, konstantin.ananyev, akhil.goyal; +Cc: Bernard Iremonger, stable
Error lLog messages after the create_sa() function calls
were using the wrong function name.
The function name is replaced with create_sa.
Fixes: 05fe65eb66b2 ("test/ipsec: introduce functional test")
Cc: stable@dpdk.org
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
app/test/test_ipsec.c | 44 +++++++++++++++-----------------------------
1 file changed, 15 insertions(+), 29 deletions(-)
diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 9859cb9..85a120a 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -1203,8 +1203,7 @@ test_ipsec_crypto_inb_burst_null_null(int i)
rc = create_sa(RTE_SECURITY_ACTION_TYPE_NONE,
test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
if (rc != 0) {
- RTE_LOG(ERR, USER1, "rte_ipsec_sa_init failed, cfg %d\n",
- i);
+ RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
return TEST_FAILED;
}
@@ -1306,8 +1305,7 @@ test_ipsec_crypto_outb_burst_null_null(int i)
rc = create_sa(RTE_SECURITY_ACTION_TYPE_NONE,
test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
if (rc != 0) {
- RTE_LOG(ERR, USER1, "rte_ipsec_sa_init failed, cfg %d\n",
- i);
+ RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
return TEST_FAILED;
}
@@ -1416,8 +1414,7 @@ test_ipsec_inline_crypto_inb_burst_null_null(int i)
rc = create_sa(RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO,
test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
if (rc != 0) {
- RTE_LOG(ERR, USER1, "rte_ipsec_sa_init failed, cfg %d\n",
- i);
+ RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
return TEST_FAILED;
}
@@ -1495,8 +1492,7 @@ test_ipsec_inline_proto_inb_burst_null_null(int i)
rc = create_sa(RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL,
test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
if (rc != 0) {
- RTE_LOG(ERR, USER1, "rte_ipsec_sa_init failed, cfg %d\n",
- i);
+ RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
return TEST_FAILED;
}
@@ -1604,8 +1600,7 @@ test_ipsec_inline_crypto_outb_burst_null_null(int i)
rc = create_sa(RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO,
test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
if (rc != 0) {
- RTE_LOG(ERR, USER1, "rte_ipsec_sa_init failed, cfg %d\n",
- i);
+ RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
return TEST_FAILED;
}
@@ -1683,8 +1678,7 @@ test_ipsec_inline_proto_outb_burst_null_null(int i)
rc = create_sa(RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL,
test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
if (rc != 0) {
- RTE_LOG(ERR, USER1, "rte_ipsec_sa_init failed, cfg %d\n",
- i);
+ RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
return TEST_FAILED;
}
@@ -1760,8 +1754,7 @@ test_ipsec_lksd_proto_inb_burst_null_null(int i)
rc = create_sa(RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,
test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
if (rc != 0) {
- RTE_LOG(ERR, USER1, "rte_ipsec_sa_init failed, cfg %d\n",
- i);
+ RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
return TEST_FAILED;
}
@@ -1874,8 +1867,7 @@ test_ipsec_replay_inb_inside_null_null(int i)
rc = create_sa(RTE_SECURITY_ACTION_TYPE_NONE,
test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
if (rc != 0) {
- RTE_LOG(ERR, USER1, "rte_ipsec_sa_init failed, cfg %d\n",
- i);
+ RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
return TEST_FAILED;
}
@@ -1968,8 +1960,7 @@ test_ipsec_replay_inb_outside_null_null(int i)
rc = create_sa(RTE_SECURITY_ACTION_TYPE_NONE,
test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
if (rc != 0) {
- RTE_LOG(ERR, USER1, "rte_ipsec_sa_init failed, cfg %d\n",
- i);
+ RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
return TEST_FAILED;
}
@@ -2069,7 +2060,7 @@ test_ipsec_replay_inb_repeat_null_null(int i)
rc = create_sa(RTE_SECURITY_ACTION_TYPE_NONE,
test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
if (rc != 0) {
- RTE_LOG(ERR, USER1, "rte_ipsec_sa_init failed, cfg %d\n", i);
+ RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
return TEST_FAILED;
}
@@ -2170,8 +2161,7 @@ test_ipsec_replay_inb_inside_burst_null_null(int i)
rc = create_sa(RTE_SECURITY_ACTION_TYPE_NONE,
test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
if (rc != 0) {
- RTE_LOG(ERR, USER1, "rte_ipsec_sa_init failed, cfg %d\n",
- i);
+ RTE_LOG(ERR, USER1, "create_sa failed, cfg %d\n", i);
return TEST_FAILED;
}
@@ -2304,8 +2294,7 @@ test_ipsec_crypto_inb_burst_2sa_null_null(int i)
rc = create_sa(RTE_SECURITY_ACTION_TYPE_NONE,
test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
if (rc != 0) {
- RTE_LOG(ERR, USER1, "rte_ipsec_sa_init failed, cfg %d\n",
- i);
+ RTE_LOG(ERR, USER1, "create_sa 0 failed, cfg %d\n", i);
return TEST_FAILED;
}
@@ -2314,8 +2303,7 @@ test_ipsec_crypto_inb_burst_2sa_null_null(int i)
rc = create_sa(RTE_SECURITY_ACTION_TYPE_NONE,
test_cfg[i].replay_win_sz, test_cfg[i].flags, 1);
if (rc != 0) {
- RTE_LOG(ERR, USER1, "rte_ipsec_sa_init failed, cfg %d\n",
- i);
+ RTE_LOG(ERR, USER1, "create_sa 1 failed, cfg %d\n", i);
destroy_sa(0);
return TEST_FAILED;
}
@@ -2392,8 +2380,7 @@ test_ipsec_crypto_inb_burst_2sa_4grp_null_null(int i)
rc = create_sa(RTE_SECURITY_ACTION_TYPE_NONE,
test_cfg[i].replay_win_sz, test_cfg[i].flags, 0);
if (rc != 0) {
- RTE_LOG(ERR, USER1, "rte_ipsec_sa_init failed, cfg %d\n",
- i);
+ RTE_LOG(ERR, USER1, "create_sa 0 failed, cfg %d\n", i);
return TEST_FAILED;
}
@@ -2402,8 +2389,7 @@ test_ipsec_crypto_inb_burst_2sa_4grp_null_null(int i)
rc = create_sa(RTE_SECURITY_ACTION_TYPE_NONE,
test_cfg[i].replay_win_sz, test_cfg[i].flags, 1);
if (rc != 0) {
- RTE_LOG(ERR, USER1, "rte_ipsec_sa_init failed, cfg %d\n",
- i);
+ RTE_LOG(ERR, USER1, "create_sa 1 failed, cfg %d\n", i);
destroy_sa(0);
return TEST_FAILED;
}
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 3/5] test/ipsec: reorder tests
2019-05-22 13:38 [dpdk-dev] [PATCH 1/5] test/ipsec: fix failures in tests 12 and 13 Bernard Iremonger
2019-05-22 13:38 ` [dpdk-dev] [PATCH 2/5] test/ipsec: fix log messages in tests Bernard Iremonger
@ 2019-05-22 13:38 ` Bernard Iremonger
2019-05-22 13:38 ` [dpdk-dev] [PATCH 4/5] test/ipsec: add extra test configuration Bernard Iremonger
2019-05-22 13:38 ` [dpdk-dev] [PATCH 5/5] test/ipsec: improve debug in tests 12 and 13 Bernard Iremonger
3 siblings, 0 replies; 5+ messages in thread
From: Bernard Iremonger @ 2019-05-22 13:38 UTC (permalink / raw)
To: dev, konstantin.ananyev, akhil.goyal; +Cc: Bernard Iremonger
Run outbound test configuration before inbound.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
app/test/test_ipsec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 85a120a..755b4da 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -2457,10 +2457,10 @@ static struct unit_test_suite ipsec_testsuite = {
.teardown = testsuite_teardown,
.unit_test_cases = {
TEST_CASE_ST(ut_setup, ut_teardown,
- test_ipsec_crypto_inb_burst_null_null_wrapper),
- TEST_CASE_ST(ut_setup, ut_teardown,
test_ipsec_crypto_outb_burst_null_null_wrapper),
TEST_CASE_ST(ut_setup, ut_teardown,
+ test_ipsec_crypto_inb_burst_null_null_wrapper),
+ TEST_CASE_ST(ut_setup, ut_teardown,
test_ipsec_inline_crypto_inb_burst_null_null_wrapper),
TEST_CASE_ST(ut_setup, ut_teardown,
test_ipsec_inline_crypto_outb_burst_null_null_wrapper),
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 4/5] test/ipsec: add extra test configuration
2019-05-22 13:38 [dpdk-dev] [PATCH 1/5] test/ipsec: fix failures in tests 12 and 13 Bernard Iremonger
2019-05-22 13:38 ` [dpdk-dev] [PATCH 2/5] test/ipsec: fix log messages in tests Bernard Iremonger
2019-05-22 13:38 ` [dpdk-dev] [PATCH 3/5] test/ipsec: reorder tests Bernard Iremonger
@ 2019-05-22 13:38 ` Bernard Iremonger
2019-05-22 13:38 ` [dpdk-dev] [PATCH 5/5] test/ipsec: improve debug in tests 12 and 13 Bernard Iremonger
3 siblings, 0 replies; 5+ messages in thread
From: Bernard Iremonger @ 2019-05-22 13:38 UTC (permalink / raw)
To: dev, konstantin.ananyev, akhil.goyal; +Cc: Bernard Iremonger
Add extra test configuration for BURST_SIZE packets
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
app/test/test_ipsec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 755b4da..b99e5f0 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -26,7 +26,7 @@
#include "test_cryptodev.h"
#define VDEV_ARGS_SIZE 100
-#define MAX_NB_SESSIONS 100
+#define MAX_NB_SESSIONS 200
#define MAX_NB_SAS 2
#define REPLAY_WIN_0 0
#define REPLAY_WIN_32 32
@@ -93,8 +93,8 @@ struct ipsec_test_cfg {
};
static const struct ipsec_test_cfg test_cfg[] = {
-
{REPLAY_WIN_0, ESN_DISABLED, 0, DATA_64_BYTES, 1, 0},
+ {REPLAY_WIN_0, ESN_DISABLED, 0, DATA_64_BYTES, BURST_SIZE, 0},
{REPLAY_WIN_0, ESN_DISABLED, 0, DATA_80_BYTES, BURST_SIZE,
REORDER_PKTS},
{REPLAY_WIN_32, ESN_ENABLED, 0, DATA_100_BYTES, 1, 0},
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 5/5] test/ipsec: improve debug in tests 12 and 13
2019-05-22 13:38 [dpdk-dev] [PATCH 1/5] test/ipsec: fix failures in tests 12 and 13 Bernard Iremonger
` (2 preceding siblings ...)
2019-05-22 13:38 ` [dpdk-dev] [PATCH 4/5] test/ipsec: add extra test configuration Bernard Iremonger
@ 2019-05-22 13:38 ` Bernard Iremonger
3 siblings, 0 replies; 5+ messages in thread
From: Bernard Iremonger @ 2019-05-22 13:38 UTC (permalink / raw)
To: dev, konstantin.ananyev, akhil.goyal; +Cc: Bernard Iremonger
Dump invalid mbuf data in case of error in tests 12 and 13
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
app/test/test_ipsec.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index b99e5f0..5d668cd 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -915,7 +915,7 @@ crypto_ipsec_2sa(void)
ut_params->obuf, grp, BURST_SIZE);
if (ng != BURST_SIZE) {
RTE_LOG(ERR, USER1, "rte_ipsec_pkt_crypto_group fail ng=%d\n",
- ng);
+ ng);
return TEST_FAILED;
}
@@ -923,7 +923,15 @@ crypto_ipsec_2sa(void)
for (i = 0; i < ng; i++) {
k = rte_ipsec_pkt_process(grp[i].id.ptr, grp[i].m, grp[i].cnt);
if (k != grp[i].cnt) {
- RTE_LOG(ERR, USER1, "rte_ipsec_pkt_process fail\n");
+ RTE_LOG(ERR, USER1,
+ "after rte_ipsec_pkt_process grp[%d].cnt=%d k=%d fail\n",
+ i, grp[i].cnt, k);
+ RTE_LOG(ERR, USER1,
+ "after rte_ipsec_pkt_process grp[%d].m=%p grp[%d].m[0]=%p\n",
+ i, grp[i].m, i, grp[i].m[0]);
+
+ rte_pktmbuf_dump(stdout, grp[i].m[0],
+ grp[i].m[0]->data_len);
return TEST_FAILED;
}
}
@@ -1061,7 +1069,14 @@ crypto_ipsec_2sa_4grp(void)
for (i = 0; i < ng; i++) {
k = rte_ipsec_pkt_process(grp[i].id.ptr, grp[i].m, grp[i].cnt);
if (k != grp[i].cnt) {
- RTE_LOG(ERR, USER1, "rte_ipsec_pkt_process fail\n");
+ RTE_LOG(ERR, USER1,
+ "rte_ipsec_pkt_process grp[%d].cnt=%d k=%d fail\n",
+ i, grp[i].cnt, k);
+ RTE_LOG(ERR, USER1,
+ "rte_ipsec_pkt_process grp[%d].m=%p grp[%d].m[%d]=%p\n",
+ i, grp[i].m, i, k, grp[i].m[k]);
+ rte_pktmbuf_dump(stdout, grp[i].m[k],
+ grp[i].m[k]->data_len);
return TEST_FAILED;
}
rc = crypto_ipsec_4grp_check_cnt(i, grp);
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-05-22 13:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22 13:38 [dpdk-dev] [PATCH 1/5] test/ipsec: fix failures in tests 12 and 13 Bernard Iremonger
2019-05-22 13:38 ` [dpdk-dev] [PATCH 2/5] test/ipsec: fix log messages in tests Bernard Iremonger
2019-05-22 13:38 ` [dpdk-dev] [PATCH 3/5] test/ipsec: reorder tests Bernard Iremonger
2019-05-22 13:38 ` [dpdk-dev] [PATCH 4/5] test/ipsec: add extra test configuration Bernard Iremonger
2019-05-22 13:38 ` [dpdk-dev] [PATCH 5/5] test/ipsec: improve debug in tests 12 and 13 Bernard Iremonger
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).