get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54027,
    "url": "http://patches.dpdk.org/api/patches/54027/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190601185355.370-15-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-15-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190601185355.370-15-pbhagavatula@marvell.com",
    "date": "2019-06-01T18:53:24",
    "name": "[14/44] event/octeontx2: add SSO HW device operations",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "67b2ae9ca841c2fcc2ab1a3aff9d6050ccb95244",
    "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-15-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/54027/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/54027/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 EA57D1B9C4;\n\tSat,  1 Jun 2019 20:56:16 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n\t[67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 6C599378B\n\tfor <dev@dpdk.org>; Sat,  1 Jun 2019 20:55:41 +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\tx51ItbNR029526 for <dev@dpdk.org>; Sat, 1 Jun 2019 11:55:40 -0700",
            "from sc-exch04.marvell.com ([199.233.58.184])\n\tby mx0a-0016f401.pphosted.com with ESMTP id 2supqksfw6-9\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT)\n\tfor <dev@dpdk.org>; Sat, 01 Jun 2019 11:55:40 -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\tSat, 1 Jun 2019 11:55:38 -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; Sat, 1 Jun 2019 11:55:38 -0700",
            "from BG-LT7430.marvell.com (unknown [10.28.17.28])\n\tby maili.marvell.com (Postfix) with ESMTP id E04BC3F7052;\n\tSat,  1 Jun 2019 11:55: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=c6xFSeS1uBRJejKcoNleL/Oi5NZRHK6w4WGcZYaz05Q=;\n\tb=RvTOLXKoQ+Ud/6o4WoAz3AkN8DPkOMJul7r1N03ZZju7WZ5ioWsleQGDCOZpGdn/fp5M\n\t79EIbg2IzD6XdLDB/6hjy0NK2xfOAsH6XYYmyrsRXXoXnH+cmjvq9hWAXcm50lPwFw6A\n\tWiXfIiscdkgQkfRGcbXEt+UVPRIuuH1yLo8vbcvIFFk9UN38VZUteJmNJ3f46pjOGEZc\n\tlE8mKHMeLLPAWjC0G2tTNcaBoKbv3okfXT8dT3k/Jf2nLTaMJ9A5Oft+7tTDO7jz6KKp\n\t7HEo/FugxIkXh/gOVTXVM3+nwiCqe+91Jd4fHGWJVozqE9LdcuzocY2L19ujrXM1s4t7\n\twA== ",
        "From": "<pbhagavatula@marvell.com>",
        "To": "<jerinj@marvell.com>, Pavan Nikhilesh <pbhagavatula@marvell.com>",
        "CC": "<dev@dpdk.org>",
        "Date": "Sun, 2 Jun 2019 00:23:24 +0530",
        "Message-ID": "<20190601185355.370-15-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 14/44] event/octeontx2: add SSO HW device\n\toperations",
        "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 SSO HW device operations used for enqueue/dequeue.\n\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\nSigned-off-by: Jerin Jacob <jerinj@marvell.com>\n---\n drivers/event/octeontx2/Makefile      |   1 +\n drivers/event/octeontx2/meson.build   |   3 +-\n drivers/event/octeontx2/otx2_evdev.h  |   7 +\n drivers/event/octeontx2/otx2_worker.c |   5 +\n drivers/event/octeontx2/otx2_worker.h | 186 ++++++++++++++++++++++++++\n 5 files changed, 201 insertions(+), 1 deletion(-)\n create mode 100644 drivers/event/octeontx2/otx2_worker.c\n create mode 100644 drivers/event/octeontx2/otx2_worker.h",
    "diff": "diff --git a/drivers/event/octeontx2/Makefile b/drivers/event/octeontx2/Makefile\nindex 4f09c1fc8..a3de5ca23 100644\n--- a/drivers/event/octeontx2/Makefile\n+++ b/drivers/event/octeontx2/Makefile\n@@ -30,6 +30,7 @@ LIBABIVER := 1\n # all source are stored in SRCS-y\n #\n \n+SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_EVENTDEV) += otx2_worker.c\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_EVENTDEV) += otx2_evdev.c\n SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX2_EVENTDEV) += otx2_evdev_irq.c\n \ndiff --git a/drivers/event/octeontx2/meson.build b/drivers/event/octeontx2/meson.build\nindex 5aa8113bd..1d2080b6d 100644\n--- a/drivers/event/octeontx2/meson.build\n+++ b/drivers/event/octeontx2/meson.build\n@@ -2,7 +2,8 @@\n # Copyright(C) 2019 Marvell International Ltd.\n #\n \n-sources = files('otx2_evdev.c',\n+sources = files('otx2_worker.c',\n+\t\t'otx2_evdev.c',\n \t\t'otx2_evdev_irq.c',\n \t\t)\n \ndiff --git a/drivers/event/octeontx2/otx2_evdev.h b/drivers/event/octeontx2/otx2_evdev.h\nindex e1d2dcc69..6bb1c664c 100644\n--- a/drivers/event/octeontx2/otx2_evdev.h\n+++ b/drivers/event/octeontx2/otx2_evdev.h\n@@ -82,6 +82,13 @@ enum otx2_sso_lf_type {\n \tSSO_LF_GWS\n };\n \n+enum {\n+\tSSO_SYNC_ORDERED,\n+\tSSO_SYNC_ATOMIC,\n+\tSSO_SYNC_UNTAGGED,\n+\tSSO_SYNC_EMPTY\n+};\n+\n struct otx2_sso_evdev {\n \tOTX2_DEV; /* Base class */\n \tuint8_t max_event_queues;\ndiff --git a/drivers/event/octeontx2/otx2_worker.c b/drivers/event/octeontx2/otx2_worker.c\nnew file mode 100644\nindex 000000000..83f535d05\n--- /dev/null\n+++ b/drivers/event/octeontx2/otx2_worker.c\n@@ -0,0 +1,5 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#include \"otx2_worker.h\"\ndiff --git a/drivers/event/octeontx2/otx2_worker.h b/drivers/event/octeontx2/otx2_worker.h\nnew file mode 100644\nindex 000000000..e8705e53c\n--- /dev/null\n+++ b/drivers/event/octeontx2/otx2_worker.h\n@@ -0,0 +1,186 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#ifndef __OTX2_WORKER_H__\n+#define __OTX2_WORKER_H__\n+\n+#include <rte_common.h>\n+#include <rte_branch_prediction.h>\n+\n+#include <otx2_common.h>\n+#include \"otx2_evdev.h\"\n+\n+/* SSO Operations */\n+\n+static __rte_always_inline uint16_t\n+otx2_ssogws_get_work(struct otx2_ssogws *ws, struct rte_event *ev)\n+{\n+\tuint64_t get_work0;\n+\tuint64_t get_work1;\n+\n+\totx2_write64(BIT_ULL(16) | /* wait for work. */\n+\t\t     1, /* Use Mask set 0. */\n+\t\t     ws->getwrk_op);\n+\n+#ifdef RTE_ARCH_ARM64\n+\tasm volatile(\n+\t\t\t\"\t\tldr %[tag], [%[tag_loc]]\t\\n\"\n+\t\t\t\"\t\tldr %[wqp], [%[wqp_loc]]\t\\n\"\n+\t\t\t\"\t\ttbz %[tag], 63, done%=\t\t\\n\"\n+\t\t\t\"\t\tsevl\t\t\t\t\\n\"\n+\t\t\t\"rty%=:\t\twfe\t\t\t\t\\n\"\n+\t\t\t\"\t\tldr %[tag], [%[tag_loc]]\t\\n\"\n+\t\t\t\"\t\tldr %[wqp], [%[wqp_loc]]\t\\n\"\n+\t\t\t\"\t\ttbnz %[tag], 63, rty%=\t\t\\n\"\n+\t\t\t\"done%=:\tprfm pldl1strm, [%[wqp]]\t\\n\"\n+\t\t\t\"\t\tdmb ld\t\t\t\t\\n\"\n+\t\t\t: [tag] \"=&r\" (get_work0), [wqp] \"=&r\" (get_work1)\n+\t\t\t: [tag_loc] \"r\" (ws->tag_op),\n+\t\t\t  [wqp_loc] \"r\" (ws->wqp_op)\n+\t\t\t);\n+#else\n+\tget_work0 = otx2_read64(ws->tag_op);\n+\twhile ((BIT_ULL(63)) & get_work0)\n+\t\tget_work0 = otx2_read64(ws->tag_op);\n+\n+\tget_work1 = otx2_read64(ws->wqp_op);\n+\trte_prefetch_non_temporal((const void *)get_work1);\n+#endif\n+\n+\tws->cur_tt = (get_work0 >> 32) & 0x3;\n+\tws->cur_grp = (get_work0 >> 36) & 0x3FF;\n+\n+\tget_work0 = (get_work0 & (0x3ull << 32)) << 6 |\n+\t\t(get_work0 & (0x3FFull << 36)) << 4 |\n+\t\t(get_work0 & 0xffffffff);\n+\n+\tev->event = get_work0;\n+\tev->u64 = get_work1;\n+\n+\treturn !!get_work1;\n+}\n+\n+/* Used in cleaning up workslot. */\n+static __rte_always_inline uint16_t\n+otx2_ssogws_get_work_empty(struct otx2_ssogws *ws, struct rte_event *ev)\n+{\n+\tuint64_t get_work0;\n+\tuint64_t get_work1;\n+\n+#ifdef RTE_ARCH_ARM64\n+\tasm volatile(\n+\t\t\t\"\t\tldr %[tag], [%[tag_loc]]\t\\n\"\n+\t\t\t\"\t\tldr %[wqp], [%[wqp_loc]]\t\\n\"\n+\t\t\t\"\t\ttbz %[tag], 63, done%=\t\t\\n\"\n+\t\t\t\"\t\tsevl\t\t\t\t\\n\"\n+\t\t\t\"rty%=:\t\twfe\t\t\t\t\\n\"\n+\t\t\t\"\t\tldr %[tag], [%[tag_loc]]\t\\n\"\n+\t\t\t\"\t\tldr %[wqp], [%[wqp_loc]]\t\\n\"\n+\t\t\t\"\t\ttbnz %[tag], 63, rty%=\t\t\\n\"\n+\t\t\t\"done%=:\tprfm pldl1strm, [%[wqp]]\t\\n\"\n+\t\t\t\"\t\tdmb ld\t\t\t\t\\n\"\n+\t\t\t: [tag] \"=&r\" (get_work0), [wqp] \"=&r\" (get_work1)\n+\t\t\t: [tag_loc] \"r\" (ws->tag_op),\n+\t\t\t  [wqp_loc] \"r\" (ws->wqp_op)\n+\t\t\t);\n+#else\n+\tget_work0 = otx2_read64(ws->tag_op);\n+\twhile ((BIT_ULL(63)) & get_work0)\n+\t\tget_work0 = otx2_read64(ws->tag_op);\n+\n+\tget_work1 = otx2_read64(ws->wqp_op);\n+\trte_prefetch_non_temporal((const void *)get_work1);\n+#endif\n+\n+\tws->cur_tt = (get_work0 >> 32) & 0x3;\n+\tws->cur_grp = (get_work0 >> 36) & 0x3FF;\n+\n+\tget_work0 = (get_work0 & (0x3ull << 32)) << 6 |\n+\t\t(get_work0 & (0x3FFull << 36)) << 4 |\n+\t\t(get_work0 & 0xffffffff);\n+\n+\tev->event = get_work0;\n+\tev->u64 = get_work1;\n+\n+\treturn !!get_work1;\n+}\n+\n+static __rte_always_inline void\n+otx2_ssogws_add_work(struct otx2_ssogws *ws, const uint64_t event_ptr,\n+\t\t     const uint32_t tag, const uint8_t new_tt,\n+\t\t     const uint16_t grp)\n+{\n+\tuint64_t add_work0;\n+\n+\tadd_work0 = tag | ((uint64_t)(new_tt) << 32);\n+\totx2_store_pair(add_work0, event_ptr, ws->grps_base[grp]);\n+}\n+\n+static __rte_always_inline void\n+otx2_ssogws_swtag_desched(struct otx2_ssogws *ws, uint32_t tag, uint8_t new_tt,\n+\t\t\t  uint16_t grp)\n+{\n+\tuint64_t val;\n+\n+\tval = tag | ((uint64_t)(new_tt & 0x3) << 32) | ((uint64_t)grp << 34);\n+\totx2_write64(val, ws->swtag_desched_op);\n+}\n+\n+static __rte_always_inline void\n+otx2_ssogws_swtag_norm(struct otx2_ssogws *ws, uint32_t tag, uint8_t new_tt)\n+{\n+\tuint64_t val;\n+\n+\tval = tag | ((uint64_t)(new_tt & 0x3) << 32);\n+\totx2_write64(val, ws->swtag_norm_op);\n+}\n+\n+static __rte_always_inline void\n+otx2_ssogws_swtag_untag(struct otx2_ssogws *ws)\n+{\n+\totx2_write64(0, OTX2_SSOW_GET_BASE_ADDR(ws->getwrk_op) +\n+\t\t     SSOW_LF_GWS_OP_SWTAG_UNTAG);\n+\tws->cur_tt = SSO_SYNC_UNTAGGED;\n+}\n+\n+static __rte_always_inline void\n+otx2_ssogws_swtag_flush(struct otx2_ssogws *ws)\n+{\n+\totx2_write64(0, OTX2_SSOW_GET_BASE_ADDR(ws->getwrk_op) +\n+\t\t     SSOW_LF_GWS_OP_SWTAG_FLUSH);\n+\tws->cur_tt = SSO_SYNC_EMPTY;\n+}\n+\n+static __rte_always_inline void\n+otx2_ssogws_desched(struct otx2_ssogws *ws)\n+{\n+\totx2_write64(0, OTX2_SSOW_GET_BASE_ADDR(ws->getwrk_op) +\n+\t\t     SSOW_LF_GWS_OP_DESCHED);\n+}\n+\n+static __rte_always_inline void\n+otx2_ssogws_swtag_wait(struct otx2_ssogws *ws)\n+{\n+#ifdef RTE_ARCH_ARM64\n+\tuint64_t swtp;\n+\n+\tasm volatile (\n+\t\t\t\"\tldr %[swtb], [%[swtp_loc]]\t\\n\"\n+\t\t\t\"\tcbz %[swtb], done%=\t\t\\n\"\n+\t\t\t\"\tsevl\t\t\t\t\\n\"\n+\t\t\t\"rty%=:\twfe\t\t\t\t\\n\"\n+\t\t\t\"\tldr %[swtb], [%[swtp_loc]]\t\\n\"\n+\t\t\t\"\tcbnz %[swtb], rty%=\t\t\\n\"\n+\t\t\t\"done%=:\t\t\t\t\\n\"\n+\t\t\t: [swtb] \"=&r\" (swtp)\n+\t\t\t: [swtp_loc] \"r\" (ws->swtp_op)\n+\t\t\t);\n+#else\n+\t/* Wait for the SWTAG/SWTAG_FULL operation */\n+\twhile (otx2_read64(ws->swtp_op))\n+\t\t;\n+#endif\n+}\n+\n+#endif\n",
    "prefixes": [
        "14/44"
    ]
}