get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 115933,
    "url": "https://patches.dpdk.org/api/patches/115933/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220905133228.818616-29-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": "<20220905133228.818616-29-ndabilpuram@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220905133228.818616-29-ndabilpuram@marvell.com",
    "date": "2022-09-05T13:32:26",
    "name": "[v2,29/31] net/cnxk: enable esn and antireplay support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1786808ea03dbf0699700149afb83cbe0340f341",
    "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/20220905133228.818616-29-ndabilpuram@marvell.com/mbox/",
    "series": [
        {
            "id": 24540,
            "url": "https://patches.dpdk.org/api/series/24540/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24540",
            "date": "2022-09-05T13:31:58",
            "name": "[v2,01/31] cnxk/net: add fc check in vector event Tx path",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/24540/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/115933/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/115933/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 EE571A0558;\n\tMon,  5 Sep 2022 15:35:07 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C6B7042BB5;\n\tMon,  5 Sep 2022 15:33:59 +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 CC06742BB4\n for <dev@dpdk.org>; Mon,  5 Sep 2022 15:33:58 +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 285DAeOS009446\n for <dev@dpdk.org>; Mon, 5 Sep 2022 06:33:58 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3jc6epngkq-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n for <dev@dpdk.org>; Mon, 05 Sep 2022 06:33:58 -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 Mon, 5 Sep 2022 06:33:56 -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; Mon, 5 Sep 2022 06:33:56 -0700",
            "from localhost.localdomain (unknown [10.29.52.204])\n by maili.marvell.com (Postfix) with ESMTP id B836D5E6872;\n Mon,  5 Sep 2022 06:33:53 -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=kSLNNXONXuW+Kblv4R19qHb/Uq3keBsaFyUTjVGsqnc=;\n b=KRBpRYa2FtB9Nb0sBVUpakLyl0uFRUdAXYq72hBRkJj4XixrFC+54Ax9ul6CjZG052XI\n br4DuP13zsa6t5WWxER44NO2eK15uNY79CmQuCAFZB807GCl+sC3dZkXNvymC9vWH5py\n kuESpTIA8w27YNkQwWJQrk/oxEnRZKj6/rBfnRsXtJSDhcgeOVIKnuDavNkA/7ccDRlm\n YSxOI5D6ySE62P7dP50/3YXPOPGx/SkBHd1NJMvbCBQYB9Luf5r5azMYWvjBXuX3fJva\n JJrr+nN9YX4Ov6ATePaWJKmyNWGabIM/yhroQYqPn0LQ9keO8bmJnvqstazJ8LrpHFmY ug==",
        "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>, <dev@dpdk.org>, Vidya Sagar Velumuri\n <vvelumuri@marvell.com>",
        "Subject": "[PATCH v2 29/31] net/cnxk: enable esn and antireplay support",
        "Date": "Mon, 5 Sep 2022 19:02:26 +0530",
        "Message-ID": "<20220905133228.818616-29-ndabilpuram@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220905133228.818616-1-ndabilpuram@marvell.com>",
        "References": "<20220809184908.24030-1-ndabilpuram@marvell.com>\n <20220905133228.818616-1-ndabilpuram@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "JwPHLH5h979kG1conrUL2LkdTW31uyaz",
        "X-Proofpoint-GUID": "JwPHLH5h979kG1conrUL2LkdTW31uyaz",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1\n definitions=2022-09-05_09,2022-09-05_02,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\nEnable ESN and anti-replay in IPsec capabilities\nAdd support for session update security API\nFix the cpt command population for ESN enabled case\n\nSigned-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>\n---\n drivers/net/cnxk/cn9k_ethdev_sec.c | 139 ++++++++++++++++++++++++++++-\n 1 file changed, 137 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/cnxk/cn9k_ethdev_sec.c b/drivers/net/cnxk/cn9k_ethdev_sec.c\nindex 90cb1d252d..6dc5ebed5d 100644\n--- a/drivers/net/cnxk/cn9k_ethdev_sec.c\n+++ b/drivers/net/cnxk/cn9k_ethdev_sec.c\n@@ -296,8 +296,10 @@ static const struct rte_security_capability cn9k_eth_sec_capabilities[] = {\n \t\t\t.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,\n \t\t\t.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,\n \t\t\t.direction = RTE_SECURITY_IPSEC_SA_DIR_INGRESS,\n+\t\t\t.replay_win_sz_max = CNXK_ON_AR_WIN_SIZE_MAX,\n \t\t\t.options = {\n-\t\t\t\t\t.udp_encap = 1\n+\t\t\t\t\t.udp_encap = 1,\n+\t\t\t\t\t.esn = 1\n \t\t\t\t}\n \t\t},\n \t\t.crypto_capabilities = cn9k_eth_sec_crypto_caps,\n@@ -312,7 +314,8 @@ static const struct rte_security_capability cn9k_eth_sec_capabilities[] = {\n \t\t\t.direction = RTE_SECURITY_IPSEC_SA_DIR_EGRESS,\n \t\t\t.options = {\n \t\t\t\t\t.udp_encap = 1,\n-\t\t\t\t\t.iv_gen_disable = 1\n+\t\t\t\t\t.iv_gen_disable = 1,\n+\t\t\t\t\t.esn = 1\n \t\t\t\t}\n \t\t},\n \t\t.crypto_capabilities = cn9k_eth_sec_crypto_caps,\n@@ -375,6 +378,137 @@ outb_dbg_iv_update(struct roc_ie_on_common_sa *common_sa, const char *__iv_str)\n \tfree(iv_str);\n }\n \n+static int\n+cn9k_eth_sec_session_update(void *device,\n+\t\t\t    struct rte_security_session *sess,\n+\t\t\t    struct rte_security_session_conf *conf)\n+{\n+\tstruct rte_eth_dev *eth_dev = (struct rte_eth_dev *)device;\n+\tstruct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev);\n+\tstruct rte_security_ipsec_xform *ipsec;\n+\tstruct cn9k_outb_priv_data *outb_priv;\n+\tstruct cnxk_ipsec_outb_rlens *rlens;\n+\tstruct cn9k_sec_sess_priv sess_priv;\n+\tstruct rte_crypto_sym_xform *crypto;\n+\tstruct cnxk_eth_sec_sess *eth_sec;\n+\tstruct roc_ie_on_outb_sa *outb_sa;\n+\trte_spinlock_t *lock;\n+\tchar tbuf[128] = {0};\n+\tconst char *iv_str;\n+\tuint32_t sa_idx;\n+\tint ctx_len;\n+\tint rc = 0;\n+\n+\tif (conf->action_type != RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL)\n+\t\treturn -ENOTSUP;\n+\n+\tif (conf->protocol != RTE_SECURITY_PROTOCOL_IPSEC)\n+\t\treturn -ENOTSUP;\n+\n+\tif (rte_security_dynfield_register() < 0)\n+\t\treturn -ENOTSUP;\n+\n+\tipsec = &conf->ipsec;\n+\tcrypto = conf->crypto_xform;\n+\n+\tif (ipsec->direction == RTE_SECURITY_IPSEC_SA_DIR_INGRESS)\n+\t\treturn -ENOTSUP;\n+\n+\teth_sec = cnxk_eth_sec_sess_get_by_sess(dev, sess);\n+\tif (!eth_sec)\n+\t\treturn -ENOENT;\n+\n+\teth_sec->spi = conf->ipsec.spi;\n+\n+\tlock = &dev->outb.lock;\n+\trte_spinlock_lock(lock);\n+\n+\toutb_sa = eth_sec->sa;\n+\toutb_priv = roc_nix_inl_on_ipsec_outb_sa_sw_rsvd(outb_sa);\n+\tsa_idx = outb_priv->sa_idx;\n+\n+\t/* Disable SA */\n+\toutb_sa->common_sa.ctl.valid = 0;\n+\n+\t/* Sync SA content */\n+\tplt_atomic_thread_fence(__ATOMIC_ACQ_REL);\n+\n+\tsess_priv.u64 = 0;\n+\tmemset(outb_sa, 0, sizeof(struct roc_ie_on_outb_sa));\n+\n+\t/* Fill outbound sa params */\n+\trc = cnxk_on_ipsec_outb_sa_create(ipsec, crypto, outb_sa);\n+\tif (rc < 0) {\n+\t\tsnprintf(tbuf, sizeof(tbuf),\n+\t\t\t \"Failed to init outbound sa, rc=%d\", rc);\n+\t\trc |= cnxk_eth_outb_sa_idx_put(dev, sa_idx);\n+\t\tgoto exit;\n+\t}\n+\n+\tctx_len = rc;\n+\trc = roc_nix_inl_ctx_write(&dev->nix, outb_sa, outb_sa, false,\n+\t\t\t\t   ctx_len);\n+\tif (rc) {\n+\t\tsnprintf(tbuf, sizeof(tbuf),\n+\t\t\t \"Failed to init outbound sa, rc=%d\", rc);\n+\t\trc |= cnxk_eth_outb_sa_idx_put(dev, sa_idx);\n+\t\tgoto exit;\n+\t}\n+\n+\t/* When IV is provided by the application,\n+\t * copy the IV to context and enable explicit IV flag in context.\n+\t */\n+\tif (ipsec->options.iv_gen_disable == 1) {\n+\t\toutb_sa->common_sa.ctl.explicit_iv_en = 1;\n+\t\tiv_str = getenv(\"ETH_SEC_IV_OVR\");\n+\t\tif (iv_str)\n+\t\t\toutb_dbg_iv_update(&outb_sa->common_sa, iv_str);\n+\t}\n+\n+\toutb_priv->userdata = conf->userdata;\n+\toutb_priv->eth_sec = eth_sec;\n+\t/* Start sequence number with 1 */\n+\toutb_priv->esn = ipsec->esn.value;\n+\n+\tmemcpy(&outb_priv->nonce, outb_sa->common_sa.iv.gcm.nonce, 4);\n+\tif (outb_sa->common_sa.ctl.enc_type == ROC_IE_ON_SA_ENC_AES_GCM)\n+\t\toutb_priv->copy_salt = 1;\n+\n+\trlens = &outb_priv->rlens;\n+\t/* Save rlen info */\n+\tcnxk_ipsec_outb_rlens_get(rlens, ipsec, crypto);\n+\n+\tsess_priv.sa_idx = outb_priv->sa_idx;\n+\tsess_priv.roundup_byte = rlens->roundup_byte;\n+\tsess_priv.roundup_len = rlens->roundup_len;\n+\tsess_priv.partial_len = rlens->partial_len;\n+\n+\t/* Pointer from eth_sec -> outb_sa */\n+\teth_sec->sa = outb_sa;\n+\teth_sec->sess = sess;\n+\teth_sec->sa_idx = sa_idx;\n+\teth_sec->spi = ipsec->spi;\n+\n+\t/* Sync SA content */\n+\tplt_atomic_thread_fence(__ATOMIC_ACQ_REL);\n+\n+\trte_spinlock_unlock(lock);\n+\n+\tplt_nix_dbg(\"Created outbound session with spi=%u, sa_idx=%u\",\n+\t\t    eth_sec->spi, eth_sec->sa_idx);\n+\n+\t/* Update fast path info in priv area.\n+\t */\n+\tset_sec_session_private_data(sess, (void *)sess_priv.u64);\n+\n+\treturn 0;\n+exit:\n+\trte_spinlock_unlock(lock);\n+\tif (rc)\n+\t\tplt_err(\"%s\", tbuf);\n+\treturn rc;\n+}\n+\n static int\n cn9k_eth_sec_session_create(void *device,\n \t\t\t    struct rte_security_session_conf *conf,\n@@ -678,6 +812,7 @@ cn9k_eth_sec_ops_override(void)\n \n \t/* Update platform specific ops */\n \tcnxk_eth_sec_ops.session_create = cn9k_eth_sec_session_create;\n+\tcnxk_eth_sec_ops.session_update = cn9k_eth_sec_session_update;\n \tcnxk_eth_sec_ops.session_destroy = cn9k_eth_sec_session_destroy;\n \tcnxk_eth_sec_ops.capabilities_get = cn9k_eth_sec_capabilities_get;\n }\n",
    "prefixes": [
        "v2",
        "29/31"
    ]
}