Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/75879/?format=api
http://patches.dpdk.org/api/patches/75879/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200824110130.16647-4-huwei013@chinasoftinc.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": "<20200824110130.16647-4-huwei013@chinasoftinc.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200824110130.16647-4-huwei013@chinasoftinc.com", "date": "2020-08-24T11:01:30", "name": "[v4,3/3] ethdev: check if queue setupped when getting queue info", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "73606d954346ae502b7f79d6264153621e724b52", "submitter": { "id": 1537, "url": "http://patches.dpdk.org/api/people/1537/?format=api", "name": "Wei Hu (Xavier)", "email": "huwei013@chinasoftinc.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200824110130.16647-4-huwei013@chinasoftinc.com/mbox/", "series": [ { "id": 11757, "url": "http://patches.dpdk.org/api/series/11757/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11757", "date": "2020-08-24T11:01:27", "name": "minor updates for getting queue info", "version": 4, "mbox": "http://patches.dpdk.org/series/11757/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/75879/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/75879/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id E3C64A04AC;\n\tMon, 24 Aug 2020 13:02:19 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0EE9D1C0B1;\n\tMon, 24 Aug 2020 13:02:00 +0200 (CEST)", "from mail.chinasoftinc.com (unknown [114.113.233.8])\n by dpdk.org (Postfix) with ESMTP id 20CB258C4\n for <dev@dpdk.org>; Mon, 24 Aug 2020 13:01:56 +0200 (CEST)", "from localhost.localdomain (120.133.139.157) by INCCAS002.ito.icss\n (10.168.0.60) with Microsoft SMTP Server id 14.3.487.0; Mon, 24 Aug 2020\n 19:01:50 +0800" ], "From": "\"Wei Hu (Xavier)\" <huwei013@chinasoftinc.com>", "To": "Thomas Monjalon <thomas@monjalon.net>, Ferruh Yigit\n <ferruh.yigit@intel.com>, Andrew Rybchenko <arybchenko@solarflare.com>", "CC": "<dev@dpdk.org>, <xavier.huwei@huawei.com>", "Date": "Mon, 24 Aug 2020 19:01:30 +0800", "Message-ID": "<20200824110130.16647-4-huwei013@chinasoftinc.com>", "X-Mailer": "git-send-email 2.27.0", "In-Reply-To": "<20200824110130.16647-1-huwei013@chinasoftinc.com>", "References": "<20200818025132.27912-1-huwei013@chinasoftinc.com>\n <20200824110130.16647-1-huwei013@chinasoftinc.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Originating-IP": "[120.133.139.157]", "Subject": "[dpdk-dev] [PATCH v4 3/3] ethdev: check if queue setupped when\n\tgetting queue info", "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: \"Wei Hu (Xavier)\" <xavier.huwei@huawei.com>\n\nThis patch adds checking whether the related Tx or Rx queue has been\nsetuped in the rte_eth_rx_queue_info_get and rte_eth_tx_queue_info_get\nAPI function to avoid illegal address access.\n\nSigned-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>\n---\n lib/librte_ethdev/rte_ethdev.c | 16 ++++++++++++++++\n 1 file changed, 16 insertions(+)", "diff": "diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 7858ad5f1..0503c7929 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -4670,6 +4670,14 @@ rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id,\n \t\treturn -EINVAL;\n \t}\n \n+\tif (dev->data->rx_queues[queue_id] == NULL) {\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t \"Rx queue %\"PRIu16\" of device with port_id=%\"\n+\t\t\t PRIu16\" has not been setuped\\n\",\n+\t\t\t queue_id, port_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n \tif (rte_eth_dev_is_rx_hairpin_queue(dev, queue_id)) {\n \t\tRTE_ETHDEV_LOG(INFO,\n \t\t\t\"Can't get hairpin Rx queue %\"PRIu16\" info of device with port_id=%\"PRIu16\"\\n\",\n@@ -4701,6 +4709,14 @@ rte_eth_tx_queue_info_get(uint16_t port_id, uint16_t queue_id,\n \t\treturn -EINVAL;\n \t}\n \n+\tif (dev->data->tx_queues[queue_id] == NULL) {\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t \"Tx queue %\"PRIu16\" of device with port_id=%\"\n+\t\t\t PRIu16\" has not been setuped\\n\",\n+\t\t\t queue_id, port_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n \tif (rte_eth_dev_is_tx_hairpin_queue(dev, queue_id)) {\n \t\tRTE_ETHDEV_LOG(INFO,\n \t\t\t\"Can't get hairpin Tx queue %\"PRIu16\" info of device with port_id=%\"PRIu16\"\\n\",\n", "prefixes": [ "v4", "3/3" ] }{ "id": 75879, "url": "