get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 6438,
    "url": "https://patches.dpdk.org/api/patches/6438/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1436981189-3320-3-git-send-email-tomaszx.kulasek@intel.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": "<1436981189-3320-3-git-send-email-tomaszx.kulasek@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1436981189-3320-3-git-send-email-tomaszx.kulasek@intel.com",
    "date": "2015-07-15T17:26:22",
    "name": "[dpdk-dev,PATCHv4,2/9] null: fix segfault when null_pmd added to bonding",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "126c12891fcf634cbd6b1c8f0a2e842cf98fd13b",
    "submitter": {
        "id": 155,
        "url": "https://patches.dpdk.org/api/people/155/?format=api",
        "name": "Tomasz Kulasek",
        "email": "tomaszx.kulasek@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1436981189-3320-3-git-send-email-tomaszx.kulasek@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/6438/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/6438/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 9D8A65A0A;\n\tWed, 15 Jul 2015 19:27:51 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 6764A5A0A\n\tfor <dev@dpdk.org>; Wed, 15 Jul 2015 19:27:50 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga101.jf.intel.com with ESMTP; 15 Jul 2015 10:27:49 -0700",
            "from unknown (HELO Sent) ([10.217.248.180])\n\tby orsmga002.jf.intel.com with SMTP; 15 Jul 2015 10:27:47 -0700",
            "by Sent (sSMTP sendmail emulation); Wed, 15 Jul 2015 19:27:25 +0200"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.15,481,1432623600\"; d=\"scan'208\";a=\"765079390\"",
        "From": "Tomasz Kulasek <tomaszx.kulasek@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Wed, 15 Jul 2015 19:26:22 +0200",
        "Message-Id": "<1436981189-3320-3-git-send-email-tomaszx.kulasek@intel.com>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": "<1436981189-3320-1-git-send-email-tomaszx.kulasek@intel.com>",
        "References": "<1435589444-1988-1-git-send-email-tomaszx.kulasek@intel.com>\n\t<1436981189-3320-1-git-send-email-tomaszx.kulasek@intel.com>",
        "Subject": "[dpdk-dev] [PATCHv4 2/9] null: fix segfault when null_pmd added to\n\tbonding",
        "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": "When device is added to the bonding, the link status callback is added to\nthe slave's eth_dev->link_intr_cbs list. This list is not initialized for\nnull pmd and adding it to the bonding segfaults application.\n\nThis patch allocates and sets up required structures.\n\nSigned-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>\n---\n drivers/net/null/rte_eth_null.c |   11 +++++++++++\n 1 file changed, 11 insertions(+)",
    "diff": "diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c\nindex e244595..a8b3191 100644\n--- a/drivers/net/null/rte_eth_null.c\n+++ b/drivers/net/null/rte_eth_null.c\n@@ -386,6 +386,7 @@ eth_dev_null_create(const char *name,\n \tconst unsigned nb_rx_queues = 1;\n \tconst unsigned nb_tx_queues = 1;\n \tstruct rte_eth_dev_data *data = NULL;\n+\tstruct eth_driver *eth_drv = NULL;\n \tstruct rte_pci_device *pci_dev = NULL;\n \tstruct pmd_internals *internals = NULL;\n \tstruct rte_eth_dev *eth_dev = NULL;\n@@ -416,6 +417,10 @@ eth_dev_null_create(const char *name,\n \tif (eth_dev == NULL)\n \t\tgoto error;\n \n+\teth_drv = rte_zmalloc_socket(name, sizeof(*eth_drv), 0, numa_node);\n+\tif (!eth_drv)\n+\t\tgoto error;\n+\n \t/* now put it all together\n \t * - store queue data in internals,\n \t * - store numa_node info in pci_driver\n@@ -431,7 +436,10 @@ eth_dev_null_create(const char *name,\n \tinternals->packet_copy = packet_copy;\n \tinternals->numa_node = numa_node;\n \n+\teth_drv->pci_drv.name = drivername;\n+\n \tpci_dev->numa_node = numa_node;\n+\tpci_dev->driver = &eth_drv->pci_drv;\n \n \tdata->dev_private = internals;\n \tdata->port_id = eth_dev->data->port_id;\n@@ -445,6 +453,7 @@ eth_dev_null_create(const char *name,\n \teth_dev->dev_ops = &ops;\n \teth_dev->pci_dev = pci_dev;\n \teth_dev->driver = &rte_null_pmd;\n+\tTAILQ_INIT(&eth_dev->link_intr_cbs);\n \n \t/* finally assign rx and tx ops */\n \tif (packet_copy) {\n@@ -461,6 +470,8 @@ error:\n \trte_free(data);\n \trte_free(pci_dev);\n \trte_free(internals);\n+\trte_free(eth_dev);\n+\trte_free(eth_drv);\n \n \treturn -1;\n }\n",
    "prefixes": [
        "dpdk-dev",
        "PATCHv4",
        "2/9"
    ]
}