Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/8015/?format=api
https://patches.dpdk.org/api/patches/8015/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1445843277-10934-1-git-send-email-yaacovh@mellanox.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": "<1445843277-10934-1-git-send-email-yaacovh@mellanox.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1445843277-10934-1-git-send-email-yaacovh@mellanox.com", "date": "2015-10-26T07:07:57", "name": "[dpdk-dev,v2] net:bonding: fix free_queues function when no queues exist", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "d9293126290c7e59cf9b34230039b170a831c8f3", "submitter": { "id": 357, "url": "https://patches.dpdk.org/api/people/357/?format=api", "name": "Yaacov Hazan", "email": "yaacovh@mellanox.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1445843277-10934-1-git-send-email-yaacovh@mellanox.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/8015/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/8015/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 160556A80;\n\tMon, 26 Oct 2015 08:08:41 +0100 (CET)", "from mellanox.co.il (unknown [193.47.165.129])\n\tby dpdk.org (Postfix) with ESMTP id 027EE5A76\n\tfor <dev@dpdk.org>; Mon, 26 Oct 2015 08:08:39 +0100 (CET)", "from Internal Mail-Server by MTLPINE1 (envelope-from\n\tyaacovh@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 26 Oct 2015 09:08:28 +0200", "from r-aa-dragon14.mtr.labs.mlnx (r-aa-dragon14.mtr.labs.mlnx\n\t[10.209.68.154])\n\tby labmailer.mlnx (8.13.8/8.13.8) with ESMTP id t9Q78RJG008130;\n\tMon, 26 Oct 2015 09:08:27 +0200", "from r-aa-dragon14.mtr.labs.mlnx (localhost [127.0.0.1])\n\tby r-aa-dragon14.mtr.labs.mlnx (8.14.4/8.14.4/Debian-4.1ubuntu1) with\n\tESMTP id t9Q78aql011030; Mon, 26 Oct 2015 09:08:36 +0200", "(from yaacovh@localhost)\n\tby r-aa-dragon14.mtr.labs.mlnx (8.14.4/8.14.4/Submit) id\n\tt9Q78YNf011029; Mon, 26 Oct 2015 09:08:34 +0200" ], "From": "Yaacov Hazan <yaacovh@mellanox.com>", "To": "dev@dpdk.org", "Date": "Mon, 26 Oct 2015 09:07:57 +0200", "Message-Id": "<1445843277-10934-1-git-send-email-yaacovh@mellanox.com>", "X-Mailer": "git-send-email 1.9.1", "In-Reply-To": "<1445518516-15630-1-git-send-email-yaacovh@mellanox.com>", "References": "<1445518516-15630-1-git-send-email-yaacovh@mellanox.com>", "Cc": "Yaacov Hazan <yaacovh@mellanox.com>,\n\tRaslsn Darawsheh <rdarawsheh@asaltech.com>", "Subject": "[dpdk-dev] [PATCH v2] net:bonding: fix free_queues function when no\n\tqueues exist", "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": "From: Raslsn Darawsheh <rdarawsheh@asaltech.com>\n\nIn case of creating bond device without add any slaves and\nquit from testpmd, application crashed since rx/tx queues\nare NULL.\n\nadd checking of this paramters before trying to free.\n\nSigned-off-by: Raslsn Darawsheh <rdarawsheh@asaltech.com>\nSigned-off-by: Yaacov Hazan <yaacovh@mellanox.com>\n---\nin previous patch there was mismatch in the solution.\nthis patch is the correct fix for the described bug\n\n drivers/net/bonding/rte_eth_bond_pmd.c | 20 ++++++++++++--------\n 1 file changed, 12 insertions(+), 8 deletions(-)", "diff": "diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c\nindex 5cc6372..383fdcf 100644\n--- a/drivers/net/bonding/rte_eth_bond_pmd.c\n+++ b/drivers/net/bonding/rte_eth_bond_pmd.c\n@@ -1517,17 +1517,21 @@ bond_ethdev_free_queues(struct rte_eth_dev *dev)\n {\n \tuint8_t i;\n \n-\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n-\t\trte_free(dev->data->rx_queues[i]);\n-\t\tdev->data->rx_queues[i] = NULL;\n+\tif (dev->data->rx_queues != NULL) {\n+\t\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n+\t\t\trte_free(dev->data->rx_queues[i]);\n+\t\t\tdev->data->rx_queues[i] = NULL;\n+\t\t}\n+\t\tdev->data->nb_rx_queues = 0;\n \t}\n-\tdev->data->nb_rx_queues = 0;\n \n-\tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n-\t\trte_free(dev->data->tx_queues[i]);\n-\t\tdev->data->tx_queues[i] = NULL;\n+\tif (dev->data->tx_queues != NULL) {\n+\t\tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n+\t\t\trte_free(dev->data->tx_queues[i]);\n+\t\t\tdev->data->tx_queues[i] = NULL;\n+\t\t}\n+\t\tdev->data->nb_tx_queues = 0;\n \t}\n-\tdev->data->nb_tx_queues = 0;\n }\n \n void\n", "prefixes": [ "dpdk-dev", "v2" ] }{ "id": 8015, "url": "