[dpdk-dev] [PATCH] vhost: allow for many vhost user ports
Yuanhan Liu
yuanhan.liu at linux.intel.com
Wed Dec 7 08:43:04 CET 2016
On Tue, Dec 06, 2016 at 11:42:36AM +0000, Jan Wickbom wrote:
> > > @@ -189,7 +206,7 @@
> > > pfdset->fd[i].fd = -1;
> > > pfdset->fd[i].rcb = pfdset-
> > >fd[i].wcb = NULL;
> > > pfdset->fd[i].dat = NULL;
> > > - pfdset->num--;
> > > + (void) fdset_adjust_num(pfdset);
> >
> > Unncessary cast.
>
> I'd like to keep the cast. The function returns int and it's nice to show we deliberately
> don't care.
I know your point, but it's not needed.
> No strong opinion though, but we should do the same everywhere. Please
> see below.
>
> >
> > > i = -1;
> > > }
> > > pthread_mutex_unlock(&pfdset->fd_mutex);
> > > @@ -211,12 +228,12 @@
> > >
> > > pfdset->fd[index].fd = -1;
> > > pfdset->fd[index].rcb = pfdset->fd[index].wcb = NULL;
> > > - pfdset->fd[index].dat = NULL;
> > > - pfdset->num--;
> > > + (void) fdset_adjust_num(pfdset);
>
> If we remove the cast above, we should remove this one as well.
Yes.
--yliu
More information about the dev
mailing list