get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 65515,
    "url": "http://patches.dpdk.org/api/patches/65515/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1580815045-32132-5-git-send-email-anoobj@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": "<1580815045-32132-5-git-send-email-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1580815045-32132-5-git-send-email-anoobj@marvell.com",
    "date": "2020-02-04T11:17:14",
    "name": "[v4,04/15] net/octeontx2: create eth security ctx",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a48b4579c9736a8f615c81409aeba61b57a2d72e",
    "submitter": {
        "id": 1205,
        "url": "http://patches.dpdk.org/api/people/1205/?format=api",
        "name": "Anoob Joseph",
        "email": "anoobj@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/1580815045-32132-5-git-send-email-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 8411,
            "url": "http://patches.dpdk.org/api/series/8411/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8411",
            "date": "2020-02-04T11:17:10",
            "name": "add OCTEON TX2 inline IPsec support",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/8411/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/65515/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/65515/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 12824A0532;\n\tTue,  4 Feb 2020 12:18:50 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id BA94D1C0C2;\n\tTue,  4 Feb 2020 12:18:32 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 75D481C0C2\n for <dev@dpdk.org>; Tue,  4 Feb 2020 12:18:31 +0100 (CET)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n 014BFjha011394; Tue, 4 Feb 2020 03:18:30 -0800",
            "from sc-exch04.marvell.com ([199.233.58.184])\n by mx0b-0016f401.pphosted.com with ESMTP id 2xw9qukg19-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Tue, 04 Feb 2020 03:18:30 -0800",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH04.marvell.com\n (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Tue, 4 Feb 2020 03:18:28 -0800",
            "from SC-EXCH01.marvell.com (10.93.176.81) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Tue, 4 Feb 2020 03:18:28 -0800",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com\n (10.93.176.81) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Tue, 4 Feb 2020 03:18:28 -0800",
            "from ajoseph83.caveonetworks.com (unknown [10.29.45.60])\n by maili.marvell.com (Postfix) with ESMTP id D1F243F7068;\n Tue,  4 Feb 2020 03:18:23 -0800 (PST)"
        ],
        "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=pfpt0818;\n bh=k9bB1+dNx6kvKlDbrns+1k8jC0E/+ri/KcYL/OEvRfg=;\n b=RdEuYPF6wX3WP72IzgxDjpIS33Q3Wcc48LvRFi564j4eXtsiwV9wmuIQ84OvSsjNjDsC\n UTbODP9jtsR61x7LdpAo6/DEDlWn/1FplXqOZxXcz3mgHGv8fJA2msE4Qs5ZhhfJz6vt\n F3BIOEheNwGlcvlnOZHg2UaDAmsj19iItq4IxXubdpmM2kvTJcp9X9LdBPk0lxBcuDYk\n CT8/ydwxSDzHdy+0h8Mu3CvB6AKDkxleMQG04zqMnlC3P2/xADOpSLL/SnWN/DdOuxY8\n UQBu/sEFvLwF4HiXJXyI27rokOZYt92GmVRSN3P+0uhcMNiQZn1sN5I/frOtNFh21GM3 6Q==",
        "From": "Anoob Joseph <anoobj@marvell.com>",
        "To": "Akhil Goyal <akhil.goyal@nxp.com>, Declan Doherty\n <declan.doherty@intel.com>, Thomas Monjalon <thomas@monjalon.net>",
        "CC": "Anoob Joseph <anoobj@marvell.com>, Jerin Jacob <jerinj@marvell.com>,\n Narayana Prasad <pathreya@marvell.com>, Kiran Kumar K\n <kirankumark@marvell.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>,\n \"Pavan Nikhilesh\" <pbhagavatula@marvell.com>, Ankur Dwivedi\n <adwivedi@marvell.com>, Archana Muniganti <marchana@marvell.com>, Tejasree\n Kondoj <ktejasree@marvell.com>, Vamsi Attunuru <vattunuru@marvell.com>,\n \"Lukasz Bartosik\" <lbartosik@marvell.com>, <dev@dpdk.org>",
        "Date": "Tue, 4 Feb 2020 16:47:14 +0530",
        "Message-ID": "<1580815045-32132-5-git-send-email-anoobj@marvell.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1580815045-32132-1-git-send-email-anoobj@marvell.com>",
        "References": "<1580465035-30455-1-git-send-email-anoobj@marvell.com>\n <1580815045-32132-1-git-send-email-anoobj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572\n definitions=2020-02-04_02:2020-02-04,\n 2020-02-04 signatures=0",
        "Subject": "[dpdk-dev] [PATCH v4 04/15] net/octeontx2: create eth security ctx",
        "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 <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 security ctx to the eth device.\n\nSigned-off-by: Ankur Dwivedi <adwivedi@marvell.com>\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\nSigned-off-by: Archana Muniganti <marchana@marvell.com>\nSigned-off-by: Tejasree Kondoj <ktejasree@marvell.com>\nSigned-off-by: Vamsi Attunuru <vattunuru@marvell.com>\n---\n MAINTAINERS                             |  1 +\n drivers/net/octeontx2/Makefile          |  1 +\n drivers/net/octeontx2/meson.build       |  4 +++-\n drivers/net/octeontx2/otx2_ethdev.c     | 15 +++++++++++++-\n drivers/net/octeontx2/otx2_ethdev_sec.c | 35 +++++++++++++++++++++++++++++++++\n drivers/net/octeontx2/otx2_ethdev_sec.h | 14 +++++++++++++\n 6 files changed, 68 insertions(+), 2 deletions(-)\n create mode 100644 drivers/net/octeontx2/otx2_ethdev_sec.c\n create mode 100644 drivers/net/octeontx2/otx2_ethdev_sec.h",
    "diff": "diff --git a/MAINTAINERS b/MAINTAINERS\nindex 7b1ea56..5d05b29 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -728,6 +728,7 @@ Marvell OCTEON TX2 - security\n M: Anoob Joseph <anoobj@marvell.com>\n T: git://dpdk.org/next/dpdk-next-crypto\n F: drivers/common/octeontx2/otx2_sec*\n+F: drivers/net/octeontx2/otx2_ethdev_sec*\n \n Mellanox mlx4\n M: Matan Azrad <matan@mellanox.com>\ndiff --git a/drivers/net/octeontx2/Makefile b/drivers/net/octeontx2/Makefile\nindex 68f5765..8649f89 100644\n--- a/drivers/net/octeontx2/Makefile\n+++ b/drivers/net/octeontx2/Makefile\n@@ -50,6 +50,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX2_PMD) += \\\n \totx2_flow_utils.c \\\n \totx2_ethdev_irq.c \\\n \totx2_ethdev_ops.c \\\n+\totx2_ethdev_sec.c \\\n \totx2_ethdev_debug.c \\\n \totx2_ethdev_devargs.c\n \ndiff --git a/drivers/net/octeontx2/meson.build b/drivers/net/octeontx2/meson.build\nindex fad3076..dfbf99a 100644\n--- a/drivers/net/octeontx2/meson.build\n+++ b/drivers/net/octeontx2/meson.build\n@@ -20,11 +20,13 @@ sources = files('otx2_rx.c',\n \t\t'otx2_flow_utils.c',\n \t\t'otx2_ethdev_irq.c',\n \t\t'otx2_ethdev_ops.c',\n+\t\t'otx2_ethdev_sec.c',\n \t\t'otx2_ethdev_debug.c',\n \t\t'otx2_ethdev_devargs.c'\n \t\t)\n \n-deps += ['bus_pci', 'common_octeontx2', 'mempool_octeontx2']\n+deps += ['bus_pci', 'cryptodev', 'security']\n+deps += ['common_octeontx2', 'mempool_octeontx2']\n \n cflags += ['-flax-vector-conversions']\n \ndiff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c\nindex 268b383..7fd5254 100644\n--- a/drivers/net/octeontx2/otx2_ethdev.c\n+++ b/drivers/net/octeontx2/otx2_ethdev.c\n@@ -12,6 +12,7 @@\n #include <rte_mempool.h>\n \n #include \"otx2_ethdev.h\"\n+#include \"otx2_ethdev_sec.h\"\n \n static inline uint64_t\n nix_get_rx_offload_capa(struct otx2_eth_dev *dev)\n@@ -2243,10 +2244,17 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev)\n \t\tdev->hwcap |= OTX2_FIXUP_F_LIMIT_CQ_FULL;\n \t}\n \n+\t/* Create security ctx */\n+\trc = otx2_eth_sec_ctx_create(eth_dev);\n+\tif (rc)\n+\t\tgoto free_mac_addrs;\n+\tdev->tx_offload_capa |= DEV_TX_OFFLOAD_SECURITY;\n+\tdev->rx_offload_capa |= DEV_RX_OFFLOAD_SECURITY;\n+\n \t/* Initialize rte-flow */\n \trc = otx2_flow_init(dev);\n \tif (rc)\n-\t\tgoto free_mac_addrs;\n+\t\tgoto sec_ctx_destroy;\n \n \totx2_nix_mc_filter_init(dev);\n \n@@ -2257,6 +2265,8 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev)\n \t\t     dev->rx_offload_capa, dev->tx_offload_capa);\n \treturn 0;\n \n+sec_ctx_destroy:\n+\totx2_eth_sec_ctx_destroy(eth_dev);\n free_mac_addrs:\n \trte_free(eth_dev->data->mac_addrs);\n unregister_irq:\n@@ -2340,6 +2350,9 @@ otx2_eth_dev_uninit(struct rte_eth_dev *eth_dev, bool mbox_close)\n \tif (rc)\n \t\totx2_err(\"Failed to cleanup npa lf, rc=%d\", rc);\n \n+\t/* Destroy security ctx */\n+\totx2_eth_sec_ctx_destroy(eth_dev);\n+\n \trte_free(eth_dev->data->mac_addrs);\n \teth_dev->data->mac_addrs = NULL;\n \tdev->drv_inited = false;\ndiff --git a/drivers/net/octeontx2/otx2_ethdev_sec.c b/drivers/net/octeontx2/otx2_ethdev_sec.c\nnew file mode 100644\nindex 0000000..80c5689\n--- /dev/null\n+++ b/drivers/net/octeontx2/otx2_ethdev_sec.c\n@@ -0,0 +1,35 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (C) 2020 Marvell International Ltd.\n+ */\n+\n+#include <rte_ethdev.h>\n+#include <rte_malloc.h>\n+#include <rte_security.h>\n+\n+#include \"otx2_ethdev_sec.h\"\n+\n+int\n+otx2_eth_sec_ctx_create(struct rte_eth_dev *eth_dev)\n+{\n+\tstruct rte_security_ctx *ctx;\n+\n+\tctx = rte_malloc(\"otx2_eth_sec_ctx\",\n+\t\t\t sizeof(struct rte_security_ctx), 0);\n+\tif (ctx == NULL)\n+\t\treturn -ENOMEM;\n+\n+\t/* Populate ctx */\n+\n+\tctx->device = eth_dev;\n+\tctx->sess_cnt = 0;\n+\n+\teth_dev->security_ctx = ctx;\n+\n+\treturn 0;\n+}\n+\n+void\n+otx2_eth_sec_ctx_destroy(struct rte_eth_dev *eth_dev)\n+{\n+\trte_free(eth_dev->security_ctx);\n+}\ndiff --git a/drivers/net/octeontx2/otx2_ethdev_sec.h b/drivers/net/octeontx2/otx2_ethdev_sec.h\nnew file mode 100644\nindex 0000000..4a925e9\n--- /dev/null\n+++ b/drivers/net/octeontx2/otx2_ethdev_sec.h\n@@ -0,0 +1,14 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (C) 2020 Marvell International Ltd.\n+ */\n+\n+#ifndef __OTX2_ETHDEV_SEC_H__\n+#define __OTX2_ETHDEV_SEC_H__\n+\n+#include <rte_ethdev.h>\n+\n+int otx2_eth_sec_ctx_create(struct rte_eth_dev *eth_dev);\n+\n+void otx2_eth_sec_ctx_destroy(struct rte_eth_dev *eth_dev);\n+\n+#endif /* __OTX2_ETHDEV_SEC_H__ */\n",
    "prefixes": [
        "v4",
        "04/15"
    ]
}