From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9824BA00C2; Thu, 13 Oct 2022 13:42:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F39542F26; Thu, 13 Oct 2022 13:42:30 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id B751142F24 for ; Thu, 13 Oct 2022 13:42:28 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29DABO5Y025278 for ; Thu, 13 Oct 2022 04:42:28 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=UOgsU1Cpp+KBBRqJGM9fPJmrGl+77m3z4msIxsf9YGE=; b=MBzhRoGyZkLzXPYMthDPGSNolfZja8rvekid92uuRuS+E4kpb2UaGcd4EUQpybflL4gi m4PG6ylELvVRyJn5FYPKRZ6GcNXACzLeOzARD6NywTyuAIJaMM8ZT37B9cKlT9iIZAgG ieWqq6kgu5kOn+6MWNrky5wkQrk4axlPi2p6aXH/MWCcN8WF+hh7dhqYhBLckkiXXDjF +52jXXrZXGEBUtEtxlSAaqFYQzQBr49KIb4JsqumEZ4N3wGoR2S3I2HaApLlp+5YAUqn iBLTdkl0KTpCTPPuSWI0YpZfLaX+M4FnaBBXBfhZPfPvDjapvx6wX5w5bgICpqBjjX83 mA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3k67nqacew-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 13 Oct 2022 04:42:27 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 13 Oct 2022 04:42:26 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 13 Oct 2022 04:42:26 -0700 Received: from localhost.localdomain (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id ABF853F7045; Thu, 13 Oct 2022 04:42:23 -0700 (PDT) From: Nithin Dabilpuram To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , , Vamsi Attunuru Subject: [PATCH v2 09/13] net/cnxk: handle SA soft packet and byte expiry events Date: Thu, 13 Oct 2022 17:11:52 +0530 Message-ID: <20221013114156.996517-9-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221013114156.996517-1-ndabilpuram@marvell.com> References: <20221011120135.45846-1-ndabilpuram@marvell.com> <20221013114156.996517-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: 12zajD8lYNwr7eBKcq-LNcE8KkA71qh- X-Proofpoint-ORIG-GUID: 12zajD8lYNwr7eBKcq-LNcE8KkA71qh- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-13_07,2022-10-13_01,2022-06-22_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Vamsi Attunuru Handle SA soft packet and byte expiry event for Inline outbound SA. Signed-off-by: Nithin Dabilpuram --- 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