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 79E13A0032; Fri, 18 Feb 2022 13:49:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4DF7140150; Fri, 18 Feb 2022 13:49:54 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id C15A840141 for ; Fri, 18 Feb 2022 13:49:52 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 21IBIVJv025649 for ; Fri, 18 Feb 2022 04:49:52 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=+0OWho+EFr3MI5EXlr5VFXgM7eECgcoDsOEVtUzrBsE=; b=janiwZjOUdxUQdzpUkPWNMtophEGPz3ul6qvvt6VJrCtY4M0A3Qbns3F7pbJEsQXigJe 5Xd5dZj8KZ6+uYBPZo1I/cdp7SeoxXHITAiO4gJeLi9pgDYlhgHZtAC9/pH2/5mHeToR eZjveOSDDfBcvaayTGudZPt3UOf9wlRpLhWjFLhQEas0nhKBkNqf0qfh6GaJgZOr8Qom PJLlYpApg1yGYKxEcTS7VpL2wve/bYy0KySxS29HK4civ2BXzr+F2RZgBIIwJ+7Hl5jX mXnTt7CdOnGzbJrDL9d7FhZy7KVXfVka2S/k7rVSP+lNZgkpadFWjueRizD57LzsSFAe fA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3e9kktwwua-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 18 Feb 2022 04:49:52 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 18 Feb 2022 04:49:49 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Fri, 18 Feb 2022 04:49:49 -0800 Received: from localhost.localdomain (unknown [10.28.34.39]) by maili.marvell.com (Postfix) with ESMTP id E28153F706F; Fri, 18 Feb 2022 04:49:47 -0800 (PST) From: Volodymyr Fialko To: , Ankur Dwivedi , Anoob Joseph , Tejasree Kondoj CC: , Volodymyr Fialko Subject: [PATCH] crypto/cnxk: support for TTL or hop limit decrement Date: Fri, 18 Feb 2022 13:49:23 +0100 Message-ID: <20220218124923.488904-1-vfialko@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: fsRHgzHN7MavNiKPkkk2XD5iesFEmKkM X-Proofpoint-GUID: fsRHgzHN7MavNiKPkkk2XD5iesFEmKkM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-18_05,2022-02-18_01,2021-12-02_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 Add support for TTL if IPv4 or hop limit if IPv6 decrement for cn10k. Signed-off-by: Volodymyr Fialko Acked-by: Anoob Joseph --- drivers/crypto/cnxk/cn10k_ipsec.c | 2 ++ drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/crypto/cnxk/cn10k_ipsec.c b/drivers/crypto/cnxk/cn10k_ipsec.c index 847e1d026e..15ebd57f52 100644 --- a/drivers/crypto/cnxk/cn10k_ipsec.c +++ b/drivers/crypto/cnxk/cn10k_ipsec.c @@ -102,6 +102,8 @@ cn10k_ipsec_outb_sa_create(struct roc_cpt *roc_cpt, struct roc_cpt_lf *lf, param1.u16 = 0; + param1.s.ttl_or_hop_limit = ipsec_xfrm->options.dec_ttl; + /* Disable IP checksum computation by default */ param1.s.ip_csum_disable = ROC_IE_OT_SA_INNER_PKT_IP_CSUM_DISABLE; diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c b/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c index 7347f6d221..2f8001e0b2 100644 --- a/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c +++ b/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c @@ -1144,6 +1144,7 @@ cn10k_sec_caps_update(struct rte_security_capability *sec_cap) sec_cap->ipsec.options.tunnel_hdr_verify = RTE_SECURITY_IPSEC_TUNNEL_VERIFY_SRC_DST_ADDR; } + sec_cap->ipsec.options.dec_ttl = 1; sec_cap->ipsec.options.ip_csum_enable = 1; sec_cap->ipsec.options.l4_csum_enable = 1; sec_cap->ipsec.options.stats = 1; -- 2.25.1