get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 55537,
    "url": "http://patches.dpdk.org/api/patches/55537/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190628075024.404-3-pbhagavatula@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": "<20190628075024.404-3-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190628075024.404-3-pbhagavatula@marvell.com",
    "date": "2019-06-28T07:49:41",
    "name": "[v2,02/44] event/octeontx2: add init and fini for octeontx2 SSO object",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "735b4795de54191153bcdb5b86692475eb62cf1e",
    "submitter": {
        "id": 1183,
        "url": "http://patches.dpdk.org/api/people/1183/?format=api",
        "name": "Pavan Nikhilesh Bhagavatula",
        "email": "pbhagavatula@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190628075024.404-3-pbhagavatula@marvell.com/mbox/",
    "series": [
        {
            "id": 5217,
            "url": "http://patches.dpdk.org/api/series/5217/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5217",
            "date": "2019-06-28T07:49:39",
            "name": "OCTEONTX2 event device driver",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/5217/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/55537/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/55537/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 2D9B51B203;\n\tFri, 28 Jun 2019 09:50:38 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n\t[67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 34894325F\n\tfor <dev@dpdk.org>; Fri, 28 Jun 2019 09:50:34 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n\tby mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id\n\tx5S7o7bn001145 for <dev@dpdk.org>; Fri, 28 Jun 2019 00:50:33 -0700",
            "from sc-exch02.marvell.com ([199.233.58.182])\n\tby mx0a-0016f401.pphosted.com with ESMTP id 2tdd778apc-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n\tfor <dev@dpdk.org>; Fri, 28 Jun 2019 00:50:33 -0700",
            "from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com\n\t(10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tFri, 28 Jun 2019 00:50:32 -0700",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com\n\t(10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend\n\tTransport; Fri, 28 Jun 2019 00:50:32 -0700",
            "from BG-LT7430.marvell.com (bg-lt7430.marvell.com [10.28.10.255])\n\tby maili.marvell.com (Postfix) with ESMTP id DE1E53F7040;\n\tFri, 28 Jun 2019 00:50:30 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n\th=from : to : cc :\n\tsubject : date : message-id : in-reply-to : references : mime-version\n\t: content-transfer-encoding : content-type; s=pfpt0818;\n\tbh=fjQaab3jdrqvSHvvjVkWN1iSulD8I37vJOw8kuNAw8g=;\n\tb=eUIZ2kpH48SyARGGkbkodi4L6Dd703dEvi/JlAvLqkf/qSmioLPwrmir6bUSWsYAwezs\n\tJzBQYV9J9sCn/CDOA9w383bUNkihtzyhSH78IHeOyG3zKaftZwX4dIOP4kw9FqfjRai9\n\tlrW8UmB20SBFsSC/P+N+H/Tim5/JL6k+ypYKhps4MysWQBeAe/8c7nvnCmAz/48MHRsn\n\toQnjzoSLDN1U8vqyeE0k82l+nlK+3UHhgHWR7S8NIt4xBdr/mTx3ZKs9U9igwZvlez14\n\tX5X2IM1wzuwS6FEJ917UTHncQGWsdau5LQQKlOEk6HK9RpWxEH+vTNSf9C9Tkgu0fE4a\n\thg== ",
        "From": "<pbhagavatula@marvell.com>",
        "To": "<jerinj@marvell.com>",
        "CC": "<dev@dpdk.org>, Pavan Nikhilesh <pbhagavatula@marvell.com>, \"Nithin\n\tDabilpuram\" <ndabilpuram@marvell.com>",
        "Date": "Fri, 28 Jun 2019 13:19:41 +0530",
        "Message-ID": "<20190628075024.404-3-pbhagavatula@marvell.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190628075024.404-1-pbhagavatula@marvell.com>",
        "References": "<20190628075024.404-1-pbhagavatula@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:, ,\n\tdefinitions=2019-06-28_02:, , signatures=0",
        "Subject": "[dpdk-dev] [PATCH v2 02/44] event/octeontx2: add init and fini for\n\tocteontx2 SSO object",
        "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": "From: Pavan Nikhilesh <pbhagavatula@marvell.com>\n\nSSO object needs to be initialized to communicate with the kernel AF\ndriver through mbox using the common API's.\nAlso, initialize the internal eventdev structure to defaults.\nAttach NPA lf to the PF if needed.\n\nSigned-off-by: Jerin Jacob <jerinj@marvell.com>\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\nSigned-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>\nAcked-by: Jerin Jacob <jerinj@marvell.com>\n---\n drivers/event/octeontx2/Makefile     |  2 +-\n drivers/event/octeontx2/meson.build  |  2 +-\n drivers/event/octeontx2/otx2_evdev.c | 84 +++++++++++++++++++++++++++-\n drivers/event/octeontx2/otx2_evdev.h | 22 +++++++-\n 4 files changed, 105 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/event/octeontx2/Makefile b/drivers/event/octeontx2/Makefile\nindex dbf6ec22d..36f0b2b12 100644\n--- a/drivers/event/octeontx2/Makefile\n+++ b/drivers/event/octeontx2/Makefile\n@@ -34,6 +34,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_EVENTDEV) += otx2_evdev.c\n \n LDLIBS += -lrte_eal -lrte_bus_pci -lrte_pci\n LDLIBS += -lrte_eventdev\n-LDLIBS += -lrte_common_octeontx2\n+LDLIBS += -lrte_common_octeontx2 -lrte_mempool_octeontx2\n \n include $(RTE_SDK)/mk/rte.lib.mk\ndiff --git a/drivers/event/octeontx2/meson.build b/drivers/event/octeontx2/meson.build\nindex c4f442174..3fc96421d 100644\n--- a/drivers/event/octeontx2/meson.build\n+++ b/drivers/event/octeontx2/meson.build\n@@ -18,4 +18,4 @@ foreach flag: extra_flags\n \tendif\n endforeach\n \n-deps += ['bus_pci', 'common_octeontx2']\n+deps += ['bus_pci', 'common_octeontx2', 'mempool_octeontx2']\ndiff --git a/drivers/event/octeontx2/otx2_evdev.c b/drivers/event/octeontx2/otx2_evdev.c\nindex faffd3f0c..08ae820b9 100644\n--- a/drivers/event/octeontx2/otx2_evdev.c\n+++ b/drivers/event/octeontx2/otx2_evdev.c\n@@ -46,22 +46,102 @@ static struct rte_pci_driver pci_sso = {\n int\n otx2_sso_init(struct rte_eventdev *event_dev)\n {\n-\tRTE_SET_USED(event_dev);\n+\tstruct free_rsrcs_rsp *rsrc_cnt;\n+\tstruct rte_pci_device *pci_dev;\n+\tstruct otx2_sso_evdev *dev;\n+\tint rc;\n+\n \t/* For secondary processes, the primary has done all the work */\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n \t\treturn 0;\n \n+\tdev = sso_pmd_priv(event_dev);\n+\n+\tpci_dev = container_of(event_dev->dev, struct rte_pci_device, device);\n+\n+\t/* Initialize the base otx2_dev object */\n+\trc = otx2_dev_init(pci_dev, dev);\n+\tif (rc < 0) {\n+\t\totx2_err(\"Failed to initialize otx2_dev rc=%d\", rc);\n+\t\tgoto error;\n+\t}\n+\n+\t/* Get SSO and SSOW MSIX rsrc cnt */\n+\totx2_mbox_alloc_msg_free_rsrc_cnt(dev->mbox);\n+\trc = otx2_mbox_process_msg(dev->mbox, (void *)&rsrc_cnt);\n+\tif (rc < 0) {\n+\t\totx2_err(\"Unable to get free rsrc count\");\n+\t\tgoto otx2_dev_uninit;\n+\t}\n+\totx2_sso_dbg(\"SSO %d SSOW %d NPA %d provisioned\", rsrc_cnt->sso,\n+\t\t     rsrc_cnt->ssow, rsrc_cnt->npa);\n+\n+\tdev->max_event_ports = RTE_MIN(rsrc_cnt->ssow, OTX2_SSO_MAX_VHWS);\n+\tdev->max_event_queues = RTE_MIN(rsrc_cnt->sso, OTX2_SSO_MAX_VHGRP);\n+\t/* Grab the NPA LF if required */\n+\trc = otx2_npa_lf_init(pci_dev, dev);\n+\tif (rc < 0) {\n+\t\totx2_err(\"Unable to init NPA lf. It might not be provisioned\");\n+\t\tgoto otx2_dev_uninit;\n+\t}\n+\n+\tdev->drv_inited = true;\n+\tdev->is_timeout_deq = 0;\n+\tdev->min_dequeue_timeout_ns = USEC2NSEC(1);\n+\tdev->max_dequeue_timeout_ns = USEC2NSEC(0x3FF);\n+\tdev->max_num_events = -1;\n+\tdev->nb_event_queues = 0;\n+\tdev->nb_event_ports = 0;\n+\n+\tif (!dev->max_event_ports || !dev->max_event_queues) {\n+\t\totx2_err(\"Not enough eventdev resource queues=%d ports=%d\",\n+\t\t\t dev->max_event_queues, dev->max_event_ports);\n+\t\trc = -ENODEV;\n+\t\tgoto otx2_npa_lf_uninit;\n+\t}\n+\n+\totx2_sso_pf_func_set(dev->pf_func);\n+\totx2_sso_dbg(\"Initializing %s max_queues=%d max_ports=%d\",\n+\t\t     event_dev->data->name, dev->max_event_queues,\n+\t\t     dev->max_event_ports);\n+\n+\n \treturn 0;\n+\n+otx2_npa_lf_uninit:\n+\totx2_npa_lf_fini();\n+otx2_dev_uninit:\n+\totx2_dev_fini(pci_dev, dev);\n+error:\n+\treturn rc;\n }\n \n int\n otx2_sso_fini(struct rte_eventdev *event_dev)\n {\n-\tRTE_SET_USED(event_dev);\n+\tstruct otx2_sso_evdev *dev = sso_pmd_priv(event_dev);\n+\tstruct rte_pci_device *pci_dev;\n+\n \t/* For secondary processes, nothing to be done */\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n \t\treturn 0;\n \n+\tpci_dev = container_of(event_dev->dev, struct rte_pci_device, device);\n+\n+\tif (!dev->drv_inited)\n+\t\tgoto dev_fini;\n+\n+\tdev->drv_inited = false;\n+\totx2_npa_lf_fini();\n+\n+dev_fini:\n+\tif (otx2_npa_lf_active(dev)) {\n+\t\totx2_info(\"Common resource in use by other devices\");\n+\t\treturn -EAGAIN;\n+\t}\n+\n+\totx2_dev_fini(pci_dev, dev);\n+\n \treturn 0;\n }\n \ndiff --git a/drivers/event/octeontx2/otx2_evdev.h b/drivers/event/octeontx2/otx2_evdev.h\nindex 1df233293..4427efcad 100644\n--- a/drivers/event/octeontx2/otx2_evdev.h\n+++ b/drivers/event/octeontx2/otx2_evdev.h\n@@ -8,6 +8,8 @@\n #include <rte_eventdev.h>\n \n #include \"otx2_common.h\"\n+#include \"otx2_dev.h\"\n+#include \"otx2_mempool.h\"\n \n #define EVENTDEV_NAME_OCTEONTX2_PMD otx2_eventdev\n \n@@ -16,8 +18,26 @@\n #define OTX2_SSO_MAX_VHGRP                  RTE_EVENT_MAX_QUEUES_PER_DEV\n #define OTX2_SSO_MAX_VHWS                   (UINT8_MAX)\n \n+#define USEC2NSEC(__us)                 ((__us) * 1E3)\n+\n struct otx2_sso_evdev {\n-};\n+\tOTX2_DEV; /* Base class */\n+\tuint8_t max_event_queues;\n+\tuint8_t max_event_ports;\n+\tuint8_t is_timeout_deq;\n+\tuint8_t nb_event_queues;\n+\tuint8_t nb_event_ports;\n+\tuint32_t deq_tmo_ns;\n+\tuint32_t min_dequeue_timeout_ns;\n+\tuint32_t max_dequeue_timeout_ns;\n+\tint32_t max_num_events;\n+} __rte_cache_aligned;\n+\n+static inline struct otx2_sso_evdev *\n+sso_pmd_priv(const struct rte_eventdev *event_dev)\n+{\n+\treturn event_dev->data->dev_private;\n+}\n \n /* Init and Fini API's */\n int otx2_sso_init(struct rte_eventdev *event_dev);\n",
    "prefixes": [
        "v2",
        "02/44"
    ]
}