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 695F4A0503; Sun, 8 May 2022 08:28:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4ADED42829; Sun, 8 May 2022 08:27:25 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 5E63F4287E for ; Sun, 8 May 2022 08:27:24 +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 2485rdti011875 for ; Sat, 7 May 2022 23:27:23 -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-type; s=pfpt0220; bh=bjypeDXgn0LhIYauEEeHTJat0pxgvxuMEBERJxnsihw=; b=XE9m8V5x8RfWa4c+fFuaBm25fLhckt8QgRvJ36NYW3l8wHRKBcSzv53OLPlSSYPYQebN AGxlFfWtJoYq9Tn/2f59NTHlUUm+ynIu5msFO09kXkDmeGAfu5IidvVHAurZcJ8oqqkq wxbIa3lPeRbQQJa2lHjrd7pZRPCGaNbElFkHQD5aBT5AXqWCmw7SAV428xYqalTjcvvr CpAyR/HcTLk2/pIW7DuJEMGuPZNiLJwaW4f/Kpgc4y6pG0EpzNlccC9QYbffD3qr6DhF KRaQ5bPmxJ85KV86/WVCYGZBpkp1Cto1PrJRaLdqJ9zHLhaTvwwSui3tnXZ7817dsZHj Rg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3fwp4psyq7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sat, 07 May 2022 23:27:23 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sat, 7 May 2022 23:27:21 -0700 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; Sat, 7 May 2022 23:27:21 -0700 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 486635B692B; Sat, 7 May 2022 23:27:19 -0700 (PDT) From: Nithin Dabilpuram To: , Nithin Dabilpuram , "Kiran Kumar K" , Sunil Kumar Kori , Satha Rao CC: , Akhil Goyal , Vamsi Attunuru Subject: [PATCH v4 22/28] net/cnxk: add capabilities for IPsec options Date: Sun, 8 May 2022 11:56:10 +0530 Message-ID: <20220508062616.3398-22-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20220508062616.3398-1-ndabilpuram@marvell.com> References: <20220419055921.10566-1-ndabilpuram@marvell.com> <20220508062616.3398-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: vCdz9LoKK5S9F4Ai2l9o7cBJDNhv2Qfa X-Proofpoint-GUID: vCdz9LoKK5S9F4Ai2l9o7cBJDNhv2Qfa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-08_02,2022-05-06_01,2022-02-23_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: Akhil Goyal Added supported capabilities for various IPsec SA options. Signed-off-by: Akhil Goyal Signed-off-by: Vamsi Attunuru --- drivers/net/cnxk/cn10k_ethdev_sec.c | 57 ++++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/drivers/net/cnxk/cn10k_ethdev_sec.c b/drivers/net/cnxk/cn10k_ethdev_sec.c index 6a3e636..7e4941d 100644 --- a/drivers/net/cnxk/cn10k_ethdev_sec.c +++ b/drivers/net/cnxk/cn10k_ethdev_sec.c @@ -259,7 +259,20 @@ static const struct rte_security_capability cn10k_eth_sec_capabilities[] = { .proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP, .mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL, .direction = RTE_SECURITY_IPSEC_SA_DIR_INGRESS, - .options = { 0 } + .replay_win_sz_max = ROC_AR_WIN_SIZE_MAX, + .options = { + .udp_encap = 1, + .udp_ports_verify = 1, + .copy_df = 1, + .copy_dscp = 1, + .copy_flabel = 1, + .tunnel_hdr_verify = RTE_SECURITY_IPSEC_TUNNEL_VERIFY_SRC_DST_ADDR, + .dec_ttl = 1, + .ip_csum_enable = 1, + .l4_csum_enable = 1, + .stats = 0, + .esn = 1, + }, }, .crypto_capabilities = cn10k_eth_sec_crypto_caps, .ol_flags = RTE_SECURITY_TX_OLOAD_NEED_MDATA @@ -271,7 +284,20 @@ static const struct rte_security_capability cn10k_eth_sec_capabilities[] = { .proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP, .mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL, .direction = RTE_SECURITY_IPSEC_SA_DIR_EGRESS, - .options = { 0 } + .replay_win_sz_max = ROC_AR_WIN_SIZE_MAX, + .options = { + .iv_gen_disable = 1, + .udp_encap = 1, + .udp_ports_verify = 1, + .copy_df = 1, + .copy_dscp = 1, + .copy_flabel = 1, + .dec_ttl = 1, + .ip_csum_enable = 1, + .l4_csum_enable = 1, + .stats = 0, + .esn = 1, + }, }, .crypto_capabilities = cn10k_eth_sec_crypto_caps, .ol_flags = RTE_SECURITY_TX_OLOAD_NEED_MDATA @@ -283,7 +309,19 @@ static const struct rte_security_capability cn10k_eth_sec_capabilities[] = { .proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP, .mode = RTE_SECURITY_IPSEC_SA_MODE_TRANSPORT, .direction = RTE_SECURITY_IPSEC_SA_DIR_EGRESS, - .options = { 0 } + .replay_win_sz_max = ROC_AR_WIN_SIZE_MAX, + .options = { + .iv_gen_disable = 1, + .udp_encap = 1, + .udp_ports_verify = 1, + .copy_df = 1, + .copy_dscp = 1, + .dec_ttl = 1, + .ip_csum_enable = 1, + .l4_csum_enable = 1, + .stats = 0, + .esn = 1, + }, }, .crypto_capabilities = cn10k_eth_sec_crypto_caps, .ol_flags = RTE_SECURITY_TX_OLOAD_NEED_MDATA @@ -295,7 +333,18 @@ static const struct rte_security_capability cn10k_eth_sec_capabilities[] = { .proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP, .mode = RTE_SECURITY_IPSEC_SA_MODE_TRANSPORT, .direction = RTE_SECURITY_IPSEC_SA_DIR_INGRESS, - .options = { 0 } + .replay_win_sz_max = ROC_AR_WIN_SIZE_MAX, + .options = { + .udp_encap = 1, + .udp_ports_verify = 1, + .copy_df = 1, + .copy_dscp = 1, + .dec_ttl = 1, + .ip_csum_enable = 1, + .l4_csum_enable = 1, + .stats = 0, + .esn = 1, + }, }, .crypto_capabilities = cn10k_eth_sec_crypto_caps, .ol_flags = RTE_SECURITY_TX_OLOAD_NEED_MDATA -- 2.8.4