[dpdk-dev] [PATCH RFC v2 03/12] lib/librte_vhost: move event_copy logic from virtio-net.c to vhost-net-cdev.c

Xie, Huawei huawei.xie at intel.com
Wed Jan 7 10:10:21 CET 2015


> +			file = *(const struct vhost_vring_file *)in_buf;
> +			LOG_DEBUG(VHOST_CONFIG,
> +				"idx:%d fd:%d\n", file.index, file.fd);
> +			fd = eventfd_copy(file.fd, ctx.pid);
> +			if (fd < 0) {
> +				fuse_reply_ioctl(req, -1, NULL, 0);
> +				result = -1;
> +				break;
> +			}
> +			file.fd = fd;
> +			if (cmd == 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;
> 



More information about the dev mailing list