Initialize the sequence number of ESP to 1.
Signed-off-by: Gagandeep Singh <[email protected]>
---
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index e115007cfd..eed66d721f 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -3143,6 +3143,11 @@ dpaa2_sec_set_ipsec_session(struct rte_cryptodev *dev,
if (ipsec_xform->options.iv_gen_disable == 0)
encap_pdb.options |= PDBOPTS_ESP_IVSRC;
+ /* Initializing the sequence number to 1, Security
+ * engine will choose this sequence number for first packet
+ * Refer: RFC4303 section: 3.3.3.Sequence Number Generation
+ */
+ encap_pdb.seq_num = 1;
if (ipsec_xform->options.esn) {
encap_pdb.options |= PDBOPTS_ESP_ESN;
encap_pdb.seq_num_ext_hi = conf->ipsec.esn.hi;
--
2.25.1