Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/3913/?format=api
http://patches.dpdk.org/api/patches/3913/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1425639943-27157-1-git-send-email-huawei.xie@intel.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": "<1425639943-27157-1-git-send-email-huawei.xie@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1425639943-27157-1-git-send-email-huawei.xie@intel.com", "date": "2015-03-06T11:05:43", "name": "[dpdk-dev] test whether file descriptor is valid before close it", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "50aea7e8cad845cacd33b474df9528af4a90ca50", "submitter": { "id": 16, "url": "http://patches.dpdk.org/api/people/16/?format=api", "name": "Huawei Xie", "email": "huawei.xie@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1425639943-27157-1-git-send-email-huawei.xie@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/3913/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/3913/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 B20355921;\n\tFri, 6 Mar 2015 12:05:56 +0100 (CET)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 4E3F85677\n\tfor <dev@dpdk.org>; Fri, 6 Mar 2015 12:05:55 +0100 (CET)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga101.fm.intel.com with ESMTP; 06 Mar 2015 03:05:54 -0800", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga002.jf.intel.com with ESMTP; 06 Mar 2015 03:05:53 -0800", "from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com\n\t[10.239.29.90])\n\tby shvmail01.sh.intel.com with ESMTP id t26B5ppd007637;\n\tFri, 6 Mar 2015 19:05:51 +0800", "from shecgisg003.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t26B5m27027191; Fri, 6 Mar 2015 19:05:50 +0800", "(from hxie5@localhost)\n\tby shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t26B5mPj027187; \n\tFri, 6 Mar 2015 19:05:48 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.11,352,1422950400\"; d=\"scan'208\";a=\"694850820\"", "From": "Huawei Xie <huawei.xie@intel.com>", "To": "dev@dpdk.org", "Date": "Fri, 6 Mar 2015 19:05:43 +0800", "Message-Id": "<1425639943-27157-1-git-send-email-huawei.xie@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1425638358-26523-1-git-send-email-huawei.xie@intel.com>", "References": "<1425638358-26523-1-git-send-email-huawei.xie@intel.com>", "Subject": "[dpdk-dev] [PATCH] test whether file descriptor is valid before\n\tclose it", "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": "This avoids closing -1 in our case.\n\nSigned-off-by: Huawei Xie <huawei.xie@intel.com>\n---\n lib/librte_vhost/virtio-net.c | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)", "diff": "diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c\nindex 6917fcf..4672e67 100644\n--- a/lib/librte_vhost/virtio-net.c\n+++ b/lib/librte_vhost/virtio-net.c\n@@ -185,13 +185,13 @@ cleanup_device(struct virtio_net *dev)\n \t}\n \n \t/* Close any event notifiers opened by device. */\n-\tif (dev->virtqueue[VIRTIO_RXQ]->callfd)\n+\tif ((int)dev->virtqueue[VIRTIO_RXQ]->callfd >= 0)\n \t\tclose((int)dev->virtqueue[VIRTIO_RXQ]->callfd);\n-\tif (dev->virtqueue[VIRTIO_RXQ]->kickfd)\n+\tif ((int)dev->virtqueue[VIRTIO_RXQ]->kickfd >= 0)\n \t\tclose((int)dev->virtqueue[VIRTIO_RXQ]->kickfd);\n-\tif (dev->virtqueue[VIRTIO_TXQ]->callfd)\n+\tif ((int)dev->virtqueue[VIRTIO_TXQ]->callfd >= 0)\n \t\tclose((int)dev->virtqueue[VIRTIO_TXQ]->callfd);\n-\tif (dev->virtqueue[VIRTIO_TXQ]->kickfd)\n+\tif ((int)dev->virtqueue[VIRTIO_TXQ]->kickfd >= 0)\n \t\tclose((int)dev->virtqueue[VIRTIO_TXQ]->kickfd);\n }\n \n", "prefixes": [ "dpdk-dev" ] }{ "id": 3913, "url": "