get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 97749,
    "url": "https://patches.dpdk.org/api/patches/97749/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210902021505.17607-24-ndabilpuram@marvell.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20210902021505.17607-24-ndabilpuram@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210902021505.17607-24-ndabilpuram@marvell.com",
    "date": "2021-09-02T02:15:01",
    "name": "[23/27] net/cnxk: update ethertype for mixed IPsec tunnel versions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "34f467d738f5c148d7e82a971d09ad9bc916ab88",
    "submitter": {
        "id": 1202,
        "url": "https://patches.dpdk.org/api/people/1202/?format=api",
        "name": "Nithin Dabilpuram",
        "email": "ndabilpuram@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "https://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210902021505.17607-24-ndabilpuram@marvell.com/mbox/",
    "series": [
        {
            "id": 18612,
            "url": "https://patches.dpdk.org/api/series/18612/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=18612",
            "date": "2021-09-02T02:14:38",
            "name": "net/cnxk: support for inline ipsec",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/18612/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/97749/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/97749/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 1DF42A0C4C;\n\tThu,  2 Sep 2021 04:19:21 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DF9C441175;\n\tThu,  2 Sep 2021 04:17:56 +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 4B0E9411A6\n for <dev@dpdk.org>; Thu,  2 Sep 2021 04:17:55 +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 181HQ21G011572\n for <dev@dpdk.org>; Wed, 1 Sep 2021 19:17:54 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com with ESMTP id 3atdwq9hv4-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Wed, 01 Sep 2021 19:17:54 -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 Wed, 1 Sep 2021 19:17:52 -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; Wed, 1 Sep 2021 19:17:52 -0700",
            "from hyd1588t430.marvell.com (unknown [10.29.52.204])\n by maili.marvell.com (Postfix) with ESMTP id 928193F7040;\n Wed,  1 Sep 2021 19:17:50 -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-type; s=pfpt0220; bh=ROdomMsTmEP8ZV4RIB8wmkOiWPgiLeh/HvUdaWF1l6U=;\n b=AF2CMiYXYoV3B+3fE1NvtGLnTGxZnu2nArePYqPhZuoEk+b2xwjYRCL1xC/wV+5eWhjf\n Y7rUymV7rDCqbcsfSCLLW8zlIphaLGaO5Ia1vm0MPTXsk9Bf3v/CFB7LGGe1PVkL7H7D\n W9R3K1Q7ptmc4mukmojKkpVqR1laPlcUX2il6kiQviFXqudDYKGN0uOEWOFMYNgaqKNg\n EirOHd+dQ9+9/ZyAMuFZuwRepwSdqWRx+iXwfQhl0i7m4ZSaBtbaU7rDmZliz3gGEtnM\n KIbK6NtWdTBsSrTkyqyX32LG3kasnHH3gkejVUjh8TkrpyPvjwOhsVO+UmLRTH9vPJcs vg==",
        "From": "Nithin Dabilpuram <ndabilpuram@marvell.com>",
        "To": "Nithin Dabilpuram <ndabilpuram@marvell.com>, Kiran Kumar K\n <kirankumark@marvell.com>, Sunil Kumar Kori <skori@marvell.com>, Satha Rao\n <skoteshwar@marvell.com>",
        "CC": "<jerinj@marvell.com>, <schalla@marvell.com>, <dev@dpdk.org>",
        "Date": "Thu, 2 Sep 2021 07:45:01 +0530",
        "Message-ID": "<20210902021505.17607-24-ndabilpuram@marvell.com>",
        "X-Mailer": "git-send-email 2.8.4",
        "In-Reply-To": "<20210902021505.17607-1-ndabilpuram@marvell.com>",
        "References": "<20210902021505.17607-1-ndabilpuram@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "xh0UKT8RkcHxllpK3BXvpI9INGgNHO0H",
        "X-Proofpoint-GUID": "xh0UKT8RkcHxllpK3BXvpI9INGgNHO0H",
        "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-01_05,2021-09-01_01,2020-04-07_01",
        "Subject": "[dpdk-dev] [PATCH 23/27] net/cnxk: update ethertype for mixed IPsec\n tunnel versions",
        "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": "From: Srujana Challa <schalla@marvell.com>\n\nAdds support to update ethertype for mixed IPsec tunnel\nversions. And also sets et_overwr for inbound IPsec.\n\nSigned-off-by: Srujana Challa <schalla@marvell.com>\n---\n drivers/common/cnxk/cnxk_security.c |  1 +\n drivers/net/cnxk/cn10k_ethdev.h     |  3 ++-\n drivers/net/cnxk/cn10k_ethdev_sec.c |  2 ++\n drivers/net/cnxk/cn10k_tx.h         | 19 +++++++++++++++++++\n 4 files changed, 24 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/common/cnxk/cnxk_security.c b/drivers/common/cnxk/cnxk_security.c\nindex c25b3fd..90b5205 100644\n--- a/drivers/common/cnxk/cnxk_security.c\n+++ b/drivers/common/cnxk/cnxk_security.c\n@@ -239,6 +239,7 @@ cnxk_ot_ipsec_inb_sa_fill(struct roc_ot_ipsec_inb_sa *sa,\n \t/* There are two words of CPT_CTX_HW_S for ucode to skip */\n \tsa->w0.s.ctx_hdr_size = 1;\n \tsa->w0.s.aop_valid = 1;\n+\tsa->w0.s.et_ovrwr = 1;\n \n \trte_wmb();\n \ndiff --git a/drivers/net/cnxk/cn10k_ethdev.h b/drivers/net/cnxk/cn10k_ethdev.h\nindex 200cd93..c2a46ad 100644\n--- a/drivers/net/cnxk/cn10k_ethdev.h\n+++ b/drivers/net/cnxk/cn10k_ethdev.h\n@@ -64,7 +64,8 @@ struct cn10k_sec_sess_priv {\n \t\tstruct {\n \t\t\tuint32_t sa_idx;\n \t\t\tuint8_t inb_sa : 1;\n-\t\t\tuint8_t rsvd1 : 2;\n+\t\t\tuint8_t outer_ip_ver : 1;\n+\t\t\tuint8_t mode : 1;\n \t\t\tuint8_t roundup_byte : 5;\n \t\t\tuint8_t roundup_len;\n \t\t\tuint16_t partial_len;\ndiff --git a/drivers/net/cnxk/cn10k_ethdev_sec.c b/drivers/net/cnxk/cn10k_ethdev_sec.c\nindex dae5ea7..c66730a 100644\n--- a/drivers/net/cnxk/cn10k_ethdev_sec.c\n+++ b/drivers/net/cnxk/cn10k_ethdev_sec.c\n@@ -341,6 +341,8 @@ cn10k_eth_sec_session_create(void *device,\n \t\tsess_priv.roundup_byte = rlens->roundup_byte;\n \t\tsess_priv.roundup_len = rlens->roundup_len;\n \t\tsess_priv.partial_len = rlens->partial_len;\n+\t\tsess_priv.mode = outb_sa->w2.s.ipsec_mode;\n+\t\tsess_priv.outer_ip_ver = outb_sa->w2.s.outer_ip_ver;\n \n \t\t/* Pointer from eth_sec -> outb_sa */\n \t\teth_sec->sa = outb_sa;\ndiff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h\nindex 70ba929..f56aa8e 100644\n--- a/drivers/net/cnxk/cn10k_tx.h\n+++ b/drivers/net/cnxk/cn10k_tx.h\n@@ -302,6 +302,16 @@ cn10k_nix_prep_sec_vec(struct rte_mbuf *m, uint64x2_t *cmd0, uint64x2_t *cmd1,\n \tcmd23 = vsetq_lane_u64((uintptr_t)m | 1, cmd23, 1);\n \n \tdptr += l2_len;\n+\n+\tif (sess_priv.mode == ROC_IE_SA_MODE_TUNNEL) {\n+\t\tif (sess_priv.outer_ip_ver == ROC_IE_SA_IP_VERSION_4)\n+\t\t\t*((uint16_t *)(dptr - 2)) =\n+\t\t\t\trte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);\n+\t\telse\n+\t\t\t*((uint16_t *)(dptr - 2)) =\n+\t\t\t\trte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);\n+\t}\n+\n \tucode_cmd[1] = dptr;\n \tucode_cmd[2] = dptr;\n \n@@ -396,6 +406,15 @@ cn10k_nix_prep_sec(struct rte_mbuf *m, uint64_t *cmd, uintptr_t *nixtx_addr,\n \tcmd23 = vsetq_lane_u64((uintptr_t)m | 1, cmd23, 1);\n \n \tdptr += l2_len;\n+\n+\tif (sess_priv.mode == ROC_IE_SA_MODE_TUNNEL) {\n+\t\tif (sess_priv.outer_ip_ver == ROC_IE_SA_IP_VERSION_4)\n+\t\t\t*((uint16_t *)(dptr - 2)) =\n+\t\t\t\trte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);\n+\t\telse\n+\t\t\t*((uint16_t *)(dptr - 2)) =\n+\t\t\t\trte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);\n+\t}\n \tucode_cmd[1] = dptr;\n \tucode_cmd[2] = dptr;\n \n",
    "prefixes": [
        "23/27"
    ]
}