get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 55240,
    "url": "http://patches.dpdk.org/api/patches/55240/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190624134000.2456-3-marcinx.smoczynski@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.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": "<20190624134000.2456-3-marcinx.smoczynski@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190624134000.2456-3-marcinx.smoczynski@intel.com",
    "date": "2019-06-24T13:39:58",
    "name": "[v2,2/4] ipsec: fix transport mode for ipv6 with extensions",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "7d43141c468eb4dce262bf478240278ba7bcbb8d",
    "submitter": {
        "id": 1293,
        "url": "http://patches.dpdk.org/api/people/1293/?format=api",
        "name": "Marcin Smoczynski",
        "email": "marcinx.smoczynski@intel.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190624134000.2456-3-marcinx.smoczynski@intel.com/mbox/",
    "series": [
        {
            "id": 5130,
            "url": "http://patches.dpdk.org/api/series/5130/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5130",
            "date": "2019-06-24T13:39:56",
            "name": "IPv6 with options support for IPsec transport",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/5130/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/55240/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/55240/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 219521BF0D;\n\tMon, 24 Jun 2019 15:43:02 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id 514471BF09\n\tfor <dev@dpdk.org>; Mon, 24 Jun 2019 15:43:00 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t24 Jun 2019 06:43:00 -0700",
            "from msmoczyx-mobl.ger.corp.intel.com ([10.103.104.100])\n\tby fmsmga001.fm.intel.com with ESMTP; 24 Jun 2019 06:42:57 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.63,412,1557212400\"; d=\"scan'208\";a=\"182637011\"",
        "From": "Marcin Smoczynski <marcinx.smoczynski@intel.com>",
        "To": "marko.kovacevic@intel.com, orika@mellanox.com, bruce.richardson@intel.com,\n\tpablo.de.lara.guarch@intel.com, radu.nicolau@intel.com,\n\takhil.goyal@nxp.com, tomasz.kantecki@intel.com,\n\tkonstantin.ananyev@intel.com, bernard.iremonger@intel.com,\n\tolivier.matz@6wind.com",
        "Cc": "dev@dpdk.org,\n\tMarcin Smoczynski <marcinx.smoczynski@intel.com>",
        "Date": "Mon, 24 Jun 2019 15:39:58 +0200",
        "Message-Id": "<20190624134000.2456-3-marcinx.smoczynski@intel.com>",
        "X-Mailer": "git-send-email 2.21.0.windows.1",
        "In-Reply-To": "<20190624134000.2456-1-marcinx.smoczynski@intel.com>",
        "References": "<20190508104717.13448-1-marcinx.smoczynski@intel.com>\n\t<20190624134000.2456-1-marcinx.smoczynski@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 2/4] ipsec: fix transport mode for ipv6 with\n\textensions",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Reconstructing IPv6 header after encryption or decryption requires\nupdating 'next header' value in the preceding protocol header, which\nis determined by parsing IPv6 header and iteratively looking for\nnext IPv6 header extension.\n\nIt is required that 'l3_len' in the mbuf metadata contains a total\nlength of the IPv6 header with header extensions up to ESP header.\n\nSigned-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>\n---\n lib/Makefile           |  3 ++-\n lib/librte_ipsec/iph.h | 55 ++++++++++++++++++++++++++++++++++++------\n lib/meson.build        |  2 +-\n 3 files changed, 50 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/lib/Makefile b/lib/Makefile\nindex 791e0d991..3ad579f68 100644\n--- a/lib/Makefile\n+++ b/lib/Makefile\n@@ -108,7 +108,8 @@ DEPDIRS-librte_gso += librte_mempool\n DIRS-$(CONFIG_RTE_LIBRTE_BPF) += librte_bpf\n DEPDIRS-librte_bpf := librte_eal librte_mempool librte_mbuf librte_ethdev\n DIRS-$(CONFIG_RTE_LIBRTE_IPSEC) += librte_ipsec\n-DEPDIRS-librte_ipsec := librte_eal librte_mbuf librte_cryptodev librte_security\n+DEPDIRS-librte_ipsec := librte_eal librte_mbuf librte_cryptodev librte_security \\\n+\t\t\tlibrte_net\n DIRS-$(CONFIG_RTE_LIBRTE_TELEMETRY) += librte_telemetry\n DEPDIRS-librte_telemetry := librte_eal librte_metrics librte_ethdev\n DIRS-$(CONFIG_RTE_LIBRTE_RCU) += librte_rcu\ndiff --git a/lib/librte_ipsec/iph.h b/lib/librte_ipsec/iph.h\nindex a0ca41d51..62d78b7b1 100644\n--- a/lib/librte_ipsec/iph.h\n+++ b/lib/librte_ipsec/iph.h\n@@ -5,6 +5,8 @@\n #ifndef _IPH_H_\n #define _IPH_H_\n \n+#include <rte_ip.h>\n+\n /**\n  * @file iph.h\n  * Contains functions/structures/macros to manipulate IPv4/IPv6 headers\n@@ -40,24 +42,61 @@ static inline int\n update_trs_l3hdr(const struct rte_ipsec_sa *sa, void *p, uint32_t plen,\n \t\tuint32_t l2len, uint32_t l3len, uint8_t proto)\n {\n-\tstruct rte_ipv4_hdr *v4h;\n-\tstruct rte_ipv6_hdr *v6h;\n \tint32_t rc;\n \n+\t/* IPv4 */\n \tif ((sa->type & RTE_IPSEC_SATP_IPV_MASK) == RTE_IPSEC_SATP_IPV4) {\n+\t\tstruct rte_ipv4_hdr *v4h;\n+\n \t\tv4h = p;\n \t\trc = v4h->next_proto_id;\n \t\tv4h->next_proto_id = proto;\n \t\tv4h->total_length = rte_cpu_to_be_16(plen - l2len);\n-\t} else if (l3len == sizeof(*v6h)) {\n+\t/* IPv6 */\n+\t} else {\n+\t\tstruct rte_ipv6_hdr *v6h;\n+\t\tuint8_t *p_nh;\n+\n \t\tv6h = p;\n-\t\trc = v6h->proto;\n-\t\tv6h->proto = proto;\n+\n+\t\t/* basic IPv6 header with no extensions */\n+\t\tif (l3len == sizeof(struct rte_ipv6_hdr))\n+\t\t\tp_nh = &v6h->proto;\n+\n+\t\t/* IPv6 with extensions */\n+\t\telse {\n+\t\t\tsize_t ext_len;\n+\t\t\tint nh;\n+\t\t\tuint8_t *pd, *plimit;\n+\n+\t\t\t/* locate last extension within l3len bytes */\n+\t\t\tpd = (uint8_t *)p;\n+\t\t\tplimit = pd + l3len;\n+\t\t\text_len = sizeof(struct rte_ipv6_hdr);\n+\t\t\tnh = v6h->proto;\n+\t\t\twhile (pd + ext_len < plimit) {\n+\t\t\t\tpd += ext_len;\n+\t\t\t\tnh = rte_ipv6_get_next_ext(pd, nh, &ext_len);\n+\t\t\t\tif (unlikely(nh < 0))\n+\t\t\t\t\treturn -EINVAL;\n+\t\t\t}\n+\n+\t\t\t/* invalid l3len - extension exceeds header length */\n+\t\t\tif (unlikely(pd + ext_len != plimit))\n+\t\t\t\treturn -EINVAL;\n+\n+\t\t\t/* save last extension offset */\n+\t\t\tp_nh = pd;\n+\t\t}\n+\n+\t\t/* update header type; return original value */\n+\t\trc = *p_nh;\n+\t\t*p_nh = proto;\n+\n+\t\t/* fix packet length */\n \t\tv6h->payload_len = rte_cpu_to_be_16(plen - l2len -\n \t\t\t\tsizeof(*v6h));\n-\t/* need to add support for IPv6 with options */\n-\t} else\n-\t\trc = -ENOTSUP;\n+\t}\n \n \treturn rc;\n }\ndiff --git a/lib/meson.build b/lib/meson.build\nindex 992091a94..e93797ede 100644\n--- a/lib/meson.build\n+++ b/lib/meson.build\n@@ -23,7 +23,7 @@ libraries = [\n \t'kni', 'latencystats', 'lpm', 'member',\n \t'power', 'pdump', 'rawdev',\n \t'rcu', 'reorder', 'sched', 'security', 'stack', 'vhost',\n-\t#ipsec lib depends on crypto and security\n+\t# ipsec lib depends on net, crypto and security\n \t'ipsec',\n \t# add pkt framework libs which use other libs from above\n \t'port', 'table', 'pipeline',\n",
    "prefixes": [
        "v2",
        "2/4"
    ]
}