get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 55643,
    "url": "http://patches.dpdk.org/api/patches/55643/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190628182354.228-39-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-39-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190628182354.228-39-pbhagavatula@marvell.com",
    "date": "2019-06-28T18:23:49",
    "name": "[v3,38/42] event/octeontx2: add event timer cancel function",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "91522ea4dc97b030f5476adc5ff7463e9f2a1c8f",
    "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-39-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/55643/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/55643/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>",
        "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=v2bEkk8Y7NcqrIvP6z7EgQLimMULxVYvEdphV6+Gz3Q=;\n\tb=PWWl2DJot54ULyCHZgIRDJJaT2MwWUzM0QgBguzb/Tpna2xJhZ46Kl0SZgrF0Y1P8DVo\n\tl37MTP0TJ5lhUG0P7ptfxrA4fNOVOrFK15Z7QRaBb51ZnTQkuZtwUc85NM6g7pGDv5Jm\n\tgevmRJQZRiP59CusFsbDjJmeRf88wdElMVU3JOF8QKFe39dOlhuGL+ACUvqn14ONFvhp\n\tUb/7TLtXwtpjMHIDxI537UkuXDyILpycCbylSoTXwMfCBc4oF1GwuxMOVOBBo8owFKMC\n\tbeL5/3s0tUkHJZ7CwzAqon5rpYCY4GU3XOc3Jq23AYtwsHV9VKWzxQy1jpUZh8xvbjom\n\toA== ",
        "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 DFD021BBA1;\n\tFri, 28 Jun 2019 20:25:49 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n\t[67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 615B11BAE6\n\tfor <dev@dpdk.org>; Fri, 28 Jun 2019 20:25:29 +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\tx5SILhn5011549 for <dev@dpdk.org>; Fri, 28 Jun 2019 11:25:28 -0700",
            "from sc-exch04.marvell.com ([199.233.58.184])\n\tby mx0a-0016f401.pphosted.com with ESMTP id 2tdd77agqu-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:25:28 -0700",
            "from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com\n\t(10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tFri, 28 Jun 2019 11:25:27 -0700",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com\n\t(10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend\n\tTransport; Fri, 28 Jun 2019 11:25:27 -0700",
            "from BG-LT7430.marvell.com (unknown [10.28.17.12])\n\tby maili.marvell.com (Postfix) with ESMTP id 2C0793F7040;\n\tFri, 28 Jun 2019 11:25:25 -0700 (PDT)"
        ],
        "X-Original-To": "patchwork@dpdk.org",
        "Content-Type": "text/plain",
        "Message-ID": "<20190628182354.228-39-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 38/42] event/octeontx2: add event timer cancel\n\tfunction",
        "Date": "Fri, 28 Jun 2019 23:53:49 +0530",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Precedence": "list"
    },
    "content": "From: Pavan Nikhilesh <pbhagavatula@marvell.com>\n\nAdd function to cancel event timer that has been armed.\n\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n drivers/event/octeontx2/otx2_tim_evdev.c  |  1 +\n drivers/event/octeontx2/otx2_tim_evdev.h  |  4 +++\n drivers/event/octeontx2/otx2_tim_worker.c | 29 ++++++++++++++++++\n drivers/event/octeontx2/otx2_tim_worker.h | 37 +++++++++++++++++++++++\n 4 files changed, 71 insertions(+)",
    "diff": "diff --git a/drivers/event/octeontx2/otx2_tim_evdev.c b/drivers/event/octeontx2/otx2_tim_evdev.c\nindex fabcd3d0a..d95be66c6 100644\n--- a/drivers/event/octeontx2/otx2_tim_evdev.c\n+++ b/drivers/event/octeontx2/otx2_tim_evdev.c\n@@ -53,6 +53,7 @@ TIM_ARM_TMO_FASTPATH_MODES\n \t\t\t\t[tim_ring->ena_dfb][prod_flag];\n \totx2_tim_ops.arm_tmo_tick_burst = arm_tmo_burst[tim_ring->optimized]\n \t\t\t\t[tim_ring->ena_dfb];\n+\totx2_tim_ops.cancel_burst = otx2_tim_timer_cancel_burst;\n }\n \n static void\ndiff --git a/drivers/event/octeontx2/otx2_tim_evdev.h b/drivers/event/octeontx2/otx2_tim_evdev.h\nindex 751659719..7bdd5c8db 100644\n--- a/drivers/event/octeontx2/otx2_tim_evdev.h\n+++ b/drivers/event/octeontx2/otx2_tim_evdev.h\n@@ -191,6 +191,10 @@ uint16_t otx2_tim_arm_tmo_tick_burst_ ## _name(\t\t\t\t\\\n TIM_ARM_TMO_FASTPATH_MODES\n #undef FP\n \n+uint16_t otx2_tim_timer_cancel_burst(\n+\t\tconst struct rte_event_timer_adapter *adptr,\n+\t\tstruct rte_event_timer **tim, const uint16_t nb_timers);\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);\ndiff --git a/drivers/event/octeontx2/otx2_tim_worker.c b/drivers/event/octeontx2/otx2_tim_worker.c\nindex 737b167d1..fd1f02630 100644\n--- a/drivers/event/octeontx2/otx2_tim_worker.c\n+++ b/drivers/event/octeontx2/otx2_tim_worker.c\n@@ -135,3 +135,32 @@ otx2_tim_arm_tmo_tick_burst_ ## _name(\t\t\t\t\t\\\n }\n TIM_ARM_TMO_FASTPATH_MODES\n #undef FP\n+\n+uint16_t\n+otx2_tim_timer_cancel_burst(const struct rte_event_timer_adapter *adptr,\n+\t\t\t    struct rte_event_timer **tim,\n+\t\t\t    const uint16_t nb_timers)\n+{\n+\tuint16_t index;\n+\tint ret;\n+\n+\tRTE_SET_USED(adptr);\n+\tfor (index = 0; index < nb_timers; index++) {\n+\t\tif (tim[index]->state == RTE_EVENT_TIMER_CANCELED) {\n+\t\t\trte_errno = EALREADY;\n+\t\t\tbreak;\n+\t\t}\n+\n+\t\tif (tim[index]->state != RTE_EVENT_TIMER_ARMED) {\n+\t\t\trte_errno = EINVAL;\n+\t\t\tbreak;\n+\t\t}\n+\t\tret = tim_rm_entry(tim[index]);\n+\t\tif (ret) {\n+\t\t\trte_errno = -ret;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\treturn index;\n+}\ndiff --git a/drivers/event/octeontx2/otx2_tim_worker.h b/drivers/event/octeontx2/otx2_tim_worker.h\nindex da8c93ff2..b193e2cab 100644\n--- a/drivers/event/octeontx2/otx2_tim_worker.h\n+++ b/drivers/event/octeontx2/otx2_tim_worker.h\n@@ -410,4 +410,41 @@ tim_add_entry_brst(struct otx2_tim_ring * const tim_ring,\n \treturn nb_timers;\n }\n \n+static int\n+tim_rm_entry(struct rte_event_timer *tim)\n+{\n+\tstruct otx2_tim_ent *entry;\n+\tstruct otx2_tim_bkt *bkt;\n+\tuint64_t lock_sema;\n+\n+\tif (tim->impl_opaque[1] == 0 || tim->impl_opaque[0] == 0)\n+\t\treturn -ENOENT;\n+\n+\tentry = (struct otx2_tim_ent *)(uintptr_t)tim->impl_opaque[0];\n+\tif (entry->wqe != tim->ev.u64) {\n+\t\ttim->impl_opaque[0] = 0;\n+\t\ttim->impl_opaque[1] = 0;\n+\t\treturn -ENOENT;\n+\t}\n+\n+\tbkt = (struct otx2_tim_bkt *)(uintptr_t)tim->impl_opaque[1];\n+\tlock_sema = tim_bkt_inc_lock(bkt);\n+\tif (tim_bkt_get_hbt(lock_sema) || !tim_bkt_get_nent(lock_sema)) {\n+\t\ttim_bkt_dec_lock(bkt);\n+\t\ttim->impl_opaque[0] = 0;\n+\t\ttim->impl_opaque[1] = 0;\n+\t\treturn -ENOENT;\n+\t}\n+\n+\tentry->w0 = 0;\n+\tentry->wqe = 0;\n+\ttim_bkt_dec_lock(bkt);\n+\n+\ttim->state = RTE_EVENT_TIMER_CANCELED;\n+\ttim->impl_opaque[0] = 0;\n+\ttim->impl_opaque[1] = 0;\n+\n+\treturn 0;\n+}\n+\n #endif /* __OTX2_TIM_WORKER_H__ */\n",
    "prefixes": [
        "v3",
        "38/42"
    ]
}