From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id BCA415945 for ; Wed, 7 Jan 2015 10:10:34 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 07 Jan 2015 01:10:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="437441028" Received: from pgsmsx101.gar.corp.intel.com ([10.221.44.78]) by FMSMGA003.fm.intel.com with ESMTP; 07 Jan 2015 00:58:05 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by PGSMSX101.gar.corp.intel.com (10.221.44.78) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 7 Jan 2015 17:10:23 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.182]) with mapi id 14.03.0195.001; Wed, 7 Jan 2015 17:10:22 +0800 From: "Xie, Huawei" To: "dev@dpdk.org" Thread-Topic: [PATCH RFC v2 03/12] lib/librte_vhost: move event_copy logic from virtio-net.c to vhost-net-cdev.c Thread-Index: AQHQFMGgWBnQAHr3n0asl9GvidbU4Zy0iKaw Date: Wed, 7 Jan 2015 09:10:21 +0000 Message-ID: References: <1418247477-13920-1-git-send-email-huawei.xie@intel.com> <1418247477-13920-4-git-send-email-huawei.xie@intel.com> In-Reply-To: <1418247477-13920-4-git-send-email-huawei.xie@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH RFC v2 03/12] lib/librte_vhost: move event_copy logic from virtio-net.c to vhost-net-cdev.c X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2015 09:10:35 -0000 > + file =3D *(const struct vhost_vring_file *)in_buf; > + LOG_DEBUG(VHOST_CONFIG, > + "idx:%d fd:%d\n", file.index, file.fd); > + fd =3D eventfd_copy(file.fd, ctx.pid); > + if (fd < 0) { > + fuse_reply_ioctl(req, -1, NULL, 0); > + result =3D -1; > + break; > + } > + file.fd =3D fd; > + if (cmd =3D=3D VHOST_SET_VRING_KICK) > + VHOST_IOCTL_R(struct vhost_vring_file, file, > ops->set_vring_kick); > + else > + VHOST_IOCTL_R(struct vhost_vring_file, file, > ops->set_vring_call); File doesn't get the new fd, but is again assigned with the value in in_buf= in VHOST_IOCTL_R. Fix the bug in the next version of patch. > + } > break; >=20