As per IPsec specification (RFC 4303) SPI zero is reserved. Using lcore_id directly would mean SPI 0 would also be attempted. This may lead to failure on an otherwise compliant implementation.
Fixes: 28dde5da503e ("app/crypto-perf: support lookaside IPsec") Signed-off-by: Anoob Joseph <ano...@marvell.com> --- app/test-crypto-perf/cperf_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c index 61a3967697..4a1c9feb1c 100644 --- a/app/test-crypto-perf/cperf_ops.c +++ b/app/test-crypto-perf/cperf_ops.c @@ -722,7 +722,7 @@ create_ipsec_session(struct rte_mempool *sess_mp, .action_type = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL, .protocol = RTE_SECURITY_PROTOCOL_IPSEC, {.ipsec = { - .spi = rte_lcore_id(), + .spi = rte_lcore_id() + 1, /**< For testing sake, lcore_id is taken as SPI so that * for every core a different session is created. */ -- 2.25.1