Re: [dpdk-dev] [PATCH v4] vhost: allow for many vhost user ports

2016-12-13 Thread Yuanhan Liu
On Tue, Dec 13, 2016 at 02:19:47PM +0100, Jan Wickbom wrote: > + > + poll(pfdset->rwfds, numfds, 1000 /* millisecs */); > + > + for (i = 0; i < numfds; ) { > pthread_mutex_lock(&pfdset->fd_mutex); > + > pfdentry = &pfdset->fd[i]; >

[dpdk-dev] [PATCH v4] vhost: allow for many vhost user ports

2016-12-13 Thread Jan Wickbom
Currently select() is used to monitor file descriptors for vhostuser ports. This limits the number of ports possible to create since the fd number is used as index in the fd_set and we have seen fds > 1023. This patch changes select() to poll(). This way we can keep an packed (pollfd) array for the