net/iavf: update IPsec ESN values when updating session

When updating an ingress session update the internal values before
making the virtual channel request.

Fixes: 6bc987ecb8 ("net/iavf: support IPsec inline crypto")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This commit is contained in:
Radu Nicolau 2022-08-29 10:50:25 +01:00 committed by Qi Zhang
parent 4e868408bf
commit eb944b5906

View File

@ -893,11 +893,12 @@ iavf_ipsec_crypto_session_update(void *device,
* iavf_security_session for outbound SA for use
* in *iavf_ipsec_crypto_pkt_metadata_set* function.
*/
iavf_sess->esn.hi = conf->ipsec.esn.hi;
iavf_sess->esn.low = conf->ipsec.esn.low;
if (iavf_sess->direction == RTE_SECURITY_IPSEC_SA_DIR_INGRESS)
rc = iavf_ipsec_crypto_sa_update_esn(adapter,
iavf_sess);
else
iavf_sess->esn.hi = conf->ipsec.esn.hi;
}
return rc;