get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 14800,
    "url": "http://patches.dpdk.org/api/patches/14800/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1468351487-12002-1-git-send-email-johndale@cisco.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": "<1468351487-12002-1-git-send-email-johndale@cisco.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1468351487-12002-1-git-send-email-johndale@cisco.com",
    "date": "2016-07-12T19:24:47",
    "name": "[dpdk-dev] net/enic: fix Tx and Rx queue stop and start",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "c80fcca9e693957103397a9cbfa62d3afe788eaa",
    "submitter": {
        "id": 359,
        "url": "http://patches.dpdk.org/api/people/359/?format=api",
        "name": "John Daley (johndale)",
        "email": "johndale@cisco.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1468351487-12002-1-git-send-email-johndale@cisco.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/14800/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/14800/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id EE20E1C52;\n\tTue, 12 Jul 2016 21:24:51 +0200 (CEST)",
            "from alln-iport-8.cisco.com (alln-iport-8.cisco.com\n\t[173.37.142.95]) by dpdk.org (Postfix) with ESMTP id 6992511DE\n\tfor <dev@dpdk.org>; Tue, 12 Jul 2016 21:24:50 +0200 (CEST)",
            "from alln-core-2.cisco.com ([173.36.13.135])\n\tby alln-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-AES256-SHA;\n\t12 Jul 2016 19:24:49 +0000",
            "from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48])\n\tby alln-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id u6CJOnVj031509;\n\tTue, 12 Jul 2016 19:24:49 GMT",
            "by cisco.com (Postfix, from userid 392789)\n\tid 53D543FAADF9; Tue, 12 Jul 2016 12:24:49 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n\td=cisco.com; i=@cisco.com; l=3851; q=dns/txt; s=iport;\n\tt=1468351490; x=1469561090;\n\th=from:to:cc:subject:date:message-id;\n\tbh=JnfFpIMQClEIIfRPV0pizI8TISxw8CbQVC98lWU7OIw=;\n\tb=ZFtGNQkjmVFlNfd1dlOqQolWt+Tj8KzV8VJ6SKpsVauFYGEOTdtDLCKF\n\t/lzZA7Sh82G5zXwhdqh1reDM4hmbNBsd52Wraw+zMdxUN7Z9T0TjTvSkr\n\tY8pzhBPrIc9qtG5o7CHlzHmfALPoFN3Xfjjd9jugAwbptzzMQgpyoWQup M=;",
        "X-IronPort-AV": "E=Sophos;i=\"5.28,353,1464652800\"; d=\"scan'208\";a=\"296831281\"",
        "From": "John Daley <johndale@cisco.com>",
        "To": "dev@dpdk.org",
        "Cc": "bruce.richardson@intel.com, John Daley <johndale@cisco.com>",
        "Date": "Tue, 12 Jul 2016 12:24:47 -0700",
        "Message-Id": "<1468351487-12002-1-git-send-email-johndale@cisco.com>",
        "X-Mailer": "git-send-email 2.7.0",
        "Subject": "[dpdk-dev] [PATCH] net/enic: fix Tx and Rx queue stop and start",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The exported device start and stop functions where not setting the queue\nstates to RTE_ETH_QUEUE_STATE_STARTED and RTE_ETH_QUEUE_STATE_STOPPED.\nAfter starting the device, the RTE queue stop function would not call\nthe enic queue stop function since queue was already marked as stopped.\n\nPut queue state updates in the lower level queue start/stop functions\nwhich are called by both device and queue start/stop functions.\n\nFixes: fefed3d1e62c (\"enic: new driver\")\n\nReviewed-by: Nelson Escobar <neescoba@cisco.com>\nSigned-off-by: John Daley <johndale@cisco.com>\n---\n drivers/net/enic/enic_ethdev.c |  6 ------\n drivers/net/enic/enic_main.c   | 22 ++++++++++++++++++----\n 2 files changed, 18 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c\nindex 3c87b49..f410f84 100644\n--- a/drivers/net/enic/enic_ethdev.c\n+++ b/drivers/net/enic/enic_ethdev.c\n@@ -196,7 +196,6 @@ static int enicpmd_dev_tx_queue_start(struct rte_eth_dev *eth_dev,\n \tENICPMD_FUNC_TRACE();\n \n \tenic_start_wq(enic, queue_idx);\n-\teth_dev->data->tx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STARTED;\n \n \treturn 0;\n }\n@@ -212,8 +211,6 @@ static int enicpmd_dev_tx_queue_stop(struct rte_eth_dev *eth_dev,\n \tret = enic_stop_wq(enic, queue_idx);\n \tif (ret)\n \t\tdev_err(enic, \"error in stopping wq %d\\n\", queue_idx);\n-\telse\n-\t\teth_dev->data->tx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STOPPED;\n \n \treturn ret;\n }\n@@ -226,7 +223,6 @@ static int enicpmd_dev_rx_queue_start(struct rte_eth_dev *eth_dev,\n \tENICPMD_FUNC_TRACE();\n \n \tenic_start_rq(enic, queue_idx);\n-\teth_dev->data->rx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STARTED;\n \n \treturn 0;\n }\n@@ -242,8 +238,6 @@ static int enicpmd_dev_rx_queue_stop(struct rte_eth_dev *eth_dev,\n \tret = enic_stop_rq(enic, queue_idx);\n \tif (ret)\n \t\tdev_err(enic, \"error in stopping rq %d\\n\", queue_idx);\n-\telse\n-\t\teth_dev->data->rx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STOPPED;\n \n \treturn ret;\n }\ndiff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c\nindex d8669cc..425f55d 100644\n--- a/drivers/net/enic/enic_main.c\n+++ b/drivers/net/enic/enic_main.c\n@@ -518,30 +518,41 @@ void enic_free_rq(void *rxq)\n \n void enic_start_wq(struct enic *enic, uint16_t queue_idx)\n {\n+\tstruct rte_eth_dev *eth_dev = enic->rte_dev;\n \tvnic_wq_enable(&enic->wq[queue_idx]);\n+\teth_dev->data->tx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STARTED;\n }\n \n int enic_stop_wq(struct enic *enic, uint16_t queue_idx)\n {\n-\treturn vnic_wq_disable(&enic->wq[queue_idx]);\n+\tstruct rte_eth_dev *eth_dev = enic->rte_dev;\n+\tint ret;\n+\n+\tret = vnic_wq_disable(&enic->wq[queue_idx]);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\teth_dev->data->tx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STOPPED;\n+\treturn 0;\n }\n \n void enic_start_rq(struct enic *enic, uint16_t queue_idx)\n {\n \tstruct vnic_rq *rq_sop = &enic->rq[enic_sop_rq(queue_idx)];\n \tstruct vnic_rq *rq_data = &enic->rq[rq_sop->data_queue_idx];\n+\tstruct rte_eth_dev *eth_dev = enic->rte_dev;\n \n \tif (rq_data->in_use)\n \t\tvnic_rq_enable(rq_data);\n \trte_mb();\n \tvnic_rq_enable(rq_sop);\n-\n+\teth_dev->data->rx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STARTED;\n }\n \n int enic_stop_rq(struct enic *enic, uint16_t queue_idx)\n {\n \tint ret1 = 0, ret2 = 0;\n-\n+\tstruct rte_eth_dev *eth_dev = enic->rte_dev;\n \tstruct vnic_rq *rq_sop = &enic->rq[enic_sop_rq(queue_idx)];\n \tstruct vnic_rq *rq_data = &enic->rq[rq_sop->data_queue_idx];\n \n@@ -552,8 +563,11 @@ int enic_stop_rq(struct enic *enic, uint16_t queue_idx)\n \n \tif (ret2)\n \t\treturn ret2;\n-\telse\n+\telse if (ret1)\n \t\treturn ret1;\n+\n+\teth_dev->data->rx_queue_state[queue_idx] = RTE_ETH_QUEUE_STATE_STOPPED;\n+\treturn 0;\n }\n \n int enic_alloc_rq(struct enic *enic, uint16_t queue_idx,\n",
    "prefixes": [
        "dpdk-dev"
    ]
}