From: Vamsi Attunuru <vattun...@marvell.com> Handle SA soft packet and byte expiry event for Inline outbound SA.
Signed-off-by: Vamsi Attunuru <vattun...@marvell.com> --- drivers/net/cnxk/cn10k_ethdev_sec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/cnxk/cn10k_ethdev_sec.c b/drivers/net/cnxk/cn10k_ethdev_sec.c index 3ca707f038..ce1b10d885 100644 --- a/drivers/net/cnxk/cn10k_ethdev_sec.c +++ b/drivers/net/cnxk/cn10k_ethdev_sec.c @@ -428,7 +428,12 @@ cn10k_eth_sec_sso_work_cb(uint64_t *gw, void *args, uint32_t soft_exp_event) sa = (struct roc_ot_ipsec_outb_sa *)args; priv = roc_nix_inl_ot_ipsec_outb_sa_sw_rsvd(sa); desc.metadata = (uint64_t)priv->userdata; - desc.subtype = RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY; + if (sa->w2.s.life_unit == ROC_IE_OT_SA_LIFE_UNIT_PKTS) + desc.subtype = + RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY; + else + desc.subtype = + RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY; eth_dev = &rte_eth_devices[soft_exp_event >> 8]; rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_IPSEC, &desc); -- 2.25.1