Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/90351/?format=api
http://patchwork.dpdk.org/api/patches/90351/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210401112623.20951-2-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": "<20210401112623.20951-2-ktejasree@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210401112623.20951-2-ktejasree@marvell.com", "date": "2021-04-01T11:26:20", "name": "[v2,1/4] crypto/octeontx2: add UDP encapsulation support", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "7f7a40ebda45cdd2232217025e68afa0729cbcdd", "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/20210401112623.20951-2-ktejasree@marvell.com/mbox/", "series": [ { "id": 16054, "url": "http://patchwork.dpdk.org/api/series/16054/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=16054", "date": "2021-04-01T11:26:19", "name": "add lookaside IPsec UDP encapsulation and transport mode", "version": 2, "mbox": "http://patchwork.dpdk.org/series/16054/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/90351/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/90351/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 EBAB1A0548;\n\tThu, 1 Apr 2021 12:30:17 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A8A9D140FBC;\n\tThu, 1 Apr 2021 12:30:14 +0200 (CEST)", "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 360BB140FBA\n for <dev@dpdk.org>; Thu, 1 Apr 2021 12:30:13 +0200 (CEST)", "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 131APd1R004932; Thu, 1 Apr 2021 03:30:12 -0700", "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com with ESMTP id 37n28j229a-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 01 Apr 2021 03:30:12 -0700", "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Thu, 1 Apr 2021 03:30:10 -0700", "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Thu, 1 Apr 2021 03:30:10 -0700", "from hyd1554T5810.caveonetworks.com.com (unknown [10.29.57.11])\n by maili.marvell.com (Postfix) with ESMTP id 88BAC3F7054;\n Thu, 1 Apr 2021 03:30:08 -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=IDWVh3wwpn5YZ/J40Wzy0F1suXHe6MG0Haf0NDXh0sA=;\n b=IFN5/0UwMVsRWH2i1blhfhCRhvMU/PfKSiwEmcbpGMhsjAtSF6cqY21fKIyuguEQk9ei\n /5qacblA5Ky3O0ni2DXv5BhM9yNQNKol60Updy+GJZN43beSRgiji8fEUjtJQ4tIsrp/\n +T5qmKOQfUiK03SA+2Itrjg68Fd9kNQHWkaKmKUCJH5EaZWjqIU4BKe20VtoTq29XpU7\n tofI94NDVajpXhJL24Uc67RsSxshazE3QJTEjYYLCx/Hgm6oJhk1Sd5fG/Vh94vqgv7s\n lq+TskZVV9OvSqVVpi5l1mU567Pdk93YB7Fa7FuxZdAirroBxZvqhjs1EyczKujwZPOq lA==", "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": "Thu, 1 Apr 2021 16:56:20 +0530", "Message-ID": "<20210401112623.20951-2-ktejasree@marvell.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20210401112623.20951-1-ktejasree@marvell.com>", "References": "<20210401112623.20951-1-ktejasree@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-ORIG-GUID": "zoExaGo5On5u7dd_bB8Koloj1RLlzFbh", "X-Proofpoint-GUID": "zoExaGo5On5u7dd_bB8Koloj1RLlzFbh", "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.369, 18.0.761\n definitions=2021-04-01_04:2021-03-31,\n 2021-04-01 signatures=0", "Subject": "[dpdk-dev] [PATCH v2 1/4] crypto/octeontx2: add UDP encapsulation\n support", "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 UDP encapsulation support for IPsec in\nlookaside protocol mode.\n\nSigned-off-by: Tejasree Kondoj <ktejasree@marvell.com>\n---\n doc/guides/cryptodevs/octeontx2.rst | 1 +\n doc/guides/rel_notes/release_21_05.rst | 5 +++\n drivers/crypto/octeontx2/otx2_cryptodev_sec.c | 40 ++++++-------------\n 3 files changed, 18 insertions(+), 28 deletions(-)", "diff": "diff --git a/doc/guides/cryptodevs/octeontx2.rst b/doc/guides/cryptodevs/octeontx2.rst\nindex d312eeb74c..b30f98180a 100644\n--- a/doc/guides/cryptodevs/octeontx2.rst\n+++ b/doc/guides/cryptodevs/octeontx2.rst\n@@ -181,6 +181,7 @@ Features supported\n * Tunnel mode\n * ESN\n * Anti-replay\n+* UDP Encapsulation\n * AES-128/192/256-GCM\n * AES-128/192/256-CBC-SHA1-HMAC\n * AES-128/192/256-CBC-SHA256-128-HMAC\ndiff --git a/doc/guides/rel_notes/release_21_05.rst b/doc/guides/rel_notes/release_21_05.rst\nindex 8e686cc627..8065b3daf8 100644\n--- a/doc/guides/rel_notes/release_21_05.rst\n+++ b/doc/guides/rel_notes/release_21_05.rst\n@@ -94,6 +94,11 @@ New Features\n \n * Added support for preferred busy polling.\n \n+* **Updated the OCTEON TX2 crypto PMD.**\n+\n+ * Updated the OCTEON TX2 crypto PMD lookaside protocol offload for IPsec with\n+ UDP encapsulation support for NAT Traversal.\n+\n * **Updated testpmd.**\n \n * Added a command line option to configure forced speed for Ethernet port.\ndiff --git a/drivers/crypto/octeontx2/otx2_cryptodev_sec.c b/drivers/crypto/octeontx2/otx2_cryptodev_sec.c\nindex 342f089df8..8942ff1fac 100644\n--- a/drivers/crypto/octeontx2/otx2_cryptodev_sec.c\n+++ b/drivers/crypto/octeontx2/otx2_cryptodev_sec.c\n@@ -203,6 +203,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 \tconst uint8_t *cipher_key, *auth_key;\n \tstruct otx2_sec_session_ipsec_lp *lp;\n \tstruct otx2_ipsec_po_sa_ctl *ctl;\n@@ -248,11 +249,7 @@ crypto_sec_ipsec_outb_session_create(struct rte_cryptodev *crypto_dev,\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\tif (ipsec->options.udp_encap) {\n-\t\t\t\t\tsa->aes_gcm.template.ip4.udp_src = 4500;\n-\t\t\t\t\tsa->aes_gcm.template.ip4.udp_dst = 4500;\n-\t\t\t\t}\n-\t\t\t\tip = &sa->aes_gcm.template.ip4.ipv4_hdr;\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@@ -260,11 +257,7 @@ crypto_sec_ipsec_outb_session_create(struct rte_cryptodev *crypto_dev,\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\tif (ipsec->options.udp_encap) {\n-\t\t\t\t\tsa->sha1.template.ip4.udp_src = 4500;\n-\t\t\t\t\tsa->sha1.template.ip4.udp_dst = 4500;\n-\t\t\t\t}\n-\t\t\t\tip = &sa->sha1.template.ip4.ipv4_hdr;\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@@ -272,11 +265,7 @@ crypto_sec_ipsec_outb_session_create(struct rte_cryptodev *crypto_dev,\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\tif (ipsec->options.udp_encap) {\n-\t\t\t\t\tsa->sha2.template.ip4.udp_src = 4500;\n-\t\t\t\t\tsa->sha2.template.ip4.udp_dst = 4500;\n-\t\t\t\t}\n-\t\t\t\tip = &sa->sha2.template.ip4.ipv4_hdr;\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@@ -285,8 +274,15 @@ crypto_sec_ipsec_outb_session_create(struct rte_cryptodev *crypto_dev,\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\tip->version_ihl = RTE_IPV4_VHL_DEF;\n-\t\t\tip->next_proto_id = IPPROTO_ESP;\n \t\t\tip->time_to_live = ipsec->tunnel.ipv4.ttl;\n \t\t\tip->type_of_service |= (ipsec->tunnel.ipv4.dscp << 2);\n \t\t\tif (ipsec->tunnel.ipv4.df)\n@@ -299,10 +295,6 @@ crypto_sec_ipsec_outb_session_create(struct rte_cryptodev *crypto_dev,\n \t\t\t\tRTE_SECURITY_IPSEC_TUNNEL_IPV6) {\n \n \t\t\tif (ctl->enc_type == OTX2_IPSEC_PO_SA_ENC_AES_GCM) {\n-\t\t\t\tif (ipsec->options.udp_encap) {\n-\t\t\t\t\tsa->aes_gcm.template.ip6.udp_src = 4500;\n-\t\t\t\t\tsa->aes_gcm.template.ip6.udp_dst = 4500;\n-\t\t\t\t}\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 \t\t\t\t\t\taes_gcm.template) + sizeof(\n@@ -311,10 +303,6 @@ crypto_sec_ipsec_outb_session_create(struct rte_cryptodev *crypto_dev,\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\tif (ipsec->options.udp_encap) {\n-\t\t\t\t\tsa->sha1.template.ip6.udp_src = 4500;\n-\t\t\t\t\tsa->sha1.template.ip6.udp_dst = 4500;\n-\t\t\t\t}\n \t\t\t\tip6 = &sa->sha1.template.ip6.ipv6_hdr;\n \t\t\t\tctx_len = offsetof(struct otx2_ipsec_po_out_sa,\n \t\t\t\t\t\tsha1.template) + sizeof(\n@@ -323,10 +311,6 @@ crypto_sec_ipsec_outb_session_create(struct rte_cryptodev *crypto_dev,\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\tif (ipsec->options.udp_encap) {\n-\t\t\t\t\tsa->sha2.template.ip6.udp_src = 4500;\n-\t\t\t\t\tsa->sha2.template.ip6.udp_dst = 4500;\n-\t\t\t\t}\n \t\t\t\tip6 = &sa->sha2.template.ip6.ipv6_hdr;\n \t\t\t\tctx_len = offsetof(struct otx2_ipsec_po_out_sa,\n \t\t\t\t\t\tsha2.template) + sizeof(\n", "prefixes": [ "v2", "1/4" ] }{ "id": 90351, "url": "