get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 55607,
    "url": "http://patches.dpdk.org/api/patches/55607/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190628182354.228-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": "<20190628182354.228-3-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190628182354.228-3-pbhagavatula@marvell.com",
    "date": "2019-06-28T18:23:13",
    "name": "[v3,02/42] event/octeontx2: add init and fini for octeontx2 SSO object",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "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": "jerin.jacob@caviumnetworks.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190628182354.228-3-pbhagavatula@marvell.com/mbox/",
    "series": [
        {
            "id": 5227,
            "url": "http://patches.dpdk.org/api/series/5227/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5227",
            "date": "2019-06-28T18:23:11",
            "name": "OCTEONTX2 event device driver",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/5227/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/55607/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/55607/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "X-BeenThere": "dev@dpdk.org",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "MIME-Version": "1.0",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "From": "<pbhagavatula@marvell.com>",
        "To": "<jerinj@marvell.com>, Pavan Nikhilesh <pbhagavatula@marvell.com>",
        "CC": "<dev@dpdk.org>, Nithin Dabilpuram <ndabilpuram@marvell.com>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:, ,\n\tdefinitions=2019-06-28_08:, , signatures=0",
        "In-Reply-To": "<20190628182354.228-1-pbhagavatula@marvell.com>",
        "Delivered-To": "patchwork@dpdk.org",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "X-Mailer": "git-send-email 2.17.1",
        "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=FoQ5sr+zjjpIxg9RQQpH+zmKMIv6wRUV9CmiUCGY1HGys6FtiOJO9qG/Wc3A5JPA+6zx\n\t6s7cWDzCN6myKfgbY8R9KxRgHQFsrqDGF0Oae440Znuh07ti52+Myd4phlIb6GR7ry43\n\tT0VlvhlaLztIdLIZkK5RQxV2yF4t8MLcjlDNJAzQFCyfVM2dvBXcxOsYJHF3pdzlw4xE\n\trFuWpze6l+6+Rjl1/ufEkBQ9ISSXriNdCpRSArw3NHxzD0iQ9/U0Moh+WnTYSXTBz6Js\n\t8sxyqOy/IyWzz2T54z6wQn5b0eipAZbNhaMrsfThZo5hJXGU3XxYN/8gnRq7H+P7AUz2\n\tEw== ",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 684A34C99;\n\tFri, 28 Jun 2019 20:24:07 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n\t[67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 263CF4C8B\n\tfor <dev@dpdk.org>; Fri, 28 Jun 2019 20:24:05 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n\tby mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id\n\tx5SIKUAw010606 for <dev@dpdk.org>; Fri, 28 Jun 2019 11:24:05 -0700",
            "from sc-exch03.marvell.com ([199.233.58.183])\n\tby mx0b-0016f401.pphosted.com with ESMTP id 2tdkg191fp-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n\tfor <dev@dpdk.org>; Fri, 28 Jun 2019 11:24:04 -0700",
            "from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com\n\t(10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tFri, 28 Jun 2019 11:24:02 -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 11:24:02 -0700",
            "from BG-LT7430.marvell.com (unknown [10.28.17.12])\n\tby maili.marvell.com (Postfix) with ESMTP id C786B3F7040;\n\tFri, 28 Jun 2019 11:24:00 -0700 (PDT)"
        ],
        "X-Original-To": "patchwork@dpdk.org",
        "Content-Type": "text/plain",
        "Message-ID": "<20190628182354.228-3-pbhagavatula@marvell.com>",
        "Content-Transfer-Encoding": "8bit",
        "X-Mailman-Version": "2.1.15",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Errors-To": "dev-bounces@dpdk.org",
        "References": "<20190628182354.228-1-pbhagavatula@marvell.com>",
        "Subject": "[dpdk-dev] [PATCH v3 02/42] event/octeontx2: add init and fini for\n\tocteontx2 SSO object",
        "Date": "Fri, 28 Jun 2019 23:53:13 +0530",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Precedence": "list"
    },
    "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": [
        "v3",
        "02/42"
    ]
}