[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] tap: properly initialize vhostfds
From: |
Michal Privoznik |
Subject: |
Re: [Qemu-devel] [PATCH] tap: properly initialize vhostfds |
Date: |
Fri, 19 Apr 2013 13:24:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130411 Thunderbird/17.0.5 |
On 19.04.2013 09:11, Jason Wang wrote:
> Only tap->vhostfd were checked net_init_tap_one(), but tap->vhostfds were
> forgot, this will lead qemu to ignore all fds passed by management through
> vhostfds, and tries to create vhost_net device itself. Fix by adding this
> check
> also.
>
> Reportyed-by: Michal Privoznik <address@hidden>
Typo
> Cc: Michal Privoznik <address@hidden>
> Cc: address@hidden
> Signed-off-by: Jason Wang <address@hidden>
> ---
> net/tap.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/tap.c b/net/tap.c
> index 17bdf01..e0b7a2a 100644
> --- a/net/tap.c
> +++ b/net/tap.c
> @@ -623,7 +623,7 @@ static int net_init_tap_one(const NetdevTapOptions *tap,
> NetClientState *peer,
> vhostfdname || (tap->has_vhostforce && tap->vhostforce)) {
> int vhostfd;
>
> - if (tap->has_vhostfd) {
> + if (tap->has_vhostfd || tap->has_vhostfds) {
> vhostfd = monitor_handle_fd_param(cur_mon, vhostfdname);
> if (vhostfd == -1) {
> return -1;
>
Yup. I can confirm this fixes the problem for me.
Reviewed-by: Michal Privoznik <address@hidden>
Michal