get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 75822,
    "url": "http://patches.dpdk.org/api/patches/75822/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200821155945.29415-3-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-3-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200821155945.29415-3-bruce.richardson@intel.com",
    "date": "2020-08-21T15:59:43",
    "name": "[2/4] raw/ioat: include extra info in error messages",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "d6b3e6dae9a171d76ee0ad39dc35cca444da557c",
    "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-3-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/75822/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/75822/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 A9457A04AF;\n\tFri, 21 Aug 2020 18:00:14 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 262E31C0B6;\n\tFri, 21 Aug 2020 18:00:04 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by dpdk.org (Postfix) with ESMTP id 5F8EFAAD5\n for <dev@dpdk.org>; Fri, 21 Aug 2020 18:00:02 +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:01 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.222.56])\n by orsmga005.jf.intel.com with ESMTP; 21 Aug 2020 09:00:00 -0700"
        ],
        "IronPort-SDR": [
            "\n yPWSnNZ9IjqMoEhzo1p4sifDnv5xZoXnz51C5vn+UiUMjaXyLI1YjlzGJ69S4sjKe60bHAMaDN\n WjEtx7euBLmA==",
            "\n lp1QtJ5Uju3GCnLbNf47X4YfpkLZrWirrrPayy2P1cY8dIT5o5S1WKN/WeSS8mNYLQvIPANra4\n 7tk7atmij1Hg=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9719\"; a=\"173607832\"",
            "E=Sophos;i=\"5.76,337,1592895600\"; d=\"scan'208\";a=\"173607832\"",
            "E=Sophos;i=\"5.76,337,1592895600\"; d=\"scan'208\";a=\"473094274\""
        ],
        "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:43 +0100",
        "Message-Id": "<20200821155945.29415-3-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 2/4] raw/ioat: include extra info in error\n\tmessages",
        "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": "In case of any failures, include the function name and the line number of\nthe error message in the message, to make tracking down the failure easier.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n drivers/raw/ioat/ioat_rawdev_test.c | 52 +++++++++++++++++++----------\n 1 file changed, 34 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/drivers/raw/ioat/ioat_rawdev_test.c b/drivers/raw/ioat/ioat_rawdev_test.c\nindex 6262995256..534b07b124 100644\n--- a/drivers/raw/ioat/ioat_rawdev_test.c\n+++ b/drivers/raw/ioat/ioat_rawdev_test.c\n@@ -17,6 +17,22 @@ int ioat_rawdev_test(uint16_t dev_id); /* pre-define to keep compiler happy */\n static struct rte_mempool *pool;\n static unsigned short expected_ring_size[MAX_SUPPORTED_RAWDEVS];\n \n+#define PRINT_ERR(...) print_err(__func__, __LINE__, __VA_ARGS__)\n+\n+static inline int\n+print_err(const char *func, int lineno, const char *format, ...)\n+{\n+\tva_list ap;\n+\tint ret;\n+\n+\tret = fprintf(stderr, \"In %s:%d - \", func, lineno);\n+\tva_start(ap, format);\n+\tret += vfprintf(stderr, format, ap);\n+\tva_end(ap);\n+\n+\treturn ret;\n+}\n+\n static int\n test_enqueue_copies(int dev_id)\n {\n@@ -46,7 +62,7 @@ test_enqueue_copies(int dev_id)\n \t\t\t\t(uintptr_t)src,\n \t\t\t\t(uintptr_t)dst,\n \t\t\t\t0 /* no fence */) != 1) {\n-\t\t\tprintf(\"Error with rte_ioat_enqueue_copy\\n\");\n+\t\t\tPRINT_ERR(\"Error with rte_ioat_enqueue_copy\\n\");\n \t\t\treturn -1;\n \t\t}\n \t\trte_ioat_do_copies(dev_id);\n@@ -54,18 +70,18 @@ test_enqueue_copies(int dev_id)\n \n \t\tif (rte_ioat_completed_copies(dev_id, 1, (void *)&completed[0],\n \t\t\t\t(void *)&completed[1]) != 1) {\n-\t\t\tprintf(\"Error with rte_ioat_completed_copies\\n\");\n+\t\t\tPRINT_ERR(\"Error with rte_ioat_completed_copies\\n\");\n \t\t\treturn -1;\n \t\t}\n \t\tif (completed[0] != src || completed[1] != dst) {\n-\t\t\tprintf(\"Error with completions: got (%p, %p), not (%p,%p)\\n\",\n+\t\t\tPRINT_ERR(\"Error with completions: got (%p, %p), not (%p,%p)\\n\",\n \t\t\t\t\tcompleted[0], completed[1], src, dst);\n \t\t\treturn -1;\n \t\t}\n \n \t\tfor (i = 0; i < length; i++)\n \t\t\tif (dst_data[i] != src_data[i]) {\n-\t\t\t\tprintf(\"Data mismatch at char %u\\n\", i);\n+\t\t\t\tPRINT_ERR(\"Data mismatch at char %u\\n\", i);\n \t\t\t\treturn -1;\n \t\t\t}\n \t\trte_pktmbuf_free(src);\n@@ -98,7 +114,7 @@ test_enqueue_copies(int dev_id)\n \t\t\t\t\t(uintptr_t)srcs[i],\n \t\t\t\t\t(uintptr_t)dsts[i],\n \t\t\t\t\t0 /* nofence */) != 1) {\n-\t\t\t\tprintf(\"Error with rte_ioat_enqueue_copy for buffer %u\\n\",\n+\t\t\t\tPRINT_ERR(\"Error with rte_ioat_enqueue_copy for buffer %u\\n\",\n \t\t\t\t\t\ti);\n \t\t\t\treturn -1;\n \t\t\t}\n@@ -108,18 +124,18 @@ test_enqueue_copies(int dev_id)\n \n \t\tif (rte_ioat_completed_copies(dev_id, 64, (void *)completed_src,\n \t\t\t\t(void *)completed_dst) != RTE_DIM(srcs)) {\n-\t\t\tprintf(\"Error with rte_ioat_completed_copies\\n\");\n+\t\t\tPRINT_ERR(\"Error with rte_ioat_completed_copies\\n\");\n \t\t\treturn -1;\n \t\t}\n \t\tfor (i = 0; i < RTE_DIM(srcs); i++) {\n \t\t\tchar *src_data, *dst_data;\n \n \t\t\tif (completed_src[i] != srcs[i]) {\n-\t\t\t\tprintf(\"Error with source pointer %u\\n\", i);\n+\t\t\t\tPRINT_ERR(\"Error with source pointer %u\\n\", i);\n \t\t\t\treturn -1;\n \t\t\t}\n \t\t\tif (completed_dst[i] != dsts[i]) {\n-\t\t\t\tprintf(\"Error with dest pointer %u\\n\", i);\n+\t\t\t\tPRINT_ERR(\"Error with dest pointer %u\\n\", i);\n \t\t\t\treturn -1;\n \t\t\t}\n \n@@ -127,7 +143,7 @@ test_enqueue_copies(int dev_id)\n \t\t\tdst_data = rte_pktmbuf_mtod(dsts[i], char *);\n \t\t\tfor (j = 0; j < length; j++)\n \t\t\t\tif (src_data[j] != dst_data[j]) {\n-\t\t\t\t\tprintf(\"Error with copy of packet %u, byte %u\\n\",\n+\t\t\t\t\tPRINT_ERR(\"Error with copy of packet %u, byte %u\\n\",\n \t\t\t\t\t\t\ti, j);\n \t\t\t\t\treturn -1;\n \t\t\t\t}\n@@ -160,26 +176,26 @@ ioat_rawdev_test(uint16_t dev_id)\n \n \trte_rawdev_info_get(dev_id, &info, sizeof(p));\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\tPRINT_ERR(\"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[dev_id]);\n \t\treturn -1;\n \t}\n \n \tp.ring_size = IOAT_TEST_RINGSIZE;\n \tif (rte_rawdev_configure(dev_id, &info, sizeof(p)) != 0) {\n-\t\tprintf(\"Error with rte_rawdev_configure()\\n\");\n+\t\tPRINT_ERR(\"Error with rte_rawdev_configure()\\n\");\n \t\treturn -1;\n \t}\n \trte_rawdev_info_get(dev_id, &info, sizeof(p));\n \tif (p.ring_size != IOAT_TEST_RINGSIZE) {\n-\t\tprintf(\"Error, ring size is not %d (%d)\\n\",\n+\t\tPRINT_ERR(\"Error, ring size is not %d (%d)\\n\",\n \t\t\t\tIOAT_TEST_RINGSIZE, (int)p.ring_size);\n \t\treturn -1;\n \t}\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+\t\tPRINT_ERR(\"Error with rte_rawdev_start()\\n\");\n \t\treturn -1;\n \t}\n \n@@ -190,7 +206,7 @@ ioat_rawdev_test(uint16_t dev_id)\n \t\t\t2048, /* data room size */\n \t\t\tinfo.socket_id);\n \tif (pool == NULL) {\n-\t\tprintf(\"Error with mempool creation\\n\");\n+\t\tPRINT_ERR(\"Error with mempool creation\\n\");\n \t\treturn -1;\n \t}\n \n@@ -199,14 +215,14 @@ ioat_rawdev_test(uint16_t dev_id)\n \n \tsnames = malloc(sizeof(*snames) * nb_xstats);\n \tif (snames == NULL) {\n-\t\tprintf(\"Error allocating xstat names memory\\n\");\n+\t\tPRINT_ERR(\"Error allocating xstat names memory\\n\");\n \t\tgoto err;\n \t}\n \trte_rawdev_xstats_names_get(dev_id, snames, nb_xstats);\n \n \tids = malloc(sizeof(*ids) * nb_xstats);\n \tif (ids == NULL) {\n-\t\tprintf(\"Error allocating xstat ids memory\\n\");\n+\t\tPRINT_ERR(\"Error allocating xstat ids memory\\n\");\n \t\tgoto err;\n \t}\n \tfor (i = 0; i < nb_xstats; i++)\n@@ -214,7 +230,7 @@ ioat_rawdev_test(uint16_t dev_id)\n \n \tstats = malloc(sizeof(*stats) * nb_xstats);\n \tif (stats == NULL) {\n-\t\tprintf(\"Error allocating xstat memory\\n\");\n+\t\tPRINT_ERR(\"Error allocating xstat memory\\n\");\n \t\tgoto err;\n \t}\n \n@@ -234,7 +250,7 @@ ioat_rawdev_test(uint16_t dev_id)\n \n \trte_rawdev_stop(dev_id);\n \tif (rte_rawdev_xstats_reset(dev_id, NULL, 0) != 0) {\n-\t\tprintf(\"Error resetting xstat values\\n\");\n+\t\tPRINT_ERR(\"Error resetting xstat values\\n\");\n \t\tgoto err;\n \t}\n \n",
    "prefixes": [
        "2/4"
    ]
}