get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/89115/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 89115,
    "url": "http://patchwork.dpdk.org/api/patches/89115/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210315103616.31364-4-ktejasree@marvell.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20210315103616.31364-4-ktejasree@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210315103616.31364-4-ktejasree@marvell.com",
    "date": "2021-03-15T10:36:16",
    "name": "[3/3] crypto/octeontx2: support lookaside IPv4 transport mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "db1b484e78bba0ed4a5bc956e1bb86aff1f39b58",
    "submitter": {
        "id": 1789,
        "url": "http://patchwork.dpdk.org/api/people/1789/?format=api",
        "name": "Tejasree Kondoj",
        "email": "ktejasree@marvell.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patchwork.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210315103616.31364-4-ktejasree@marvell.com/mbox/",
    "series": [
        {
            "id": 15655,
            "url": "http://patchwork.dpdk.org/api/series/15655/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=15655",
            "date": "2021-03-15T10:36:13",
            "name": "add lookaside IPsec UDP encapsulation and transport mode",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/15655/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/89115/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/89115/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id AA1B4A054F;\n\tMon, 15 Mar 2021 10:40:10 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 91F8D242602;\n\tMon, 15 Mar 2021 10:40:10 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 231D6242602\n for <dev@dpdk.org>; Mon, 15 Mar 2021 10:40:08 +0100 (CET)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id\n 12F9e8ow011357; Mon, 15 Mar 2021 02:40:08 -0700",
            "from dc6wp-exch01.marvell.com ([4.21.29.232])\n by mx0a-0016f401.pphosted.com with ESMTP id 378umtc4yx-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Mon, 15 Mar 2021 02:40:08 -0700",
            "from DC6WP-EXCH01.marvell.com (10.76.176.21) by\n DC6WP-EXCH01.marvell.com (10.76.176.21) with Microsoft SMTP Server (TLS) id\n 15.0.1497.2; Mon, 15 Mar 2021 05:40:00 -0400",
            "from maili.marvell.com (10.76.176.51) by DC6WP-EXCH01.marvell.com\n (10.76.176.21) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Mon, 15 Mar 2021 05:40:00 -0400",
            "from hyd1554T5810.caveonetworks.com.com (unknown [10.29.57.11])\n by maili.marvell.com (Postfix) with ESMTP id 559713F7041;\n Mon, 15 Mar 2021 02:39:58 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=+UAHqYHILlJft+8iFRStbtnsV2Bw10Os6nsj7Zc6k5A=;\n b=SpRFtNCSHg4Y/T0rsTn5ij7Mq2ONFImMYUANdo4PO4iZDp0HxUGlyc+7E+iUjRH8txTS\n M2OtOR8+njiYSSlVhfBWEglfZwCJCywLd3ggU+FezRzzcRyUNNzzmslj8dLbZEPttKXc\n WOhkZiO3Y8pu+dcCGMYFvtHx3x5bZsEd/krAsrbTCemJmmrSP+9W0mSIfjMZijZjUUXx\n 6Z0GJjsmLpLIQt4q4noa2ZcAPBfTl8SXMR3+vxurb2D4a5taTXioFhhbaEhQpKGIMfyI\n sqnNg0r7UiKojb04majz06Kkqg4F5U1h1RpfSdNduvtYimfNYH0kJKd8SWeYGcank7EK sA==",
        "From": "Tejasree Kondoj <ktejasree@marvell.com>",
        "To": "Akhil Goyal <gakhil@marvell.com>, Radu Nicolau <radu.nicolau@intel.com>",
        "CC": "Tejasree Kondoj <ktejasree@marvell.com>,\n Anoob Joseph <anoobj@marvell.com>,\n Ankur Dwivedi <adwivedi@marvell.com>, Jerin Jacob\n <jerinj@marvell.com>, <dev@dpdk.org>",
        "Date": "Mon, 15 Mar 2021 16:06:16 +0530",
        "Message-ID": "<20210315103616.31364-4-ktejasree@marvell.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20210315103616.31364-1-ktejasree@marvell.com>",
        "References": "<20210315103616.31364-1-ktejasree@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761\n definitions=2021-03-15_03:2021-03-15,\n 2021-03-15 signatures=0",
        "Subject": "[dpdk-dev] [PATCH 3/3] crypto/octeontx2: support lookaside IPv4\n transport mode",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Adding support for IPv4 lookaside IPsec transport mode.\n\nSigned-off-by: Tejasree Kondoj <ktejasree@marvell.com>\n---\n doc/guides/cryptodevs/octeontx2.rst           |   1 +\n drivers/crypto/octeontx2/otx2_cryptodev_ops.c |   7 +-\n drivers/crypto/octeontx2/otx2_cryptodev_sec.c | 110 ++++++++++--------\n drivers/crypto/octeontx2/otx2_cryptodev_sec.h |   4 +-\n drivers/crypto/octeontx2/otx2_ipsec_po.h      |   6 +\n drivers/crypto/octeontx2/otx2_ipsec_po_ops.h  |   8 +-\n 6 files changed, 76 insertions(+), 60 deletions(-)",
    "diff": "diff --git a/doc/guides/cryptodevs/octeontx2.rst b/doc/guides/cryptodevs/octeontx2.rst\nindex b30f98180a..811e61a1f6 100644\n--- a/doc/guides/cryptodevs/octeontx2.rst\n+++ b/doc/guides/cryptodevs/octeontx2.rst\n@@ -179,6 +179,7 @@ Features supported\n * IPv6\n * ESP\n * Tunnel mode\n+* Transport mode(IPv4)\n * ESN\n * Anti-replay\n * UDP Encapsulation\ndiff --git a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c\nindex cec20b5c6d..c20170bcaa 100644\n--- a/drivers/crypto/octeontx2/otx2_cryptodev_ops.c\n+++ b/drivers/crypto/octeontx2/otx2_cryptodev_ops.c\n@@ -928,7 +928,7 @@ otx2_cpt_sec_post_process(struct rte_crypto_op *cop, uintptr_t *rsp)\n \tstruct rte_mbuf *m = sym_op->m_src;\n \tstruct rte_ipv6_hdr *ip6;\n \tstruct rte_ipv4_hdr *ip;\n-\tuint16_t m_len;\n+\tuint16_t m_len = 0;\n \tint mdata_len;\n \tchar *data;\n \n@@ -938,11 +938,12 @@ otx2_cpt_sec_post_process(struct rte_crypto_op *cop, uintptr_t *rsp)\n \tif (word0->s.opcode.major == OTX2_IPSEC_PO_PROCESS_IPSEC_INB) {\n \t\tdata = rte_pktmbuf_mtod(m, char *);\n \n-\t\tif (rsp[4] == RTE_SECURITY_IPSEC_TUNNEL_IPV4) {\n+\t\tif (rsp[4] == OTX2_IPSEC_PO_TRANSPORT ||\n+\t\t    rsp[4] == OTX2_IPSEC_PO_TUNNEL_IPV4) {\n \t\t\tip = (struct rte_ipv4_hdr *)(data +\n \t\t\t\tOTX2_IPSEC_PO_INB_RPTR_HDR);\n \t\t\tm_len = rte_be_to_cpu_16(ip->total_length);\n-\t\t} else {\n+\t\t} else if (rsp[4] == OTX2_IPSEC_PO_TUNNEL_IPV6) {\n \t\t\tip6 = (struct rte_ipv6_hdr *)(data +\n \t\t\t\tOTX2_IPSEC_PO_INB_RPTR_HDR);\n \t\t\tm_len = rte_be_to_cpu_16(ip6->payload_len) +\ndiff --git a/drivers/crypto/octeontx2/otx2_cryptodev_sec.c b/drivers/crypto/octeontx2/otx2_cryptodev_sec.c\nindex 8942ff1fac..6493ce8370 100644\n--- a/drivers/crypto/octeontx2/otx2_cryptodev_sec.c\n+++ b/drivers/crypto/octeontx2/otx2_cryptodev_sec.c\n@@ -25,12 +25,15 @@ ipsec_lp_len_precalc(struct rte_security_ipsec_xform *ipsec,\n {\n \tstruct rte_crypto_sym_xform *cipher_xform, *auth_xform;\n \n-\tif (ipsec->tunnel.type == RTE_SECURITY_IPSEC_TUNNEL_IPV4)\n-\t\tlp->partial_len = sizeof(struct rte_ipv4_hdr);\n-\telse if (ipsec->tunnel.type == RTE_SECURITY_IPSEC_TUNNEL_IPV6)\n-\t\tlp->partial_len = sizeof(struct rte_ipv6_hdr);\n-\telse\n-\t\treturn -EINVAL;\n+\tlp->partial_len = 0;\n+\tif (ipsec->mode == RTE_SECURITY_IPSEC_SA_MODE_TUNNEL) {\n+\t\tif (ipsec->tunnel.type == RTE_SECURITY_IPSEC_TUNNEL_IPV4)\n+\t\t\tlp->partial_len = sizeof(struct rte_ipv4_hdr);\n+\t\telse if (ipsec->tunnel.type == RTE_SECURITY_IPSEC_TUNNEL_IPV6)\n+\t\t\tlp->partial_len = sizeof(struct rte_ipv6_hdr);\n+\t\telse\n+\t\t\treturn -EINVAL;\n+\t}\n \n \tif (ipsec->proto == RTE_SECURITY_IPSEC_SA_PROTO_ESP) {\n \t\tlp->partial_len += sizeof(struct rte_esp_hdr);\n@@ -203,7 +206,7 @@ crypto_sec_ipsec_outb_session_create(struct rte_cryptodev *crypto_dev,\n \t\t\t\t     struct rte_security_session *sec_sess)\n {\n \tstruct rte_crypto_sym_xform *auth_xform, *cipher_xform;\n-\tstruct otx2_ipsec_po_ip_template *template;\n+\tstruct otx2_ipsec_po_ip_template *template = NULL;\n \tconst uint8_t *cipher_key, *auth_key;\n \tstruct otx2_sec_session_ipsec_lp *lp;\n \tstruct otx2_ipsec_po_sa_ctl *ctl;\n@@ -229,10 +232,10 @@ crypto_sec_ipsec_outb_session_create(struct rte_cryptodev *crypto_dev,\n \tmemset(sa, 0, sizeof(struct otx2_ipsec_po_out_sa));\n \n \t/* Initialize lookaside ipsec private data */\n+\tlp->mode_type = OTX2_IPSEC_PO_TRANSPORT;\n \tlp->ip_id = 0;\n \tlp->seq_lo = 1;\n \tlp->seq_hi = 0;\n-\tlp->tunnel_type = ipsec->tunnel.type;\n \n \tret = ipsec_po_sa_ctl_set(ipsec, crypto_xform, ctl);\n \tif (ret)\n@@ -242,46 +245,47 @@ crypto_sec_ipsec_outb_session_create(struct rte_cryptodev *crypto_dev,\n \tif (ret)\n \t\treturn ret;\n \n-\tif (ipsec->mode == RTE_SECURITY_IPSEC_SA_MODE_TUNNEL) {\n-\t\t/* Start ip id from 1 */\n-\t\tlp->ip_id = 1;\n+\t/* Start ip id from 1 */\n+\tlp->ip_id = 1;\n+\n+\tif (ctl->enc_type == OTX2_IPSEC_PO_SA_ENC_AES_GCM) {\n+\t\ttemplate = &sa->aes_gcm.template;\n+\t\tctx_len = offsetof(struct otx2_ipsec_po_out_sa,\n+\t\t\t\taes_gcm.template) + sizeof(\n+\t\t\t\tsa->aes_gcm.template.ip4);\n+\t\tctx_len = RTE_ALIGN_CEIL(ctx_len, 8);\n+\t\tlp->ctx_len = ctx_len >> 3;\n+\t} else if (ctl->auth_type ==\n+\t\t\tOTX2_IPSEC_PO_SA_AUTH_SHA1) {\n+\t\ttemplate = &sa->sha1.template;\n+\t\tctx_len = offsetof(struct otx2_ipsec_po_out_sa,\n+\t\t\t\tsha1.template) + sizeof(\n+\t\t\t\tsa->sha1.template.ip4);\n+\t\tctx_len = RTE_ALIGN_CEIL(ctx_len, 8);\n+\t\tlp->ctx_len = ctx_len >> 3;\n+\t} else if (ctl->auth_type ==\n+\t\t\tOTX2_IPSEC_PO_SA_AUTH_SHA2_256) {\n+\t\ttemplate = &sa->sha2.template;\n+\t\tctx_len = offsetof(struct otx2_ipsec_po_out_sa,\n+\t\t\t\tsha2.template) + sizeof(\n+\t\t\t\tsa->sha2.template.ip4);\n+\t\tctx_len = RTE_ALIGN_CEIL(ctx_len, 8);\n+\t\tlp->ctx_len = ctx_len >> 3;\n+\t} else {\n+\t\treturn -EINVAL;\n+\t}\n+\tip = &template->ip4.ipv4_hdr;\n+\tif (ipsec->options.udp_encap) {\n+\t\tip->next_proto_id = IPPROTO_UDP;\n+\t\ttemplate->ip4.udp_src = rte_be_to_cpu_16(4500);\n+\t\ttemplate->ip4.udp_dst = rte_be_to_cpu_16(4500);\n+\t} else {\n+\t\tip->next_proto_id = IPPROTO_ESP;\n+\t}\n \n+\tif (ipsec->mode == RTE_SECURITY_IPSEC_SA_MODE_TUNNEL) {\n \t\tif (ipsec->tunnel.type == RTE_SECURITY_IPSEC_TUNNEL_IPV4) {\n-\n-\t\t\tif (ctl->enc_type == OTX2_IPSEC_PO_SA_ENC_AES_GCM) {\n-\t\t\t\ttemplate = &sa->aes_gcm.template;\n-\t\t\t\tctx_len = offsetof(struct otx2_ipsec_po_out_sa,\n-\t\t\t\t\t\taes_gcm.template) + sizeof(\n-\t\t\t\t\t\tsa->aes_gcm.template.ip4);\n-\t\t\t\tctx_len = RTE_ALIGN_CEIL(ctx_len, 8);\n-\t\t\t\tlp->ctx_len = ctx_len >> 3;\n-\t\t\t} else if (ctl->auth_type ==\n-\t\t\t\t\tOTX2_IPSEC_PO_SA_AUTH_SHA1) {\n-\t\t\t\ttemplate = &sa->sha1.template;\n-\t\t\t\tctx_len = offsetof(struct otx2_ipsec_po_out_sa,\n-\t\t\t\t\t\tsha1.template) + sizeof(\n-\t\t\t\t\t\tsa->sha1.template.ip4);\n-\t\t\t\tctx_len = RTE_ALIGN_CEIL(ctx_len, 8);\n-\t\t\t\tlp->ctx_len = ctx_len >> 3;\n-\t\t\t} else if (ctl->auth_type ==\n-\t\t\t\t\tOTX2_IPSEC_PO_SA_AUTH_SHA2_256) {\n-\t\t\t\ttemplate = &sa->sha2.template;\n-\t\t\t\tctx_len = offsetof(struct otx2_ipsec_po_out_sa,\n-\t\t\t\t\t\tsha2.template) + sizeof(\n-\t\t\t\t\t\tsa->sha2.template.ip4);\n-\t\t\t\tctx_len = RTE_ALIGN_CEIL(ctx_len, 8);\n-\t\t\t\tlp->ctx_len = ctx_len >> 3;\n-\t\t\t} else {\n-\t\t\t\treturn -EINVAL;\n-\t\t\t}\n-\t\t\tip = &template->ip4.ipv4_hdr;\n-\t\t\tif (ipsec->options.udp_encap) {\n-\t\t\t\tip->next_proto_id = IPPROTO_UDP;\n-\t\t\t\ttemplate->ip4.udp_src = rte_be_to_cpu_16(4500);\n-\t\t\t\ttemplate->ip4.udp_dst = rte_be_to_cpu_16(4500);\n-\t\t\t} else {\n-\t\t\t\tip->next_proto_id = IPPROTO_ESP;\n-\t\t\t}\n+\t\t\tlp->mode_type = OTX2_IPSEC_PO_TUNNEL_IPV4;\n \t\t\tip->version_ihl = RTE_IPV4_VHL_DEF;\n \t\t\tip->time_to_live = ipsec->tunnel.ipv4.ttl;\n \t\t\tip->type_of_service |= (ipsec->tunnel.ipv4.dscp << 2);\n@@ -294,6 +298,7 @@ crypto_sec_ipsec_outb_session_create(struct rte_cryptodev *crypto_dev,\n \t\t} else if (ipsec->tunnel.type ==\n \t\t\t\tRTE_SECURITY_IPSEC_TUNNEL_IPV6) {\n \n+\t\t\tlp->mode_type = OTX2_IPSEC_PO_TUNNEL_IPV6;\n \t\t\tif (ctl->enc_type == OTX2_IPSEC_PO_SA_ENC_AES_GCM) {\n \t\t\t\tip6 = &sa->aes_gcm.template.ip6.ipv6_hdr;\n \t\t\t\tctx_len = offsetof(struct otx2_ipsec_po_out_sa,\n@@ -336,11 +341,7 @@ crypto_sec_ipsec_outb_session_create(struct rte_cryptodev *crypto_dev,\n \t\t\t\tsizeof(struct in6_addr));\n \t\t\tmemcpy(&ip6->dst_addr, &ipsec->tunnel.ipv6.dst_addr,\n \t\t\t\tsizeof(struct in6_addr));\n-\t\t} else {\n-\t\t\treturn -EINVAL;\n \t\t}\n-\t} else {\n-\t\treturn -EINVAL;\n \t}\n \n \tcipher_xform = crypto_xform;\n@@ -421,13 +422,20 @@ crypto_sec_ipsec_inb_session_create(struct rte_cryptodev *crypto_dev,\n \tif (ret)\n \t\treturn ret;\n \n-\tlp->tunnel_type = ipsec->tunnel.type;\n+\tlp->mode_type = OTX2_IPSEC_PO_TRANSPORT;\n+\n \tauth_xform = crypto_xform;\n \tcipher_xform = crypto_xform->next;\n \n \tcipher_key_len = 0;\n \tauth_key_len = 0;\n \n+\tif (ipsec->mode == RTE_SECURITY_IPSEC_SA_MODE_TUNNEL)\n+\t\tlp->mode_type = (ipsec->tunnel.type ==\n+\t\t\t\tRTE_SECURITY_IPSEC_TUNNEL_IPV4) ?\n+\t\t\t\tOTX2_IPSEC_PO_TUNNEL_IPV4 :\n+\t\t\t\tOTX2_IPSEC_PO_TUNNEL_IPV6;\n+\n \tif (crypto_xform->type == RTE_CRYPTO_SYM_XFORM_AEAD) {\n \t\tif (crypto_xform->aead.algo == RTE_CRYPTO_AEAD_AES_GCM)\n \t\t\tmemcpy(sa->iv.gcm.nonce, &ipsec->salt, 4);\ndiff --git a/drivers/crypto/octeontx2/otx2_cryptodev_sec.h b/drivers/crypto/octeontx2/otx2_cryptodev_sec.h\nindex 2849c1ab75..87f55c97fe 100644\n--- a/drivers/crypto/octeontx2/otx2_cryptodev_sec.h\n+++ b/drivers/crypto/octeontx2/otx2_cryptodev_sec.h\n@@ -55,8 +55,8 @@ struct otx2_sec_session_ipsec_lp {\n \tuint8_t iv_length;\n \t/** Auth IV length in bytes */\n \tuint8_t auth_iv_length;\n-\t/** IPsec tunnel type */\n-\tenum rte_security_ipsec_tunnel_type tunnel_type;\n+\t/** IPsec mode and tunnel type */\n+\tenum otx2_ipsec_po_mode_type mode_type;\n };\n \n int otx2_crypto_sec_ctx_create(struct rte_cryptodev *crypto_dev);\ndiff --git a/drivers/crypto/octeontx2/otx2_ipsec_po.h b/drivers/crypto/octeontx2/otx2_ipsec_po.h\nindex 8a672a38ea..faa434dae3 100644\n--- a/drivers/crypto/octeontx2/otx2_ipsec_po.h\n+++ b/drivers/crypto/octeontx2/otx2_ipsec_po.h\n@@ -20,6 +20,12 @@\n \n #define OTX2_IPSEC_PO_INB_RPTR_HDR         0x8\n \n+enum otx2_ipsec_po_mode_type {\n+\tOTX2_IPSEC_PO_TRANSPORT = 1,\n+\tOTX2_IPSEC_PO_TUNNEL_IPV4,\n+\tOTX2_IPSEC_PO_TUNNEL_IPV6,\n+};\n+\n enum otx2_ipsec_po_comp_e {\n \tOTX2_IPSEC_PO_CC_SUCCESS = 0x00,\n \tOTX2_IPSEC_PO_CC_AUTH_UNSUPPORTED = 0xB0,\ndiff --git a/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h b/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h\nindex f4cab19811..58b199f4f3 100644\n--- a/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h\n+++ b/drivers/crypto/octeontx2/otx2_ipsec_po_ops.h\n@@ -26,7 +26,7 @@ otx2_ipsec_po_out_rlen_get(struct otx2_sec_session_ipsec_lp *sess,\n \n static __rte_always_inline struct cpt_request_info *\n alloc_request_struct(char *maddr, void *cop, int mdata_len,\n-\t\t     enum rte_security_ipsec_tunnel_type tunnel_type)\n+\t\t     enum otx2_ipsec_po_mode_type mode_type)\n {\n \tstruct cpt_request_info *req;\n \tstruct cpt_meta_info *meta;\n@@ -48,7 +48,7 @@ alloc_request_struct(char *maddr, void *cop, int mdata_len,\n \top[1] = (uintptr_t)cop;\n \top[2] = (uintptr_t)req;\n \top[3] = mdata_len;\n-\top[4] = tunnel_type;\n+\top[4] = mode_type;\n \n \treturn req;\n }\n@@ -89,7 +89,7 @@ process_outb_sa(struct rte_crypto_op *cop,\n \n \tmdata += extend_tail; /* mdata follows encrypted data */\n \treq = alloc_request_struct(mdata, (void *)cop, mdata_len,\n-\t\tsess->tunnel_type);\n+\t\tsess->mode_type);\n \n \tdata = rte_pktmbuf_prepend(m_src, extend_head);\n \tif (unlikely(data == NULL)) {\n@@ -162,7 +162,7 @@ process_inb_sa(struct rte_crypto_op *cop,\n \t}\n \n \treq = alloc_request_struct(mdata, (void *)cop, mdata_len,\n-\t\tsess->tunnel_type);\n+\t\tsess->mode_type);\n \n \t/* Prepare CPT instruction */\n \tword0.u64 = sess->ucmd_w0;\n",
    "prefixes": [
        "3/3"
    ]
}