* [dpdk-dev] [PATCH] crypto/octeontx2: fix ESN seqhi
@ 2021-10-28 7:22 Archana Muniganti
2021-10-28 7:24 ` Anoob Joseph
0 siblings, 1 reply; 3+ messages in thread
From: Archana Muniganti @ 2021-10-28 7:22 UTC (permalink / raw)
To: gakhil, bluca, ktraynor
Cc: Archana Muniganti, anoobj, adwivedi, ktejasree, dev, stable
For current pkt, previous seqhi is used instead of its
guessed seqhi. Fixed it.
Fixes: 5be562bc5b78 ("crypto/octeontx2: support IPsec ESN and anti-replay")
Cc: stable@dpdk.org
Signed-off-by: Archana Muniganti <marchana@marvell.com>
---
drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
index f0b72e05c2..4330cbd1c1 100644
--- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
+++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c
@@ -736,6 +736,14 @@ otx2_cpt_enqueue_sec(struct otx2_cpt_qp *qp, struct rte_crypto_op *op,
otx2_err("Anti replay check failed");
return IPSEC_ANTI_REPLAY_FAILED;
}
+
+ if (esn) {
+ seq_in_sa = ((uint64_t)esn_hi << 32) | esn_low;
+ if (seq > seq_in_sa) {
+ sa->esn_low = rte_cpu_to_be_32(seql);
+ sa->esn_hi = rte_cpu_to_be_32(seqh);
+ }
+ }
}
ret = process_inb_sa(op, sess, &qp->meta_info, (void **)&req);
@@ -749,14 +757,6 @@ otx2_cpt_enqueue_sec(struct otx2_cpt_qp *qp, struct rte_crypto_op *op,
ret = otx2_cpt_enqueue_req(qp, pend_q, req, op, sess->cpt_inst_w7,
burst_index);
- if (winsz && esn) {
- seq_in_sa = ((uint64_t)esn_hi << 32) | esn_low;
- if (seq > seq_in_sa) {
- sa->esn_low = rte_cpu_to_be_32(seql);
- sa->esn_hi = rte_cpu_to_be_32(seqh);
- }
- }
-
return ret;
}
--
2.22.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] crypto/octeontx2: fix ESN seqhi
2021-10-28 7:22 [dpdk-dev] [PATCH] crypto/octeontx2: fix ESN seqhi Archana Muniganti
@ 2021-10-28 7:24 ` Anoob Joseph
2021-10-31 20:36 ` Akhil Goyal
0 siblings, 1 reply; 3+ messages in thread
From: Anoob Joseph @ 2021-10-28 7:24 UTC (permalink / raw)
To: Archana Muniganti, Akhil Goyal, bluca, ktraynor
Cc: Archana Muniganti, Ankur Dwivedi, Tejasree Kondoj, dev, stable
> Subject: [PATCH] crypto/octeontx2: fix ESN seqhi
>
> For current pkt, previous seqhi is used instead of its guessed seqhi. Fixed it.
>
> Fixes: 5be562bc5b78 ("crypto/octeontx2: support IPsec ESN and anti-replay")
> Cc: stable@dpdk.org
>
> Signed-off-by: Archana Muniganti <marchana@marvell.com>
> ---
> drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
Acked-by: Anoob Joseph <anoobj@marvell.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] crypto/octeontx2: fix ESN seqhi
2021-10-28 7:24 ` Anoob Joseph
@ 2021-10-31 20:36 ` Akhil Goyal
0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2021-10-31 20:36 UTC (permalink / raw)
To: Anoob Joseph, Archana Muniganti, bluca, ktraynor
Cc: Archana Muniganti, Ankur Dwivedi, Tejasree Kondoj, dev, stable
> > Subject: [PATCH] crypto/octeontx2: fix ESN seqhi
> >
> > For current pkt, previous seqhi is used instead of its guessed seqhi. Fixed it.
> >
> > Fixes: 5be562bc5b78 ("crypto/octeontx2: support IPsec ESN and anti-
> replay")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Archana Muniganti <marchana@marvell.com>
> > ---
> > drivers/crypto/octeontx2/otx2_cryptodev_ops.c | 16 ++++++++--------
> > 1 file changed, 8 insertions(+), 8 deletions(-)
> >
>
> Acked-by: Anoob Joseph <anoobj@marvell.com>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-31 20:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28 7:22 [dpdk-dev] [PATCH] crypto/octeontx2: fix ESN seqhi Archana Muniganti
2021-10-28 7:24 ` Anoob Joseph
2021-10-31 20:36 ` 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).