From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f181.google.com (mail-qk0-f181.google.com [209.85.220.181]) by dpdk.org (Postfix) with ESMTP id 68F09137D for ; Mon, 11 Apr 2016 11:35:18 +0200 (CEST) Received: by mail-qk0-f181.google.com with SMTP id k135so63991270qke.0 for ; Mon, 11 Apr 2016 02:35:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dOVyCaPVF07xBH9jg4VmYubdRBpUmWt9HLEOy3e5LNM=; b=IySEM84m0vj8/iwyPDrxANgXE0+vRdR8/778Kyl7p0wpM+E8c8d05UWuBfpT3H6Kb8 RwCVHlsej2OBMz77ODSpR4enlkA49wA45MdVKEdNM9OLyWt3wQJL14ik4trUAH2tTAoF 181YH965RFD9VtZHVvlcE6kIjaC3q9rF8+8dNh3Dzj4UVbZiYOr2htuXvtT2ORFRxSVe E7fXjrE+U59ysWc8MLFCggJOh+tUI9VnSogmx+uNFTX3J8v8N6tHrmgm8ifzxwCcmihX nzV2GVTeXktV2GvHDvXOxs7RT0FBduy/asYKbZ4wbdxRNdyGFr0WItl8ikOV0T+xF78Z yh6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dOVyCaPVF07xBH9jg4VmYubdRBpUmWt9HLEOy3e5LNM=; b=UmSiQoQ6K3hfLoX29InNKqV3e/BbeJ24AxEavORHHoNddjh3d0Y1LmMx56MKfWhNdJ eQeDOzGMb4a/5m5QR1ax1PZ3j21o/Qqb9X2Qkrt6n+5eELvC9Apt6wd3X6h6Z0BUI0kC P90L+vRC94ItPXzBqxyXKhbQuvBnHacYggmRsltoQv7vHpOWXdXP2Qsyh8ZWHWS20emW qAaqjhDtn+7gQsnk7splvs94KkkmKuPDezLEnqPjYirE9s4IqTTsNQqP2IhSY2SFApyW l8eni+sky6NI3pMuQ/DCQnfj1aTy2tWVItCZ/fXh/r8OdG6smx5rKGa5YniJDnWyD2f7 PoLw== X-Gm-Message-State: AD7BkJKUSIQ0Sya4PpJ95s667rftMog/oty1sRZ5uiBhW8E5xFUNeUafitxNX5frM52g3Kh/NrxOlPiaQ0Rsx+VY X-Received: by 10.55.78.70 with SMTP id c67mr26846431qkb.37.1460367317807; Mon, 11 Apr 2016 02:35:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.6.144 with HTTP; Mon, 11 Apr 2016 02:34:58 -0700 (PDT) In-Reply-To: <570B3ECE.3050905@ericsson.com> References: <1458292380-9258-1-git-send-email-patrik.r.andersson@ericsson.com> <570379F9.6020306@ericsson.com> <570B3ECE.3050905@ericsson.com> From: Christian Ehrhardt Date: Mon, 11 Apr 2016 11:34:58 +0200 Message-ID: To: Patrik Andersson R Cc: "Xie, Huawei" , Daniele Di Proietto , "dev@dpdk.org" , Thomas Monjalon , "Ananyev, Konstantin" , Yuanhan Liu Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [RFC] vhost user: add error handling for fd > 1023 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2016 09:35:18 -0000 I like the approach as well to go for the fix for robustness first. I was accidentally able to find another testcase to hit the same root cause. Adding guests with 15 vhost_user based NICs each while having rxq for openvswitch-dpdk set to 4 and multiqueue for the guest devices at 4 already breaks when adding the thirds such guests. That is way earlier than I would have expected the fd's to be exhausted but still the same root cause, so just another test for the same. In prep to the wider check to the patch a minor review question from me: On the section of rte_vhost_driver_register that now detects if there were issues we might want to close the socketfd as well when bailing out. Otherwise we would just have another source of fd leaks or would that be reused later on even now that we have freed vserver-path and vserver itself? ret = fdset_add(&g_vhost_server.fdset, vserver->listenfd, vserver_new_vq_conn, NULL, vserver); if (ret < 0) { pthread_mutex_unlock(&g_vhost_server.server_mutex); RTE_LOG(ERR, VHOST_CONFIG, "failed to add listen fd %d to vhost server fdset\n", vserver->listenfd); free(vserver->path); + close(vserver->listenfd); free(vserver); return -1; } Christian Ehrhardt Software Engineer, Ubuntu Server Canonical Ltd On Mon, Apr 11, 2016 at 8:06 AM, Patrik Andersson R < patrik.r.andersson@ericsson.com> wrote: > I fully agree with this course of action. > > Thank you, > > Patrik > > > > On 04/08/2016 08:47 AM, Xie, Huawei wrote: > >> On 4/7/2016 10:52 PM, Christian Ehrhardt wrote: >> >>> I totally agree to that there is no deterministic rule what to expect. >>> The only rule is that #fd certainly always is > #vhost_user devices. >>> In various setup variants I've crossed fd 1024 anywhere between 475 >>> and 970 vhost_user ports. >>> >>> Once the discussion continues and we have an updates version of the >>> patch with some more agreement I hope I can help to test it. >>> >> Thanks. Let us first temporarily fix this problem for robustness, then >> we consider whether upgrade to (e)poll. >> Will check the patch in detail later. Basically it should work but need >> check whether we need extra fixes elsewhere. >> > >