From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 5ADDF36E; Thu, 23 Feb 2017 05:35:05 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP; 22 Feb 2017 20:35:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,197,1484035200"; d="scan'208";a="61342011" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga004.jf.intel.com with ESMTP; 22 Feb 2017 20:35:02 -0800 Date: Thu, 23 Feb 2017 12:37:15 +0800 From: Yuanhan Liu To: Matthias Gatto Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20170223043715.GT18844@yliu-dev.sh.intel.com> References: <20170221142530.31472-1-matthias.gatto@outscale.com> <20170222015931.GK18844@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH] vhost: try to shrink pfdset when fdset_add fails X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Feb 2017 04:35:06 -0000 On Wed, Feb 22, 2017 at 11:01:43AM +0100, Matthias Gatto wrote: > On Wed, Feb 22, 2017 at 2:59 AM, Yuanhan Liu > wrote: > > > > On Tue, Feb 21, 2017 at 03:25:30PM +0100, Matthias Gatto wrote: > > > fdset_add increment pfdset->num, but fdset_del doesn't decrement pfdset->num, > > > so if we call fdset_add then fdset_del in a loop witout calling > > > fdset_shrink, we can easily exceed MAX_FDS with only a few number of fds > > > used. > > > > I'm assuming you were doing some tests like following? > > > > while true; do > > ovs-vsctl add-port br vhost_n -- ... > > ovs-vsctl del-port vhost_n > > done > > > > Something pretty close to this yes. Fixes: 59317cef249c ("vhost: allow many vhost-user ports") Cc: stable@dpdk.org And applied to dpdk-next-virtio, with few typos in commit log fixed. Thanks! --yliu