Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/23676/?format=api
https://patches.dpdk.org/api/patches/23676/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/d5d513242ca2ffbd0acdf9d6d64f2bd878fc42b7.1492503445.git.pascal.mazon@6wind.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": "<d5d513242ca2ffbd0acdf9d6d64f2bd878fc42b7.1492503445.git.pascal.mazon@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/d5d513242ca2ffbd0acdf9d6d64f2bd878fc42b7.1492503445.git.pascal.mazon@6wind.com", "date": "2017-04-18T08:17:55", "name": "[dpdk-dev,v2,3/5] net/tap: drop unnecessary nested block", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "2f5a34034ec7c9beb4baf8ce330405aa97106d37", "submitter": { "id": 657, "url": "https://patches.dpdk.org/api/people/657/?format=api", "name": "Pascal Mazon", "email": "pascal.mazon@6wind.com" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/d5d513242ca2ffbd0acdf9d6d64f2bd878fc42b7.1492503445.git.pascal.mazon@6wind.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/23676/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/23676/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 EBF4737B0;\n\tTue, 18 Apr 2017 10:18:26 +0200 (CEST)", "from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com\n\t[62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 496D82C6E\n\tfor <dev@dpdk.org>; Tue, 18 Apr 2017 10:18:22 +0200 (CEST)", "from 6wind.com (unknown [10.16.0.184])\n\tby proxy.6wind.com (Postfix) with SMTP id DBBCB29B68;\n\tTue, 18 Apr 2017 10:18:15 +0200 (CEST)", "by 6wind.com (sSMTP sendmail emulation);\n\tTue, 18 Apr 2017 10:18:15 +0200" ], "From": "Pascal Mazon <pascal.mazon@6wind.com>", "To": "dev@dpdk.org", "Cc": "pascal.mazon@6wind.com", "Date": "Tue, 18 Apr 2017 10:17:55 +0200", "Message-Id": "<d5d513242ca2ffbd0acdf9d6d64f2bd878fc42b7.1492503445.git.pascal.mazon@6wind.com>", "X-Mailer": "git-send-email 2.12.0.306.g4a9b9b3", "In-Reply-To": "<cover.1492503445.git.pascal.mazon@6wind.com>", "References": "<cover.1492162225.git.pascal.mazon@6wind.com>\n\t<cover.1492503445.git.pascal.mazon@6wind.com>", "Subject": "[dpdk-dev] [PATCH v2 3/5] net/tap: drop unnecessary nested block", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <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": "This is cosmetic; the code is functionally equivalent.\n\nSigned-off-by: Pascal Mazon <pascal.mazon@6wind.com>\n---\n drivers/net/tap/rte_eth_tap.c | 34 +++++++++++++++-------------------\n 1 file changed, 15 insertions(+), 19 deletions(-)", "diff": "diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c\nindex c9d107c25ac2..403aca9f7307 100644\n--- a/drivers/net/tap/rte_eth_tap.c\n+++ b/drivers/net/tap/rte_eth_tap.c\n@@ -824,30 +824,26 @@ tap_setup_queue(struct rte_eth_dev *dev,\n \tstruct pmd_internals *pmd = dev->data->dev_private;\n \tstruct rx_queue *rx = &internals->rxq[qid];\n \tstruct tx_queue *tx = &internals->txq[qid];\n-\tint fd;\n+\tint fd = rx->fd == -1 ? tx->fd : rx->fd;\n \n-\tfd = rx->fd;\n-\tif (fd < 0) {\n-\t\tfd = tx->fd;\n+\tif (fd == -1) {\n+\t\tRTE_LOG(INFO, PMD, \"Add queue to TAP %s for qid %d\\n\",\n+\t\t\tpmd->name, qid);\n+\t\tfd = tun_alloc(pmd, qid);\n \t\tif (fd < 0) {\n-\t\t\tRTE_LOG(INFO, PMD, \"Add queue to TAP %s for qid %d\\n\",\n+\t\t\tRTE_LOG(ERR, PMD, \"tun_alloc(%s, %d) failed\\n\",\n \t\t\t\tpmd->name, qid);\n-\t\t\tfd = tun_alloc(pmd, qid);\n-\t\t\tif (fd < 0) {\n-\t\t\t\tRTE_LOG(ERR, PMD, \"tun_alloc(%s, %d) failed\\n\",\n-\t\t\t\t\tpmd->name, qid);\n+\t\t\treturn -1;\n+\t\t}\n+\t\tif (qid == 0) {\n+\t\t\tstruct ifreq ifr;\n+\n+\t\t\tifr.ifr_mtu = dev->data->mtu;\n+\t\t\tif (tap_ioctl(pmd, SIOCSIFMTU, &ifr, 1,\n+\t\t\t\t LOCAL_AND_REMOTE) < 0) {\n+\t\t\t\tclose(fd);\n \t\t\t\treturn -1;\n \t\t\t}\n-\t\t\tif (qid == 0) {\n-\t\t\t\tstruct ifreq ifr;\n-\n-\t\t\t\tifr.ifr_mtu = dev->data->mtu;\n-\t\t\t\tif (tap_ioctl(pmd, SIOCSIFMTU, &ifr, 1,\n-\t\t\t\t\t LOCAL_AND_REMOTE) < 0) {\n-\t\t\t\t\tclose(fd);\n-\t\t\t\t\treturn -1;\n-\t\t\t\t}\n-\t\t\t}\n \t\t}\n \t}\n \n", "prefixes": [ "dpdk-dev", "v2", "3/5" ] }{ "id": 23676, "url": "