get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 13015,
    "url": "https://patches.dpdk.org/api/patches/13015/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1464207514-4406-1-git-send-email-johndale@cisco.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<1464207514-4406-1-git-send-email-johndale@cisco.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1464207514-4406-1-git-send-email-johndale@cisco.com",
    "date": "2016-05-25T20:18:34",
    "name": "[dpdk-dev] enic: fix seg fault when releasing queues",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5032c8bced18345964eb07f832dc40e6b8b014f6",
    "submitter": {
        "id": 359,
        "url": "https://patches.dpdk.org/api/people/359/?format=api",
        "name": "John Daley (johndale)",
        "email": "johndale@cisco.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1464207514-4406-1-git-send-email-johndale@cisco.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/13015/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/13015/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 506283239;\n\tWed, 25 May 2016 22:18:51 +0200 (CEST)",
            "from rcdn-iport-9.cisco.com (rcdn-iport-9.cisco.com [173.37.86.80])\n\tby dpdk.org (Postfix) with ESMTP id 8C7582C69\n\tfor <dev@dpdk.org>; Wed, 25 May 2016 22:18:50 +0200 (CEST)",
            "from rcdn-core-7.cisco.com ([173.37.93.143])\n\tby rcdn-iport-9.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 May 2016 20:18:49 +0000",
            "from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48])\n\tby rcdn-core-7.cisco.com (8.14.5/8.14.5) with ESMTP id u4PKInWF011039;\n\tWed, 25 May 2016 20:18:49 GMT",
            "by cisco.com (Postfix, from userid 392789)\n\tid 877173FAADC3; Wed, 25 May 2016 13:18:49 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n\td=cisco.com; i=@cisco.com; l=2570; q=dns/txt; s=iport;\n\tt=1464207530; x=1465417130;\n\th=from:to:cc:subject:date:message-id;\n\tbh=oWdA8Yvl/ywTAA4j/fysLD5jkFQTp2LrapFwoPppM6w=;\n\tb=YMNdImMwrt7YdwnCRiREM6mvPxTvqvssuH3DVpHn2lrMTUquU1xCiGE1\n\tFtWZ6JnGsPNyVSPU8XrYAD1v5Mvf8bMMTlN7dYV9P395j66oLeDtiQpbs\n\t7j5+1TclCSbM6EUyv9OCVgqbk3kDCT2z2p/AoUipu6fAiD/Q3gC7vll1D U=;",
        "X-IronPort-AV": "E=Sophos;i=\"5.26,365,1459814400\"; d=\"scan'208\";a=\"106077510\"",
        "From": "John Daley <johndale@cisco.com>",
        "To": "dev@dpdk.org",
        "Cc": "John Daley <johndale@cisco.com>",
        "Date": "Wed, 25 May 2016 13:18:34 -0700",
        "Message-Id": "<1464207514-4406-1-git-send-email-johndale@cisco.com>",
        "X-Mailer": "git-send-email 2.7.0",
        "Subject": "[dpdk-dev] [PATCH] enic: fix seg fault when releasing queues",
        "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": "If device configuration failed due to a lack of resources, like if\nthere were more queues requested than available, the queue release\nfunction is called with NULL pointers which were being dereferenced.\n\nSkip releasing queues if they are NULL pointers. Also, if configuration\nfails due to lack of resources, be more specific about which resources\nare lacking.\n\nFixes: fefed3d1e62c (\"enic: new driver\")\nSigned-off-by: John Daley <johndale@cisco.com>\n---\n drivers/net/enic/enic_main.c | 30 +++++++++++++++++++-----------\n 1 file changed, 19 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c\nindex bbbe660..a3eb4e3 100644\n--- a/drivers/net/enic/enic_main.c\n+++ b/drivers/net/enic/enic_main.c\n@@ -467,14 +467,16 @@ int enic_alloc_intr_resources(struct enic *enic)\n \n void enic_free_rq(void *rxq)\n {\n-\tstruct vnic_rq *rq = (struct vnic_rq *)rxq;\n-\tstruct enic *enic = vnic_dev_priv(rq->vdev);\n+\tif (rxq != NULL) {\n+\t\tstruct vnic_rq *rq = (struct vnic_rq *)rxq;\n+\t\tstruct enic *enic = vnic_dev_priv(rq->vdev);\n \n-\tenic_rxmbuf_queue_release(enic, rq);\n-\trte_free(rq->mbuf_ring);\n-\trq->mbuf_ring = NULL;\n-\tvnic_rq_free(rq);\n-\tvnic_cq_free(&enic->cq[rq->index]);\n+\t\tenic_rxmbuf_queue_release(enic, rq);\n+\t\trte_free(rq->mbuf_ring);\n+\t\trq->mbuf_ring = NULL;\n+\t\tvnic_rq_free(rq);\n+\t\tvnic_cq_free(&enic->cq[rq->index]);\n+\t}\n }\n \n void enic_start_wq(struct enic *enic, uint16_t queue_idx)\n@@ -841,16 +843,22 @@ int enic_set_vnic_res(struct enic *enic)\n {\n \tstruct rte_eth_dev *eth_dev = enic->rte_dev;\n \n-\tif ((enic->rq_count < eth_dev->data->nb_rx_queues) ||\n-\t\t(enic->wq_count < eth_dev->data->nb_tx_queues)) {\n-\t\tdev_err(dev, \"Not enough resources configured, aborting\\n\");\n+\tif (enic->rq_count < eth_dev->data->nb_rx_queues) {\n+\t\tdev_err(dev, \"Not enough Receive queues. Requested:%u, Configured:%u\\n\",\n+\t\t\teth_dev->data->nb_rx_queues, enic->rq_count);\n+\t\treturn -1;\n+\t}\n+\tif (enic->wq_count < eth_dev->data->nb_tx_queues) {\n+\t\tdev_err(dev, \"Not enough Transmit queues. Requested:%u, Configured:%u\\n\",\n+\t\t\teth_dev->data->nb_tx_queues, enic->wq_count);\n \t\treturn -1;\n \t}\n \n \tenic->rq_count = eth_dev->data->nb_rx_queues;\n \tenic->wq_count = eth_dev->data->nb_tx_queues;\n \tif (enic->cq_count < (enic->rq_count + enic->wq_count)) {\n-\t\tdev_err(dev, \"Not enough resources configured, aborting\\n\");\n+\t\tdev_err(dev, \"Not enough Completion queues. Required:%u, Configured:%u\\n\",\n+\t\t\tenic->rq_count + enic->wq_count, enic->cq_count);\n \t\treturn -1;\n \t}\n \n",
    "prefixes": [
        "dpdk-dev"
    ]
}