> -Original Message-
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Huawei Xie
> Sent: Tuesday, June 30, 2015 5:21 PM
> To: dev at dpdk.org
> Subject: [dpdk-dev] [PATCH v4 4/4] vhost: add comment for potential
> unwanted callback on listenfds
>
> add comment for potential unwanted callback on listenfds
>
> v4 changes:
> add comment for potential unwanted callback on listenfds
>
> Signed-off-by: Huawei Xie
Acked-by: Changchun Ouyang
> ---
> lib/librte_vhost/vhost_user/fd_man.c | 7 +++
> 1 file changed, 7 insertions(+)
>
> diff --git a/lib/librte_vhost/vhost_user/fd_man.c
> b/lib/librte_vhost/vhost_user/fd_man.c
> index bd30f8d..d68b270 100644
> --- a/lib/librte_vhost/vhost_user/fd_man.c
> +++ b/lib/librte_vhost/vhost_user/fd_man.c
> @@ -242,6 +242,13 @@ fdset_event_dispatch(struct fdset *pfdset)
>
> pthread_mutex_unlock(>fd_mutex);
>
> + /*
> + * When select is blocked, other threads might unregister
> + * listenfds from and register new listenfds into fdset.
> + * When select returns, the entries for listenfds in the fdset
> + * might have been updated. It is ok if there is unwanted call
> + * for new listenfds.
> + */
> ret = select(maxfds + 1, , , NULL, );
> if (ret <= 0)
> continue;
> --
> 1.8.1.4