get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 118577,
    "url": "http://patches.dpdk.org/api/patches/118577/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20221019141513.1969052-6-ktejasree@marvell.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": "<20221019141513.1969052-6-ktejasree@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221019141513.1969052-6-ktejasree@marvell.com",
    "date": "2022-10-19T14:15:05",
    "name": "[05/13] common/cnxk: support custom UDP port values",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "0229f6e1b96cfb08412c8c60ca58e22f80446f44",
    "submitter": {
        "id": 1789,
        "url": "http://patches.dpdk.org/api/people/1789/?format=api",
        "name": "Tejasree Kondoj",
        "email": "ktejasree@marvell.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/20221019141513.1969052-6-ktejasree@marvell.com/mbox/",
    "series": [
        {
            "id": 25309,
            "url": "http://patches.dpdk.org/api/series/25309/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=25309",
            "date": "2022-10-19T14:15:02",
            "name": "[01/13] crypto/cnxk: fix length of AES-CMAC algo",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/25309/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/118577/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/118577/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 DD9F9A06C8;\n\tWed, 19 Oct 2022 16:15:45 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 913B742BDE;\n\tWed, 19 Oct 2022 16:15:31 +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 B94FA410D1\n for <dev@dpdk.org>; Wed, 19 Oct 2022 16:15:29 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id\n 29JC0JSh011929\n for <dev@dpdk.org>; Wed, 19 Oct 2022 07:15:29 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3k7vcph6ba-2\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Wed, 19 Oct 2022 07:15:29 -0700",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Wed, 19 Oct 2022 07:15:26 -0700",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Wed, 19 Oct 2022 07:15:26 -0700",
            "from hyd1554.marvell.com (unknown [10.29.57.11])\n by maili.marvell.com (Postfix) with ESMTP id 3146B3F7041;\n Wed, 19 Oct 2022 07:15:24 -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=d4xDM/ak0KYmq/wkBRJtgqCeCztMJGRKFAs36cuSSyg=;\n b=TKFm26aU3WB+nO0Lbh261MyUWuGk/gR6LMAb+0HRAAlXHH6JJlyePr3OAxHp3Xu4Z+MS\n dNDk3wd+5RwvmVjuAFYNyK2e6Fi23ghV6TygUBmsx7mhEicDaL1al8Cd59cZFlpt9g4y\n lDBM6wv/vva+5wV6lLww8aJJf9KuiX2JmfeORglVPaNe58182kxLlnPchI1fpd/tkZEz\n l/wPNrj9WKFcGLUrULDDl+kFypPziF+b7ZO0joR4qHispciA03nzemd2dAJ2f9pY2l9g\n oomNAIyLdI5Bqxeg4C9FPif/b0HZ03QZbjOJyeFTnMPrl1cf9iJpgBFk5K5axDiu0bds 2g==",
        "From": "Tejasree Kondoj <ktejasree@marvell.com>",
        "To": "Akhil Goyal <gakhil@marvell.com>",
        "CC": "Vidya Sagar Velumuri <vvelumuri@marvell.com>, Anoob Joseph\n <anoobj@marvell.com>, <dev@dpdk.org>",
        "Subject": "[PATCH 05/13] common/cnxk: support custom UDP port values",
        "Date": "Wed, 19 Oct 2022 19:45:05 +0530",
        "Message-ID": "<20221019141513.1969052-6-ktejasree@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20221019141513.1969052-1-ktejasree@marvell.com>",
        "References": "<20221019141513.1969052-1-ktejasree@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "a25hpcUIzv8567nsyMHnB5_u5WivE89H",
        "X-Proofpoint-GUID": "a25hpcUIzv8567nsyMHnB5_u5WivE89H",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1\n definitions=2022-10-19_08,2022-10-19_03,2022-06-22_01",
        "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"
    },
    "content": "From: Vidya Sagar Velumuri <vvelumuri@marvell.com>\n\nAdd support for custom port values for UDP encapsulation\n\nSigned-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>\n---\n drivers/common/cnxk/cnxk_security.c | 26 ++++++++++++++++++--------\n 1 file changed, 18 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/common/cnxk/cnxk_security.c b/drivers/common/cnxk/cnxk_security.c\nindex f8bdeabeac..f220d2577f 100644\n--- a/drivers/common/cnxk/cnxk_security.c\n+++ b/drivers/common/cnxk/cnxk_security.c\n@@ -1219,6 +1219,7 @@ cnxk_on_ipsec_outb_sa_create(struct rte_security_ipsec_xform *ipsec,\n \tstruct rte_ipv6_hdr *ip6;\n \tstruct rte_ipv4_hdr *ip4;\n \tconst uint8_t *auth_key;\n+\tuint16_t sport, dport;\n \tint auth_key_len = 0;\n \tsize_t ctx_len;\n \tint ret;\n@@ -1266,10 +1267,20 @@ cnxk_on_ipsec_outb_sa_create(struct rte_security_ipsec_xform *ipsec,\n \t}\n \n \tip4 = (struct rte_ipv4_hdr *)&template->ip4.ipv4_hdr;\n+\t/* If custom port values are provided, Overwrite default port values. */\n \tif (ipsec->options.udp_encap) {\n+\t\tsport = 4500;\n+\t\tdport = 4500;\n+\n+\t\tif (ipsec->udp.sport)\n+\t\t\tsport = ipsec->udp.sport;\n+\n+\t\tif (ipsec->udp.dport)\n+\t\t\tdport = ipsec->udp.dport;\n+\n \t\tip4->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\ttemplate->ip4.udp_src = rte_be_to_cpu_16(sport);\n+\t\ttemplate->ip4.udp_dst = rte_be_to_cpu_16(dport);\n \t} else {\n \t\tif (ipsec->proto == RTE_SECURITY_IPSEC_SA_PROTO_AH)\n \t\t\tip4->next_proto_id = IPPROTO_AH;\n@@ -1303,13 +1314,12 @@ cnxk_on_ipsec_outb_sa_create(struct rte_security_ipsec_xform *ipsec,\n \t\t\tip6 = (struct rte_ipv6_hdr *)&template->ip6.ipv6_hdr;\n \t\t\tif (ipsec->options.udp_encap) {\n \t\t\t\tip6->proto = IPPROTO_UDP;\n-\t\t\t\ttemplate->ip6.udp_src = rte_be_to_cpu_16(4500);\n-\t\t\t\ttemplate->ip6.udp_dst = rte_be_to_cpu_16(4500);\n+\t\t\t\ttemplate->ip6.udp_src = rte_be_to_cpu_16(sport);\n+\t\t\t\ttemplate->ip6.udp_dst = rte_be_to_cpu_16(dport);\n \t\t\t} else {\n-\t\t\t\tip6->proto = (ipsec->proto ==\n-\t\t\t\t\t      RTE_SECURITY_IPSEC_SA_PROTO_ESP) ?\n-\t\t\t\t\t\t     IPPROTO_ESP :\n-\t\t\t\t\t\t     IPPROTO_AH;\n+\t\t\t\tip6->proto = (ipsec->proto == RTE_SECURITY_IPSEC_SA_PROTO_ESP) ?\n+\t\t\t\t\t\t\t      IPPROTO_ESP :\n+\t\t\t\t\t\t\t      IPPROTO_AH;\n \t\t\t}\n \t\t\tip6->vtc_flow =\n \t\t\t\trte_cpu_to_be_32(0x60000000 |\n",
    "prefixes": [
        "05/13"
    ]
}