Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/122107/?format=api
http://patchwork.dpdk.org/api/patches/122107/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230116153714.554470-6-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": "<20230116153714.554470-6-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230116153714.554470-6-bruce.richardson@intel.com", "date": "2023-01-16T15:37:14", "name": "[5/5] test/dmadev: add tests for stopping and restarting dev", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "672bc7f0b1b30d03555d3ad218527ab72e6c6dd8", "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/20230116153714.554470-6-bruce.richardson@intel.com/mbox/", "series": [ { "id": 26562, "url": "http://patchwork.dpdk.org/api/series/26562/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=26562", "date": "2023-01-16T15:37:09", "name": "dma/ioat: fix issues with stopping and restarting device", "version": 1, "mbox": "http://patchwork.dpdk.org/series/26562/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/122107/comments/", "check": "fail", "checks": "http://patchwork.dpdk.org/api/patches/122107/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 BF8D2423F1;\n\tMon, 16 Jan 2023 16:38:09 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DA8BE42D2A;\n\tMon, 16 Jan 2023 16:37:50 +0100 (CET)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id 99D5A42D28\n for <dev@dpdk.org>; Mon, 16 Jan 2023 16:37:48 +0100 (CET)", "from fmsmga004.fm.intel.com ([10.253.24.48])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 16 Jan 2023 07:37:48 -0800", "from silpixa00401385.ir.intel.com ([10.237.214.55])\n by fmsmga004.fm.intel.com with ESMTP; 16 Jan 2023 07:37:47 -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=1673883468; x=1705419468;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=iDSkM+8xi3b0znao6Wpk15vMoYIl+fTZGYTqHG/9m50=;\n b=O264Stg9chvJzSKJ52s2AL+L9HGN01ORGOmw9mTj3QHDIJcrvQdmSSUk\n FU4B1DuFhAsapLpPqk340OZfDmZEdJe40QnYXmVxVGCUvEkWQrE3aCF4M\n /jinA+lTYZ45nhvVgzXT2OP2wqA0JspiRQZiEvHs43wan/M10L5ljmDt6\n U/riPaecv/0ut4D+Db9EdwkwB5OssX5Olbq1AjlGoK6FtNg1ZFYi1+uhh\n ZyyW+iK1e89BC6qs4pjm+p73C9SRS6tdXhhHBAYygpMxSsQNZGt6zpgCf\n 0Mkml5imEqB1yFO7e7mTmT6Gwp8Jox67o9QU7m6tB8ui4x7gduD0oeq6i Q==;", "X-IronPort-AV": [ "E=McAfee;i=\"6500,9779,10592\"; a=\"351735383\"", "E=Sophos;i=\"5.97,221,1669104000\"; d=\"scan'208\";a=\"351735383\"", "E=McAfee;i=\"6500,9779,10592\"; a=\"727505495\"", "E=Sophos;i=\"5.97,221,1669104000\"; d=\"scan'208\";a=\"727505495\"" ], "X-ExtLoop1": "1", "From": "Bruce Richardson <bruce.richardson@intel.com>", "To": "dev@dpdk.org", "Cc": "Bruce Richardson <bruce.richardson@intel.com>,\n Chengwen Feng <fengchengwen@huawei.com>,\n Kevin Laatz <kevin.laatz@intel.com>", "Subject": "[PATCH 5/5] test/dmadev: add tests for stopping and restarting dev", "Date": "Mon, 16 Jan 2023 15:37:14 +0000", "Message-Id": "<20230116153714.554470-6-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.37.2", "In-Reply-To": "<20230116153714.554470-1-bruce.richardson@intel.com>", "References": "<20230116153714.554470-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\nposibilities in the test case.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@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 de787c14e2..8fb73a41e2 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": [ "5/5" ] }{ "id": 122107, "url": "