get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 99569,
    "url": "http://patchwork.dpdk.org/api/patches/99569/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210924102942.2878051-3-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20210924102942.2878051-3-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210924102942.2878051-3-bruce.richardson@intel.com",
    "date": "2021-09-24T10:29:35",
    "name": "[v6,02/13] dma/skeleton: add channel status function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "65511b930f542bd82235b535ae369f12e88e99ec",
    "submitter": {
        "id": 20,
        "url": "http://patchwork.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210924102942.2878051-3-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 19138,
            "url": "http://patchwork.dpdk.org/api/series/19138/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=19138",
            "date": "2021-09-24T10:29:33",
            "name": "add test suite for DMA drivers",
            "version": 6,
            "mbox": "http://patchwork.dpdk.org/series/19138/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/99569/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/99569/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 6FFFAA0548;\n\tFri, 24 Sep 2021 12:30:09 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E43B341302;\n\tFri, 24 Sep 2021 12:30:01 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 1208A41301\n for <dev@dpdk.org>; Fri, 24 Sep 2021 12:30:00 +0200 (CEST)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 24 Sep 2021 03:30:00 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.223.29])\n by orsmga006.jf.intel.com with ESMTP; 24 Sep 2021 03:29:59 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10116\"; a=\"203541128\"",
            "E=Sophos;i=\"5.85,319,1624345200\"; d=\"scan'208\";a=\"203541128\"",
            "E=Sophos;i=\"5.85,319,1624345200\"; d=\"scan'208\";a=\"436117610\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "conor.walsh@intel.com, kevin.laatz@intel.com, fengchengwen@huawei.com,\n jerinj@marvell.com, Bruce Richardson <bruce.richardson@intel.com>",
        "Date": "Fri, 24 Sep 2021 11:29:35 +0100",
        "Message-Id": "<20210924102942.2878051-3-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20210924102942.2878051-1-bruce.richardson@intel.com>",
        "References": "<20210826183301.333442-1-bruce.richardson@intel.com>\n <20210924102942.2878051-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v6 02/13] dma/skeleton: add channel status\n function",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "In order to avoid timing errors with the unit tests, we need to ensure\nwe have the vchan_status function to report when a channel is idle.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n drivers/dma/skeleton/skeleton_dmadev.c | 18 +++++++++++++++++-\n drivers/dma/skeleton/skeleton_dmadev.h |  2 +-\n 2 files changed, 18 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/dma/skeleton/skeleton_dmadev.c b/drivers/dma/skeleton/skeleton_dmadev.c\nindex 876878bb78..ada9a3be68 100644\n--- a/drivers/dma/skeleton/skeleton_dmadev.c\n+++ b/drivers/dma/skeleton/skeleton_dmadev.c\n@@ -80,7 +80,7 @@ cpucopy_thread(void *param)\n \n \t\thw->zero_req_count = 0;\n \t\trte_memcpy(desc->dst, desc->src, desc->len);\n-\t\thw->completed_count++;\n+\t\t__atomic_add_fetch(&hw->completed_count, 1, __ATOMIC_RELEASE);\n \t\t(void)rte_ring_enqueue(hw->desc_completed, (void *)desc);\n \t}\n \n@@ -258,6 +258,21 @@ skeldma_vchan_setup(struct rte_dma_dev *dev, uint16_t vchan,\n \treturn vchan_setup(hw, conf->nb_desc);\n }\n \n+static int\n+skeldma_vchan_status(const struct rte_dma_dev *dev,\n+\t\tuint16_t vchan, enum rte_dma_vchan_status *status)\n+{\n+\tstruct skeldma_hw *hw = dev->dev_private;\n+\n+\tRTE_SET_USED(vchan);\n+\n+\t*status = RTE_DMA_VCHAN_IDLE;\n+\tif (hw->submitted_count != __atomic_load_n(&hw->completed_count, __ATOMIC_ACQUIRE)\n+\t\t\t|| hw->zero_req_count == 0)\n+\t\t*status = RTE_DMA_VCHAN_ACTIVE;\n+\treturn 0;\n+}\n+\n static int\n skeldma_stats_get(const struct rte_dma_dev *dev, uint16_t vchan,\n \t\t  struct rte_dma_stats *stats, uint32_t stats_sz)\n@@ -425,6 +440,7 @@ static const struct rte_dma_dev_ops skeldma_ops = {\n \t.dev_close     = skeldma_close,\n \n \t.vchan_setup   = skeldma_vchan_setup,\n+\t.vchan_status  = skeldma_vchan_status,\n \n \t.stats_get     = skeldma_stats_get,\n \t.stats_reset   = skeldma_stats_reset,\ndiff --git a/drivers/dma/skeleton/skeleton_dmadev.h b/drivers/dma/skeleton/skeleton_dmadev.h\nindex eaa52364bf..91eb5460fc 100644\n--- a/drivers/dma/skeleton/skeleton_dmadev.h\n+++ b/drivers/dma/skeleton/skeleton_dmadev.h\n@@ -54,7 +54,7 @@ struct skeldma_hw {\n \n \t/* Cache delimiter for cpucopy thread's operation data */\n \tchar cache2 __rte_cache_aligned;\n-\tuint32_t zero_req_count;\n+\tvolatile uint32_t zero_req_count;\n \tuint64_t completed_count;\n };\n \n",
    "prefixes": [
        "v6",
        "02/13"
    ]
}