get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 45066,
    "url": "https://patches.dpdk.org/api/patches/45066/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180921102510.24179-1-harry.van.haaren@intel.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20180921102510.24179-1-harry.van.haaren@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180921102510.24179-1-harry.van.haaren@intel.com",
    "date": "2018-09-21T10:25:10",
    "name": "event/sw: fix cq idx check for unlink usecases",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "3bd7ae860b1369ee360f6a190f8c970c5ed32bd1",
    "submitter": {
        "id": 317,
        "url": "https://patches.dpdk.org/api/people/317/?format=api",
        "name": "Van Haaren, Harry",
        "email": "harry.van.haaren@intel.com"
    },
    "delegate": {
        "id": 310,
        "url": "https://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20180921102510.24179-1-harry.van.haaren@intel.com/mbox/",
    "series": [
        {
            "id": 1434,
            "url": "https://patches.dpdk.org/api/series/1434/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1434",
            "date": "2018-09-21T10:25:10",
            "name": "event/sw: fix cq idx check for unlink usecases",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/1434/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/45066/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/45066/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 5905C1DA4;\n\tFri, 21 Sep 2018 12:28:31 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id 3BEDE1B53;\n\tFri, 21 Sep 2018 12:28:29 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t21 Sep 2018 03:28:28 -0700",
            "from silpixa00399779.ir.intel.com (HELO\n\tsilpixa00399779.ger.corp.intel.com) ([10.237.223.187])\n\tby FMSMGA003.fm.intel.com with ESMTP; 21 Sep 2018 03:25:09 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.54,284,1534834800\"; d=\"scan'208\";a=\"82218248\"",
        "From": "Harry van Haaren <harry.van.haaren@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "matias.elo@nokia.com, Harry van Haaren <harry.van.haaren@intel.com>,\n\tstable@dpdk.org",
        "Date": "Fri, 21 Sep 2018 11:25:10 +0100",
        "Message-Id": "<20180921102510.24179-1-harry.van.haaren@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[dpdk-dev] [PATCH] event/sw: fix cq idx check for unlink usecases",
        "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": "This commit fixes the cq index checks when unlinking\nports/queues while the scheduler core is running.\nPreviously, the == comparison could be \"skipped\" if\nin particular corner cases. With the check being changed\nto >= this is resolved as the cq idx gets reset to zero.\n\nBugzilla ID: 60\nFixes: 617995dfc5b2 (\"event/sw: add scheduling logic\")\n\nSuggested-by: Matias Elo <matias.elo@nokia.com>\nSigned-off-by: Harry van Haaren <harry.van.haaren@intel.com>\n\n---\n\nCc: stable@dpdk.org\n\n@Matias,\n\nWhen testing this patch with your provided test case as per attachment\nto bug #60 in Bugzilla, I don't see any events arriving to port 0.\nHence, I believe this to be the correct behaviour, if you can confirm\nthat'd be awesome!\n\nRegards, -Harry\n\n---\n drivers/event/sw/sw_evdev_scheduler.c | 13 ++++++++-----\n 1 file changed, 8 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/event/sw/sw_evdev_scheduler.c b/drivers/event/sw/sw_evdev_scheduler.c\nindex e3a41e02f..fb5d44630 100644\n--- a/drivers/event/sw/sw_evdev_scheduler.c\n+++ b/drivers/event/sw/sw_evdev_scheduler.c\n@@ -51,9 +51,11 @@ sw_schedule_atomic_to_cq(struct sw_evdev *sw, struct sw_qid * const qid,\n \t\tint cq = fid->cq;\n \n \t\tif (cq < 0) {\n-\t\t\tuint32_t cq_idx = qid->cq_next_tx++;\n-\t\t\tif (qid->cq_next_tx == qid->cq_num_mapped_cqs)\n+\t\t\tuint32_t cq_idx;\n+\t\t\tif (qid->cq_next_tx >= qid->cq_num_mapped_cqs)\n \t\t\t\tqid->cq_next_tx = 0;\n+\t\t\tcq_idx = qid->cq_next_tx++;\n+\n \t\t\tcq = qid->cq_map[cq_idx];\n \n \t\t\t/* find least used */\n@@ -140,9 +142,10 @@ sw_schedule_parallel_to_cq(struct sw_evdev *sw, struct sw_qid * const qid,\n \t\tdo {\n \t\t\tif (++cq_check_count > qid->cq_num_mapped_cqs)\n \t\t\t\tgoto exit;\n-\t\t\tcq = qid->cq_map[cq_idx];\n-\t\t\tif (++cq_idx == qid->cq_num_mapped_cqs)\n+\t\t\tif (cq_idx >= qid->cq_num_mapped_cqs)\n \t\t\t\tcq_idx = 0;\n+\t\t\tcq = qid->cq_map[cq_idx++];\n+\n \t\t} while (rte_event_ring_free_count(\n \t\t\t\tsw->ports[cq].cq_worker_ring) == 0 ||\n \t\t\t\tsw->ports[cq].inflights == SW_PORT_HIST_LIST);\n@@ -220,7 +223,7 @@ sw_schedule_qid_to_cq(struct sw_evdev *sw)\n \t\tint iq_num = PKT_MASK_TO_IQ(qid->iq_pkt_mask);\n \n \t\t/* zero mapped CQs indicates directed */\n-\t\tif (iq_num >= SW_IQS_MAX)\n+\t\tif (iq_num >= SW_IQS_MAX || qid->cq_num_mapped_cqs == 0)\n \t\t\tcontinue;\n \n \t\tuint32_t pkts_done = 0;\n",
    "prefixes": []
}