get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54040,
    "url": "http://patches.dpdk.org/api/patches/54040/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190601185355.370-29-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": "<20190601185355.370-29-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190601185355.370-29-pbhagavatula@marvell.com",
    "date": "2019-06-01T18:53:38",
    "name": "[28/44] event/octeontx2: add timer adapter capabilities",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b623efeb9a3ef5fbe47ba1b346a351b652096ad1",
    "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/20190601185355.370-29-pbhagavatula@marvell.com/mbox/",
    "series": [
        {
            "id": 4847,
            "url": "http://patches.dpdk.org/api/series/4847/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4847",
            "date": "2019-06-01T18:53:10",
            "name": "OCTEON TX2 event device driver",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4847/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54040/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/54040/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 8B2231B9FB;\n\tSat,  1 Jun 2019 20:56:59 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n\t[67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 3AFDB1B9BA\n\tfor <dev@dpdk.org>; Sat,  1 Jun 2019 20:56:12 +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\tx51It9nn029954 for <dev@dpdk.org>; Sat, 1 Jun 2019 11:56:11 -0700",
            "from sc-exch03.marvell.com ([199.233.58.183])\n\tby mx0b-0016f401.pphosted.com with ESMTP id 2survk12g2-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n\tfor <dev@dpdk.org>; Sat, 01 Jun 2019 11:56:11 -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\tSat, 1 Jun 2019 11:56:10 -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; Sat, 1 Jun 2019 11:56:10 -0700",
            "from BG-LT7430.marvell.com (unknown [10.28.17.28])\n\tby maili.marvell.com (Postfix) with ESMTP id 254EA3F7040;\n\tSat,  1 Jun 2019 11:56:08 -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=hxqcUvNpYDsSHbDbPfllqNsp9VxQ4AXPZ3FplR1mPOM=;\n\tb=y6eazDCs1vKBf0mBJFh+BvSx9HhI0VEHAp4AC3+HrG6vDt6cmZUiAOQXJlvghzleXFte\n\tTM4ci9jkOM/oE3SGwatqPB9YqstgeaSxTMTh3fRLnruEJCePM0htIHE9rE3O+XVS36C7\n\tEqzBTAQCK9C3JpL9gqndNfps0811ttMJdd4Bfg3mNDZe1bvs/LJzYUw6ewZHQscDaiml\n\t8u/X4DSB+bT+ts3uXOQXPHnuORepfJVxwnymRWpcDLF5BqgmeqIpUpF9HUFfX32X0ILj\n\t7I8SJDHsSsiw7ImVcYDH0t7L/StIRQCK/k0bVzN11myLeIOG4K6EOXpmkV5ZwWhxrnPS\n\tpA== ",
        "From": "<pbhagavatula@marvell.com>",
        "To": "<jerinj@marvell.com>, Pavan Nikhilesh <pbhagavatula@marvell.com>",
        "CC": "<dev@dpdk.org>",
        "Date": "Sun, 2 Jun 2019 00:23:38 +0530",
        "Message-ID": "<20190601185355.370-29-pbhagavatula@marvell.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190601185355.370-1-pbhagavatula@marvell.com>",
        "References": "<20190601185355.370-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-01_13:, , signatures=0",
        "Subject": "[dpdk-dev] [PATCH 28/44] event/octeontx2: add timer adapter\n\tcapabilities",
        "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\nAdd function to retrieve event timer adapter capabilities.\n\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n drivers/event/octeontx2/otx2_evdev.c     |  2 ++\n drivers/event/octeontx2/otx2_tim_evdev.c | 19 +++++++++++++++++++\n drivers/event/octeontx2/otx2_tim_evdev.h | 17 +++++++++++++++++\n 3 files changed, 38 insertions(+)",
    "diff": "diff --git a/drivers/event/octeontx2/otx2_evdev.c b/drivers/event/octeontx2/otx2_evdev.c\nindex c247848be..86b9fee97 100644\n--- a/drivers/event/octeontx2/otx2_evdev.c\n+++ b/drivers/event/octeontx2/otx2_evdev.c\n@@ -1087,6 +1087,8 @@ static struct rte_eventdev_ops otx2_sso_ops = {\n \t.port_unlink      = otx2_sso_port_unlink,\n \t.timeout_ticks    = otx2_sso_timeout_ticks,\n \n+\t.timer_adapter_caps_get = otx2_tim_caps_get,\n+\n \t.xstats_get       = otx2_sso_xstats_get,\n \t.xstats_reset     = otx2_sso_xstats_reset,\n \t.xstats_get_names = otx2_sso_xstats_get_names,\ndiff --git a/drivers/event/octeontx2/otx2_tim_evdev.c b/drivers/event/octeontx2/otx2_tim_evdev.c\nindex a4f6bc673..aa470f0ad 100644\n--- a/drivers/event/octeontx2/otx2_tim_evdev.c\n+++ b/drivers/event/octeontx2/otx2_tim_evdev.c\n@@ -5,6 +5,25 @@\n #include \"otx2_evdev.h\"\n #include \"otx2_tim_evdev.h\"\n \n+int\n+otx2_tim_caps_get(const struct rte_eventdev *evdev, uint64_t flags,\n+\t\t  uint32_t *caps,\n+\t\t  const struct rte_event_timer_adapter_ops **ops)\n+{\n+\tstruct otx2_tim_evdev *dev = otx2_tim_priv_get();\n+\n+\tRTE_SET_USED(flags);\n+\tRTE_SET_USED(ops);\n+\tif (dev == NULL)\n+\t\treturn -ENODEV;\n+\n+\t/* Store evdev pointer for later use. */\n+\tdev->event_dev = (struct rte_eventdev *)(uintptr_t)evdev;\n+\t*caps = RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT;\n+\n+\treturn 0;\n+}\n+\n void\n otx2_tim_init(struct rte_pci_device *pci_dev, struct otx2_dev *cmn_dev)\n {\ndiff --git a/drivers/event/octeontx2/otx2_tim_evdev.h b/drivers/event/octeontx2/otx2_tim_evdev.h\nindex 14bbaf43c..c71094c39 100644\n--- a/drivers/event/octeontx2/otx2_tim_evdev.h\n+++ b/drivers/event/octeontx2/otx2_tim_evdev.h\n@@ -13,11 +13,28 @@\n \n struct otx2_tim_evdev {\n \tstruct rte_pci_device *pci_dev;\n+\tstruct rte_eventdev *event_dev;\n \tstruct otx2_mbox *mbox;\n \tuint16_t nb_rings;\n \tuintptr_t bar2;\n };\n \n+static inline struct otx2_tim_evdev *\n+otx2_tim_priv_get(void)\n+{\n+\tconst struct rte_memzone *mz;\n+\n+\tmz = rte_memzone_lookup(RTE_STR(OTX2_TIM_EVDEV_NAME));\n+\tif (mz == NULL)\n+\t\treturn NULL;\n+\n+\treturn mz->addr;\n+}\n+\n+int otx2_tim_caps_get(const struct rte_eventdev *dev, uint64_t flags,\n+\t\t      uint32_t *caps,\n+\t\t      const struct rte_event_timer_adapter_ops **ops);\n+\n void otx2_tim_init(struct rte_pci_device *pci_dev, struct otx2_dev *cmn_dev);\n \n #endif /* __OTX2_TIM_EVDEV_H__ */\n",
    "prefixes": [
        "28/44"
    ]
}