get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 73657,
    "url": "http://patchwork.dpdk.org/api/patches/73657/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20200709152047.167730-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": "<20200709152047.167730-6-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200709152047.167730-6-bruce.richardson@intel.com",
    "date": "2020-07-09T15:20:47",
    "name": "[20.11,5/5] rawdev: allow queue default config query to return error",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0781dd70ca503b4ecc60c93532677bd8181e83ed",
    "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/20200709152047.167730-6-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 10932,
            "url": "http://patchwork.dpdk.org/api/series/10932/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=10932",
            "date": "2020-07-09T15:20:42",
            "name": "Enhance rawdev APIs",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/10932/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/73657/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/73657/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 236C4A0528;\n\tThu,  9 Jul 2020 17:21:56 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id BCC241E89B;\n\tThu,  9 Jul 2020 17:21:20 +0200 (CEST)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n by dpdk.org (Postfix) with ESMTP id 031C11E89B\n for <dev@dpdk.org>; Thu,  9 Jul 2020 17:21:18 +0200 (CEST)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 09 Jul 2020 08:21:18 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.222.36])\n by fmsmga006.fm.intel.com with ESMTP; 09 Jul 2020 08:21:16 -0700"
        ],
        "IronPort-SDR": [
            "\n 2dzuQ9C1C0kCqMqmSge8xfAZUjaX0wJFhQhN4xPV17E+ZlXUcm535w+kzWvwzdywUJR63AuMnf\n tuYg7TBVdJuA==",
            "\n Ewp9q2WflKZa3vHtUATQMVWBIXKCthdmYPJjCorANSG2clFoelRBwUJbiXELlJur7YsRgiDl5L\n qwh40lw+ev7w=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9677\"; a=\"209546688\"",
            "E=Sophos;i=\"5.75,331,1589266800\"; d=\"scan'208\";a=\"209546688\"",
            "E=Sophos;i=\"5.75,331,1589266800\"; d=\"scan'208\";a=\"483835620\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "Nipun Gupta <nipun.gupta@nxp.com>, Hemant Agrawal <hemant.agrawal@nxp.com>",
        "Cc": "dev@dpdk.org, Rosen Xu <rosen.xu@intel.com>,\n Tianfei zhang <tianfei.zhang@intel.com>, Xiaoyun Li <xiaoyun.li@intel.com>,\n Jingjing Wu <jingjing.wu@intel.com>, Satha Rao <skoteshwar@marvell.com>,\n Mahipal Challa <mchalla@marvell.com>, Jerin Jacob <jerinj@marvell.com>,\n Bruce Richardson <bruce.richardson@intel.com>",
        "Date": "Thu,  9 Jul 2020 16:20:47 +0100",
        "Message-Id": "<20200709152047.167730-6-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20200709152047.167730-1-bruce.richardson@intel.com>",
        "References": "<20200709152047.167730-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 20.11 5/5] rawdev: allow queue default config\n\tquery to return error",
        "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 driver APIs for returning the queue default config can fail if the\nparameters are invalid, or other reasons, so allow them to return error\ncodes to the rawdev layer and from hence to the app.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n drivers/raw/ntb/ntb.c                  |  6 ++++--\n drivers/raw/skeleton/skeleton_rawdev.c | 12 +++++++-----\n lib/librte_rawdev/rte_rawdev.c         |  3 +--\n lib/librte_rawdev/rte_rawdev_pmd.h     |  4 +++-\n 4 files changed, 15 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/raw/ntb/ntb.c b/drivers/raw/ntb/ntb.c\nindex 7c15e204c..72489c521 100644\n--- a/drivers/raw/ntb/ntb.c\n+++ b/drivers/raw/ntb/ntb.c\n@@ -246,7 +246,7 @@ ntb_dev_intr_handler(void *param)\n \t}\n }\n \n-static void\n+static int\n ntb_queue_conf_get(struct rte_rawdev *dev,\n \t\t   uint16_t queue_id,\n \t\t   rte_rawdev_obj_t queue_conf,\n@@ -256,11 +256,13 @@ ntb_queue_conf_get(struct rte_rawdev *dev,\n \tstruct ntb_hw *hw = dev->dev_private;\n \n \tif (conf_size != sizeof(*q_conf))\n-\t\treturn;\n+\t\treturn -EINVAL;\n \n \tq_conf->tx_free_thresh = hw->tx_queues[queue_id]->tx_free_thresh;\n \tq_conf->nb_desc = hw->rx_queues[queue_id]->nb_rx_desc;\n \tq_conf->rx_mp = hw->rx_queues[queue_id]->mpool;\n+\n+\treturn 0;\n }\n \n static void\ndiff --git a/drivers/raw/skeleton/skeleton_rawdev.c b/drivers/raw/skeleton/skeleton_rawdev.c\nindex f109e4d2c..9c4082b9a 100644\n--- a/drivers/raw/skeleton/skeleton_rawdev.c\n+++ b/drivers/raw/skeleton/skeleton_rawdev.c\n@@ -220,10 +220,10 @@ static int skeleton_rawdev_reset(struct rte_rawdev *dev)\n \treturn 0;\n }\n \n-static void skeleton_rawdev_queue_def_conf(struct rte_rawdev *dev,\n-\t\t\t\t\t   uint16_t queue_id,\n-\t\t\t\t\t   rte_rawdev_obj_t queue_conf,\n-\t\t\t\t\t   size_t conf_size)\n+static int skeleton_rawdev_queue_def_conf(struct rte_rawdev *dev,\n+\t\t\t\t\t  uint16_t queue_id,\n+\t\t\t\t\t  rte_rawdev_obj_t queue_conf,\n+\t\t\t\t\t  size_t conf_size)\n {\n \tstruct skeleton_rawdev *skeldev;\n \tstruct skeleton_rawdev_queue *skelq;\n@@ -231,7 +231,7 @@ static void skeleton_rawdev_queue_def_conf(struct rte_rawdev *dev,\n \tSKELETON_PMD_FUNC_TRACE();\n \n \tif (!dev || !queue_conf || conf_size != sizeof(struct skeleton_rawdev_queue))\n-\t\treturn;\n+\t\treturn -EINVAL;\n \n \tskeldev = skeleton_rawdev_get_priv(dev);\n \tskelq = &skeldev->queues[queue_id];\n@@ -239,6 +239,8 @@ static void skeleton_rawdev_queue_def_conf(struct rte_rawdev *dev,\n \tif (queue_id < SKELETON_MAX_QUEUES)\n \t\trte_memcpy(queue_conf, skelq,\n \t\t\tsizeof(struct skeleton_rawdev_queue));\n+\n+\treturn 0;\n }\n \n static void\ndiff --git a/lib/librte_rawdev/rte_rawdev.c b/lib/librte_rawdev/rte_rawdev.c\nindex 8965f2ce3..69872d450 100644\n--- a/lib/librte_rawdev/rte_rawdev.c\n+++ b/lib/librte_rawdev/rte_rawdev.c\n@@ -146,8 +146,7 @@ rte_rawdev_queue_conf_get(uint16_t dev_id,\n \tdev = &rte_rawdevs[dev_id];\n \n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->queue_def_conf, -ENOTSUP);\n-\t(*dev->dev_ops->queue_def_conf)(dev, queue_id, queue_conf, queue_conf_size);\n-\treturn 0;\n+\treturn (*dev->dev_ops->queue_def_conf)(dev, queue_id, queue_conf, queue_conf_size);\n }\n \n int\ndiff --git a/lib/librte_rawdev/rte_rawdev_pmd.h b/lib/librte_rawdev/rte_rawdev_pmd.h\nindex 34eb667f6..34dd7181b 100644\n--- a/lib/librte_rawdev/rte_rawdev_pmd.h\n+++ b/lib/librte_rawdev/rte_rawdev_pmd.h\n@@ -215,8 +215,10 @@ typedef int (*rawdev_reset_t)(struct rte_rawdev *dev);\n  * @param[out] queue_conf\n  *   Raw device queue configuration structure\n  *\n+ * @return\n+ *   Returns 0 on success, negative errno on failure\n  */\n-typedef void (*rawdev_queue_conf_get_t)(struct rte_rawdev *dev,\n+typedef int (*rawdev_queue_conf_get_t)(struct rte_rawdev *dev,\n \t\t\t\t\tuint16_t queue_id,\n \t\t\t\t\trte_rawdev_obj_t queue_conf,\n \t\t\t\t\tsize_t queue_conf_size);\n",
    "prefixes": [
        "20.11",
        "5/5"
    ]
}