get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 105294,
    "url": "https://patches.dpdk.org/api/patches/105294/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20211220170514.736732-1-bruce.richardson@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": "<20211220170514.736732-1-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211220170514.736732-1-bruce.richardson@intel.com",
    "date": "2021-12-20T17:05:14",
    "name": "dma/idxd: fix burst capacity calculation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2bb8b4a27fb5d78b450a4e0be23d393c4321783c",
    "submitter": {
        "id": 20,
        "url": "https://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20211220170514.736732-1-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 20987,
            "url": "https://patches.dpdk.org/api/series/20987/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=20987",
            "date": "2021-12-20T17:05:14",
            "name": "dma/idxd: fix burst capacity calculation",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/20987/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/105294/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/105294/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 044A1A00BE;\n\tMon, 20 Dec 2021 18:06:19 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 500264067C;\n\tMon, 20 Dec 2021 18:06:18 +0100 (CET)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id 692C24003C;\n Mon, 20 Dec 2021 18:06:16 +0100 (CET)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 20 Dec 2021 09:05:31 -0800",
            "from silpixa00399126.ir.intel.com ([10.237.223.86])\n by orsmga007.jf.intel.com with ESMTP; 20 Dec 2021 09:05:29 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1640019976; x=1671555976;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=kMd5dzK/kEWihnX2k2cIIEJO7MqqV/Ce2FIRA5kZQ78=;\n b=iCrvU/OJxIi5zDdMYdhEMiP7anUJK/CupFDhGEyQQyk1X2nhkXQJKWdb\n ph2rUDv9u8AO1eDwMGrkfhtTxIy4yKUG91y0YMcACacWLzEZkkv0+CRtN\n ibQRYbdvDIk/OLdeYZeNXrTtQQ6tXfFMWuGsj9YrhaWdDFPfsNdJ52ZOe\n 9W0h1FIuipGEbvpEM13w/HhIv9VgXPy5OPxDayQeIqQ0Q5l9UNpvavPhQ\n OAmJvuVREal7//Ue6BX9HtKfITy+KNuRIYct0ZFGjeQm7S0Md12Wyn0H1\n Jes5/yHJtFmldDI9Or0s/6urWwtNf1hGbzEQv3KBHR6IyZeEMIvUAqxcT w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10203\"; a=\"240179066\"",
            "E=Sophos;i=\"5.88,221,1635231600\"; d=\"scan'208\";a=\"240179066\"",
            "E=Sophos;i=\"5.88,220,1635231600\"; d=\"scan'208\";a=\"507759126\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Bruce Richardson <bruce.richardson@intel.com>, kevin.laatz@intel.com,\n stable@dpdk.org",
        "Subject": "[PATCH] dma/idxd: fix burst capacity calculation",
        "Date": "Mon, 20 Dec 2021 17:05:14 +0000",
        "Message-Id": "<20211220170514.736732-1-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.32.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "When the maximum burst size supported by HW is less than the available\nring space, incorrect capacity was returned when there was already some\njobs queued up for submission. This was because the capacity calculation\nfailed to subtract the number of already-enqueued jobs from the max\nburst size. After subtraction is done, ensure that any negative values\n(which should never occur if the user respects the reported limits), are\nclamped to zero.\n\nFixes: 9459de4edc99 (\"dma/idxd: add burst capacity\")\nCc: kevin.laatz@intel.com\nCc: stable@dpdk.org\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n drivers/dma/idxd/idxd_common.c | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\n--\n2.32.0",
    "diff": "diff --git a/drivers/dma/idxd/idxd_common.c b/drivers/dma/idxd/idxd_common.c\nindex fc11b11337..4442d1cbbd 100644\n--- a/drivers/dma/idxd/idxd_common.c\n+++ b/drivers/dma/idxd/idxd_common.c\n@@ -485,7 +485,9 @@ idxd_burst_capacity(const void *dev_private, uint16_t vchan __rte_unused)\n \t\twrite_idx += idxd->desc_ring_mask + 1;\n \tused_space = write_idx - idxd->ids_returned;\n\n-\treturn RTE_MIN((idxd->desc_ring_mask - used_space), idxd->max_batch_size);\n+\tconst int ret = RTE_MIN((idxd->desc_ring_mask - used_space),\n+\t\t\t(idxd->max_batch_size - idxd->batch_size));\n+\treturn ret < 0 ? 0 : (uint16_t)ret;\n }\n\n int\n",
    "prefixes": []
}