get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 56845,
    "url": "http://patches.dpdk.org/api/patches/56845/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1563786795-14027-18-git-send-email-matan@mellanox.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": "<1563786795-14027-18-git-send-email-matan@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1563786795-14027-18-git-send-email-matan@mellanox.com",
    "date": "2019-07-22T09:13:04",
    "name": "[17/28] net/mlx5: update queue state modify function",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "fd15868b8ccdef84805c7a1062bb3663dc348b68",
    "submitter": {
        "id": 796,
        "url": "http://patches.dpdk.org/api/people/796/?format=api",
        "name": "Matan Azrad",
        "email": "matan@mellanox.com"
    },
    "delegate": {
        "id": 3268,
        "url": "http://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1563786795-14027-18-git-send-email-matan@mellanox.com/mbox/",
    "series": [
        {
            "id": 5639,
            "url": "http://patches.dpdk.org/api/series/5639/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5639",
            "date": "2019-07-22T09:12:48",
            "name": "net/mlx5: support LRO",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/5639/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/56845/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/56845/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 82F3C1BE72;\n\tMon, 22 Jul 2019 11:14:18 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n\tby dpdk.org (Postfix) with ESMTP id 6B8271BDFB\n\tfor <dev@dpdk.org>; Mon, 22 Jul 2019 11:13:30 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE2 (envelope-from\n\tmatan@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 22 Jul 2019 12:13:24 +0300",
            "from pegasus07.mtr.labs.mlnx (pegasus07.mtr.labs.mlnx\n\t[10.210.16.112])\n\tby labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x6M9DMjg010084;\n\tMon, 22 Jul 2019 12:13:23 +0300"
        ],
        "From": "Matan Azrad <matan@mellanox.com>",
        "To": "Shahaf Shuler <shahafs@mellanox.com>, Yongseok Koh <yskoh@mellanox.com>, \n\tViacheslav Ovsiienko <viacheslavo@mellanox.com>",
        "Cc": "dev@dpdk.org, Dekel Peled <dekelp@mellanox.com>",
        "Date": "Mon, 22 Jul 2019 09:13:04 +0000",
        "Message-Id": "<1563786795-14027-18-git-send-email-matan@mellanox.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1563786795-14027-1-git-send-email-matan@mellanox.com>",
        "References": "<1563786795-14027-1-git-send-email-matan@mellanox.com>",
        "Subject": "[dpdk-dev] [PATCH 17/28] net/mlx5: update queue state modify\n\tfunction",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Dekel Peled <dekelp@mellanox.com>\n\nFunction mlx5_queue_state_modify_primary() was implemented to handle\nstate change for queues created using Verbs API.\n\nThis patch update function mlx5_queue_state_modify_primary() to\nsupport state change of RQ object created using DevX API.\n\nSigned-off-by: Dekel Peled <dekelp@mellanox.com>\nAcked-by: Matan Azrad <matan@mellanox.com>\n---\n drivers/net/mlx5/mlx5_rxtx.c | 31 +++++++++++++++++++++++++------\n 1 file changed, 25 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c\nindex 9bfb002..584da3e 100644\n--- a/drivers/net/mlx5/mlx5_rxtx.c\n+++ b/drivers/net/mlx5/mlx5_rxtx.c\n@@ -788,7 +788,7 @@ enum mlx5_txcmp_code {\n }\n \n /**\n- * Modify a Verbs queue state.\n+ * Modify a Verbs/DevX queue state.\n  * This must be called from the primary process.\n  *\n  * @param dev\n@@ -807,15 +807,34 @@ enum mlx5_txcmp_code {\n \tstruct mlx5_priv *priv = dev->data->dev_private;\n \n \tif (sm->is_wq) {\n-\t\tstruct ibv_wq_attr mod = {\n-\t\t\t.attr_mask = IBV_WQ_ATTR_STATE,\n-\t\t\t.wq_state = sm->state,\n-\t\t};\n \t\tstruct mlx5_rxq_data *rxq = (*priv->rxqs)[sm->queue_id];\n \t\tstruct mlx5_rxq_ctrl *rxq_ctrl =\n \t\t\tcontainer_of(rxq, struct mlx5_rxq_ctrl, rxq);\n \n-\t\tret = mlx5_glue->modify_wq(rxq_ctrl->obj->wq, &mod);\n+\t\tif (rxq_ctrl->obj->type == MLX5_RXQ_OBJ_TYPE_IBV) {\n+\t\t\tstruct ibv_wq_attr mod = {\n+\t\t\t\t.attr_mask = IBV_WQ_ATTR_STATE,\n+\t\t\t\t.wq_state = sm->state,\n+\t\t\t};\n+\n+\t\t\tret = mlx5_glue->modify_wq(rxq_ctrl->obj->wq, &mod);\n+\t\t} else { /* rxq_ctrl->obj->type == MLX5_RXQ_OBJ_TYPE_DEVX_RQ. */\n+\t\t\tstruct mlx5_devx_modify_rq_attr rq_attr;\n+\n+\t\t\tmemset(&rq_attr, 0, sizeof(rq_attr));\n+\t\t\tif (sm->state == IBV_WQS_RESET) {\n+\t\t\t\trq_attr.rq_state = MLX5_RQC_STATE_ERR;\n+\t\t\t\trq_attr.state = MLX5_RQC_STATE_RST;\n+\t\t\t} else if (sm->state == IBV_WQS_RDY) {\n+\t\t\t\trq_attr.rq_state = MLX5_RQC_STATE_RST;\n+\t\t\t\trq_attr.state = MLX5_RQC_STATE_RDY;\n+\t\t\t} else if (sm->state == IBV_WQS_ERR) {\n+\t\t\t\trq_attr.rq_state = MLX5_RQC_STATE_RDY;\n+\t\t\t\trq_attr.state = MLX5_RQC_STATE_ERR;\n+\t\t\t}\n+\t\t\tret = mlx5_devx_cmd_modify_rq(rxq_ctrl->obj->rq,\n+\t\t\t\t\t\t      &rq_attr);\n+\t\t}\n \t\tif (ret) {\n \t\t\tDRV_LOG(ERR, \"Cannot change Rx WQ state to %u  - %s\\n\",\n \t\t\t\t\tsm->state, strerror(errno));\n",
    "prefixes": [
        "17/28"
    ]
}