get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 124067,
    "url": "http://patches.dpdk.org/api/patches/124067/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230216110919.373385-7-bruce.richardson@intel.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": "<20230216110919.373385-7-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230216110919.373385-7-bruce.richardson@intel.com",
    "date": "2023-02-16T11:09:19",
    "name": "[v3,6/6] test/dmadev: add tests for stopping and restarting dev",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "672bc7f0b1b30d03555d3ad218527ab72e6c6dd8",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230216110919.373385-7-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 27043,
            "url": "http://patches.dpdk.org/api/series/27043/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27043",
            "date": "2023-02-16T11:09:13",
            "name": "dma/ioat: fix issues with stopping and restarting device",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/27043/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/124067/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/124067/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 31F0041CB1;\n\tThu, 16 Feb 2023 12:10:13 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id ACF7242D49;\n\tThu, 16 Feb 2023 12:09:51 +0100 (CET)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id 0347A42D49\n for <dev@dpdk.org>; Thu, 16 Feb 2023 12:09:49 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Feb 2023 03:09:49 -0800",
            "from silpixa00401385.ir.intel.com ([10.237.214.22])\n by orsmga001.jf.intel.com with ESMTP; 16 Feb 2023 03:09:48 -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=1676545790; x=1708081790;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=EEu7bttajJBsicMhMNqv/bOb0T21DPcTbjESecENCNI=;\n b=DL5MM71DCE/IFJVEoMtaJ0sPaNSS/RBBjqChM8A03jB1upUq7XxyNh3B\n AU+CkQTsnusmeARAG/HPZdZ+2jwrOETk1DHnkZFRXAbMUcH0M/PrRfLXU\n m+/c6lgl04VoU/6GtSHodaSq4pPfw74eX53QkeARt8SyUBwxgiBIlkYNR\n mNUEv0lXGoKndnX6d4Ho3xO8Ie5ha3xVV89JroNxcUvkE9fCvlHftiT26\n zWarH8/PGfmL6VBgK6QY5QNdN2qECo0I199a+jmRQtRK3Voei/d4O3r+/\n aoEUzzme4gpnY2jMmdetEhOv0XragrG8RjDEEqp55HX5dX/1/kJNENCkq Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10622\"; a=\"315368191\"",
            "E=Sophos;i=\"5.97,302,1669104000\"; d=\"scan'208\";a=\"315368191\"",
            "E=McAfee;i=\"6500,9779,10622\"; a=\"702522848\"",
            "E=Sophos;i=\"5.97,302,1669104000\"; d=\"scan'208\";a=\"702522848\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "fengchengwen@huawei.com, Bruce Richardson <bruce.richardson@intel.com>,\n Kevin Laatz <kevin.laatz@intel.com>",
        "Subject": "[PATCH v3 6/6] test/dmadev: add tests for stopping and restarting dev",
        "Date": "Thu, 16 Feb 2023 11:09:19 +0000",
        "Message-Id": "<20230216110919.373385-7-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.37.2",
        "In-Reply-To": "<20230216110919.373385-1-bruce.richardson@intel.com>",
        "References": "<20230116153714.554470-1-bruce.richardson@intel.com>\n <20230216110919.373385-1-bruce.richardson@intel.com>",
        "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": "Validate device operation when a device is stopped or restarted.\n\nThe only complication - and gap in the dmadev ABI specification - is\nwhat happens to the job ids on restart. Some drivers reset them to 0,\nwhile others continue where things left off. Take account of both\npossibilities in the test case.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\nAcked-by: Kevin Laatz <kevin.laatz@intel.com>\n---\n app/test/test_dmadev.c | 46 ++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 46 insertions(+)",
    "diff": "diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c\nindex 0296c52d2a..0736ff2a18 100644\n--- a/app/test/test_dmadev.c\n+++ b/app/test/test_dmadev.c\n@@ -304,6 +304,48 @@ test_enqueue_copies(int16_t dev_id, uint16_t vchan)\n \t\t\t|| do_multi_copies(dev_id, vchan, 0, 0, 1);\n }\n \n+static int\n+test_stop_start(int16_t dev_id, uint16_t vchan)\n+{\n+\t/* device is already started on input, should be (re)started on output */\n+\n+\tuint16_t id = 0;\n+\tenum rte_dma_status_code status = RTE_DMA_STATUS_SUCCESSFUL;\n+\n+\t/* - test stopping a device works ok,\n+\t * - then do a start-stop without doing a copy\n+\t * - finally restart the device\n+\t * checking for errors at each stage, and validating we can still copy at the end.\n+\t */\n+\tif (rte_dma_stop(dev_id) < 0)\n+\t\tERR_RETURN(\"Error stopping device\\n\");\n+\n+\tif (rte_dma_start(dev_id) < 0)\n+\t\tERR_RETURN(\"Error restarting device\\n\");\n+\tif (rte_dma_stop(dev_id) < 0)\n+\t\tERR_RETURN(\"Error stopping device after restart (no jobs executed)\\n\");\n+\n+\tif (rte_dma_start(dev_id) < 0)\n+\t\tERR_RETURN(\"Error restarting device after multiple stop-starts\\n\");\n+\n+\t/* before doing a copy, we need to know what the next id will be it should\n+\t * either be:\n+\t * - the last completed job before start if driver does not reset id on stop\n+\t * - or -1 i.e. next job is 0, if driver does reset the job ids on stop\n+\t */\n+\tif (rte_dma_completed_status(dev_id, vchan, 1, &id, &status) != 0)\n+\t\tERR_RETURN(\"Error with rte_dma_completed_status when no job done\\n\");\n+\tid += 1; /* id_count is next job id */\n+\tif (id != id_count && id != 0)\n+\t\tERR_RETURN(\"Unexpected next id from device after stop-start. Got %u, expected %u or 0\\n\",\n+\t\t\t\tid, id_count);\n+\n+\tid_count = id;\n+\tif (test_single_copy(dev_id, vchan) < 0)\n+\t\tERR_RETURN(\"Error performing copy after device restart\\n\");\n+\treturn 0;\n+}\n+\n /* Failure handling test cases - global macros and variables for those tests*/\n #define COMP_BURST_SZ\t16\n #define OPT_FENCE(idx) ((fence && idx == 8) ? RTE_DMA_OP_FLAG_FENCE : 0)\n@@ -819,6 +861,10 @@ test_dmadev_instance(int16_t dev_id)\n \tif (runtest(\"copy\", test_enqueue_copies, 640, dev_id, vchan, CHECK_ERRS) < 0)\n \t\tgoto err;\n \n+\t/* run tests stopping/starting devices and check jobs still work after restart */\n+\tif (runtest(\"stop-start\", test_stop_start, 1, dev_id, vchan, CHECK_ERRS) < 0)\n+\t\tgoto err;\n+\n \t/* run some burst capacity tests */\n \tif (rte_dma_burst_capacity(dev_id, vchan) < 64)\n \t\tprintf(\"DMA Dev %u: insufficient burst capacity (64 required), skipping tests\\n\",\n",
    "prefixes": [
        "v3",
        "6/6"
    ]
}