get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 99902,
    "url": "http://patchwork.dpdk.org/api/patches/99902/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210928120741.16674-3-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": "<20210928120741.16674-3-ktejasree@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210928120741.16674-3-ktejasree@marvell.com",
    "date": "2021-09-28T12:07:40",
    "name": "[v2,2/3] common/cnxk: add support for tunnel header verification",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "65d91d428f6dcdbb2c0d4a0af49469fb2e315dec",
    "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/20210928120741.16674-3-ktejasree@marvell.com/mbox/",
    "series": [
        {
            "id": 19226,
            "url": "http://patchwork.dpdk.org/api/series/19226/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=19226",
            "date": "2021-09-28T12:07:38",
            "name": "add option to configure tunnel header verification",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/19226/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/99902/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/99902/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 33388A0032;\n\tTue, 28 Sep 2021 13:14:20 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 68ED441100;\n\tTue, 28 Sep 2021 13:14:15 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 1931F410FE\n for <dev@dpdk.org>; Tue, 28 Sep 2021 13:14:13 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id\n 18SAFB8t019512;\n Tue, 28 Sep 2021 04:14:13 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com with ESMTP id 3bc14pr6hs-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Tue, 28 Sep 2021 04:14:13 -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.18;\n Tue, 28 Sep 2021 04:14:11 -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.18 via Frontend\n Transport; Tue, 28 Sep 2021 04:14:10 -0700",
            "from hyd1554T5810.caveonetworks.com.com (unknown [10.29.57.11])\n by maili.marvell.com (Postfix) with ESMTP id D69333F7099;\n Tue, 28 Sep 2021 04:14:06 -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=UY03JMet7z2Gjx+Zo4HcaitELFeywRWffFwUytw3OBU=;\n b=SK66fl3tTdEDlZpGJjWHNsCLVj97Ebi46wjsdilpRUeJ67qjpf6l4z+DFCZg+XAr0sK+\n OQz3PSGaoKj6AV+Daz1/XnfN4Rjig9mQ/Ahs6yqwcX77eApV0E++CKx+39fz6ESrCCNX\n wRX6HBJwL0xdeAlgEq/u9OiW+DHclChUR5foaaDbhLNS6OIRX/FVe5o3PUWzi7XIybl9\n DIn/7doooEnQIdzT7K2ANYSDX43fFYxCIGtMmO3gNxE6uKN4k1QuiYUpwR1ziT2w7YeB\n yrQDkJJMblt33OwMbp1vTlmjWMvl/BJXdXOCxr4iY4pK6fEVlh7G7EAJb2SvPvhBd0d7 kQ==",
        "From": "Tejasree Kondoj <ktejasree@marvell.com>",
        "To": "Akhil Goyal <gakhil@marvell.com>, Radu Nicolau <radu.nicolau@intel.com>,\n Declan Doherty <declan.doherty@intel.com>",
        "CC": "Tejasree Kondoj <ktejasree@marvell.com>,\n Anoob Joseph <anoobj@marvell.com>,\n Ankur Dwivedi <adwivedi@marvell.com>, Jerin Jacob <jerinj@marvell.com>,\n Konstantin Ananyev <konstantin.ananyev@intel.com>,\n Ciara Power <ciara.power@intel.com>,\n Hemant Agrawal <hemant.agrawal@nxp.com>,\n Gagandeep Singh <g.singh@nxp.com>, Fan Zhang <roy.fan.zhang@intel.com>,\n Archana Muniganti <marchana@marvell.com>, <dev@dpdk.org>",
        "Date": "Tue, 28 Sep 2021 17:37:40 +0530",
        "Message-ID": "<20210928120741.16674-3-ktejasree@marvell.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20210928120741.16674-1-ktejasree@marvell.com>",
        "References": "<20210928120741.16674-1-ktejasree@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "piww3fv_2zuKXhIm4VLXik9cpjlsF-3G",
        "X-Proofpoint-GUID": "piww3fv_2zuKXhIm4VLXik9cpjlsF-3G",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475\n definitions=2021-09-28_05,2021-09-28_01,2020-04-07_01",
        "Subject": "[dpdk-dev] [PATCH v2 2/3] common/cnxk: add support for tunnel\n header verification",
        "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 to verify tunnel header in IPsec inbound.\n\nSigned-off-by: Tejasree Kondoj <ktejasree@marvell.com>\n---\n drivers/common/cnxk/cnxk_security.c           | 60 +++++++++++++++++++\n drivers/common/cnxk/roc_ie_ot.h               |  6 +-\n .../crypto/cnxk/cnxk_cryptodev_capabilities.c |  4 ++\n 3 files changed, 69 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/common/cnxk/cnxk_security.c b/drivers/common/cnxk/cnxk_security.c\nindex 215d9fd4d1..cc5daf333c 100644\n--- a/drivers/common/cnxk/cnxk_security.c\n+++ b/drivers/common/cnxk/cnxk_security.c\n@@ -199,6 +199,62 @@ ot_ipsec_inb_ctx_size(struct roc_ot_ipsec_inb_sa *sa)\n \treturn size;\n }\n \n+static int\n+ot_ipsec_inb_tunnel_hdr_fill(struct roc_ot_ipsec_inb_sa *sa,\n+\t\t\t     struct rte_security_ipsec_xform *ipsec_xfrm)\n+{\n+\tstruct rte_security_ipsec_tunnel_param *tunnel;\n+\n+\tif (ipsec_xfrm->mode != RTE_SECURITY_IPSEC_SA_MODE_TUNNEL)\n+\t\treturn 0;\n+\n+\tif (ipsec_xfrm->options.tunnel_hdr_verify == 0)\n+\t\treturn 0;\n+\n+\ttunnel = &ipsec_xfrm->tunnel;\n+\n+\tswitch (tunnel->type) {\n+\tcase RTE_SECURITY_IPSEC_TUNNEL_IPV4:\n+\t\tsa->w2.s.outer_ip_ver = ROC_IE_SA_IP_VERSION_4;\n+\t\tmemcpy(&sa->outer_hdr.ipv4.src_addr, &tunnel->ipv4.src_ip,\n+\t\t       sizeof(struct in_addr));\n+\t\tmemcpy(&sa->outer_hdr.ipv4.dst_addr, &tunnel->ipv4.dst_ip,\n+\t\t       sizeof(struct in_addr));\n+\n+\t\t/* IP Source and Dest are in LE/CPU endian */\n+\t\tsa->outer_hdr.ipv4.src_addr =\n+\t\t\trte_be_to_cpu_32(sa->outer_hdr.ipv4.src_addr);\n+\t\tsa->outer_hdr.ipv4.dst_addr =\n+\t\t\trte_be_to_cpu_32(sa->outer_hdr.ipv4.dst_addr);\n+\n+\t\tbreak;\n+\tcase RTE_SECURITY_IPSEC_TUNNEL_IPV6:\n+\t\tsa->w2.s.outer_ip_ver = ROC_IE_SA_IP_VERSION_6;\n+\t\tmemcpy(&sa->outer_hdr.ipv6.src_addr, &tunnel->ipv6.src_addr,\n+\t\t       sizeof(struct in6_addr));\n+\t\tmemcpy(&sa->outer_hdr.ipv6.dst_addr, &tunnel->ipv6.dst_addr,\n+\t\t       sizeof(struct in6_addr));\n+\n+\t\tbreak;\n+\tdefault:\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tswitch (ipsec_xfrm->options.tunnel_hdr_verify) {\n+\tcase RTE_SECURITY_IPSEC_TUNNEL_VERIFY_DST_ADDR:\n+\t\tsa->w2.s.ip_hdr_verify = ROC_IE_OT_SA_IP_HDR_VERIFY_DST_ADDR;\n+\t\tbreak;\n+\tcase RTE_SECURITY_IPSEC_TUNNEL_VERIFY_SRC_DST_ADDR:\n+\t\tsa->w2.s.ip_hdr_verify =\n+\t\t\tROC_IE_OT_SA_IP_HDR_VERIFY_SRC_DST_ADDR;\n+\t\tbreak;\n+\tdefault:\n+\t\treturn -ENOTSUP;\n+\t}\n+\n+\treturn 0;\n+}\n+\n int\n cnxk_ot_ipsec_inb_sa_fill(struct roc_ot_ipsec_inb_sa *sa,\n \t\t\t  struct rte_security_ipsec_xform *ipsec_xfrm,\n@@ -229,6 +285,10 @@ cnxk_ot_ipsec_inb_sa_fill(struct roc_ot_ipsec_inb_sa *sa,\n \t\tsa->w0.s.ar_win = rte_log2_u32(replay_win_sz) - 5;\n \t}\n \n+\trc = ot_ipsec_inb_tunnel_hdr_fill(sa, ipsec_xfrm);\n+\tif (rc)\n+\t\treturn rc;\n+\n \t/* Default options for pkt_out and pkt_fmt are with\n \t * second pass meta and no defrag.\n \t */\ndiff --git a/drivers/common/cnxk/roc_ie_ot.h b/drivers/common/cnxk/roc_ie_ot.h\nindex 1ff468841d..12c75afac2 100644\n--- a/drivers/common/cnxk/roc_ie_ot.h\n+++ b/drivers/common/cnxk/roc_ie_ot.h\n@@ -180,7 +180,11 @@ union roc_ot_ipsec_sa_word2 {\n \t\tuint64_t auth_type : 4;\n \n \t\tuint64_t encap_type : 2;\n-\t\tuint64_t rsvd1 : 6;\n+\t\tuint64_t et_ovrwr_ddr_en : 1;\n+\t\tuint64_t esn_en : 1;\n+\t\tuint64_t tport_l4_incr_csum : 1;\n+\t\tuint64_t ip_hdr_verify : 2;\n+\t\tuint64_t rsvd5 : 1;\n \n \t\tuint64_t rsvd2 : 7;\n \t\tuint64_t async_mode : 1;\ndiff --git a/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c b/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c\nindex 4b97639e56..8a0cf289fd 100644\n--- a/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c\n+++ b/drivers/crypto/cnxk/cnxk_cryptodev_capabilities.c\n@@ -920,6 +920,10 @@ cn10k_sec_caps_update(struct rte_security_capability *sec_cap)\n #ifdef LA_IPSEC_DEBUG\n \t\tsec_cap->ipsec.options.iv_gen_disable = 1;\n #endif\n+\t} else {\n+\t\tif (sec_cap->ipsec.mode == RTE_SECURITY_IPSEC_SA_MODE_TUNNEL)\n+\t\t\tsec_cap->ipsec.options.tunnel_hdr_verify =\n+\t\t\t\tRTE_SECURITY_IPSEC_TUNNEL_VERIFY_SRC_DST_ADDR;\n \t}\n }\n \n",
    "prefixes": [
        "v2",
        "2/3"
    ]
}