Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/75821/?format=api
http://patches.dpdk.org/api/patches/75821/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200821155945.29415-2-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": "<20200821155945.29415-2-bruce.richardson@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200821155945.29415-2-bruce.richardson@intel.com", "date": "2020-08-21T15:59:42", "name": "[1/4] raw/ioat: support multiple devices being tested", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "3ecf835c6b6fd942085861261460094c66dfefe2", "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/20200821155945.29415-2-bruce.richardson@intel.com/mbox/", "series": [ { "id": 11743, "url": "http://patches.dpdk.org/api/series/11743/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11743", "date": "2020-08-21T15:59:41", "name": "simplify unit-testing of rawdevs", "version": 1, "mbox": "http://patches.dpdk.org/series/11743/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/75821/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/75821/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 290F6A04B0;\n\tFri, 21 Aug 2020 18:00:03 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id C45E21C0B0;\n\tFri, 21 Aug 2020 18:00:02 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by dpdk.org (Postfix) with ESMTP id 17FA1AAD5\n for <dev@dpdk.org>; Fri, 21 Aug 2020 18:00:00 +0200 (CEST)", "from orsmga005.jf.intel.com ([10.7.209.41])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 21 Aug 2020 09:00:00 -0700", "from silpixa00399126.ir.intel.com ([10.237.222.56])\n by orsmga005.jf.intel.com with ESMTP; 21 Aug 2020 08:59:58 -0700" ], "IronPort-SDR": [ "\n KzARs8ZQxZtr2GgCQaqCUD9tElZCnl0225GEUQF5gJuW5h0fNXZXf3IXMMoP0IsWw+LQABYptb\n uA9TdsQHm5+g==", "\n 2rk69MhXl3rFVMJC1QXqIyAZXpacvlDPpfo7Z2w+E6YogjM/uQZyQwwuhL6fYCP3sIJM2qLfXQ\n B4IFCbZr5MRQ==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9719\"; a=\"173607821\"", "E=Sophos;i=\"5.76,337,1592895600\"; d=\"scan'208\";a=\"173607821\"", "E=Sophos;i=\"5.76,337,1592895600\"; d=\"scan'208\";a=\"473094248\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Bruce Richardson <bruce.richardson@intel.com>", "To": "Hemant Agrawal <hemant.agrawal@nxp.com>, Nipun Gupta <nipun.gupta@nxp.com>", "Cc": "dev@dpdk.org,\n\tBruce Richardson <bruce.richardson@intel.com>", "Date": "Fri, 21 Aug 2020 16:59:42 +0100", "Message-Id": "<20200821155945.29415-2-bruce.richardson@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20200821155945.29415-1-bruce.richardson@intel.com>", "References": "<20200821155945.29415-1-bruce.richardson@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 1/4] raw/ioat: support multiple devices being\n\ttested", "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 <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": "The current selftest function uses a single global variable to track state\nwhich implies that only a single instance can have the selftest function\ncalled on it. Change this to an array to allow multiple instances to be\ntested.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n drivers/raw/ioat/ioat_rawdev_test.c | 17 +++++++++++++----\n 1 file changed, 13 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/raw/ioat/ioat_rawdev_test.c b/drivers/raw/ioat/ioat_rawdev_test.c\nindex 724cdb9e74..6262995256 100644\n--- a/drivers/raw/ioat/ioat_rawdev_test.c\n+++ b/drivers/raw/ioat/ioat_rawdev_test.c\n@@ -9,10 +9,13 @@\n #include \"rte_ioat_rawdev.h\"\n #include \"ioat_private.h\"\n \n+#define MAX_SUPPORTED_RAWDEVS 64\n+#define TEST_SKIPPED 77\n+\n int ioat_rawdev_test(uint16_t dev_id); /* pre-define to keep compiler happy */\n \n static struct rte_mempool *pool;\n-static unsigned short expected_ring_size;\n+static unsigned short expected_ring_size[MAX_SUPPORTED_RAWDEVS];\n \n static int\n test_enqueue_copies(int dev_id)\n@@ -149,10 +152,16 @@ ioat_rawdev_test(uint16_t dev_id)\n \tunsigned int nb_xstats;\n \tunsigned int i;\n \n+\tif (dev_id >= MAX_SUPPORTED_RAWDEVS) {\n+\t\tprintf(\"Skipping test. Cannot test rawdevs with id's greater than %d\\n\",\n+\t\t\t\tMAX_SUPPORTED_RAWDEVS);\n+\t\treturn TEST_SKIPPED;\n+\t}\n+\n \trte_rawdev_info_get(dev_id, &info, sizeof(p));\n-\tif (p.ring_size != expected_ring_size) {\n+\tif (p.ring_size != expected_ring_size[dev_id]) {\n \t\tprintf(\"Error, initial ring size is not as expected (Actual: %d, Expected: %d)\\n\",\n-\t\t\t\t(int)p.ring_size, expected_ring_size);\n+\t\t\t\t(int)p.ring_size, expected_ring_size[dev_id]);\n \t\treturn -1;\n \t}\n \n@@ -167,7 +176,7 @@ ioat_rawdev_test(uint16_t dev_id)\n \t\t\t\tIOAT_TEST_RINGSIZE, (int)p.ring_size);\n \t\treturn -1;\n \t}\n-\texpected_ring_size = p.ring_size;\n+\texpected_ring_size[dev_id] = p.ring_size;\n \n \tif (rte_rawdev_start(dev_id) != 0) {\n \t\tprintf(\"Error with rte_rawdev_start()\\n\");\n", "prefixes": [ "1/4" ] }{ "id": 75821, "url": "