[2/3] app/crypto-perf: fix invalid SPI
Checks
Commit Message
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 <anoobj@marvell.com>
---
app/test-crypto-perf/cperf_ops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -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.
*/