From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by dpdk.org (Postfix) with ESMTP id 36E0012A8 for ; Tue, 5 May 2015 20:38:39 +0200 (CEST) Received: by pacwv17 with SMTP id wv17so202040266pac.0 for ; Tue, 05 May 2015 11:38:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=rv08+bBjumbHAvYoOYASqlcflNBcEZ+zc9tugrFJwIY=; b=VWC1Ewk0k8WDI+NYQz3uJlu67GHEqnvZ7Zj0+094c+vysG3lFGXsMGRZYIw2y4baAz YIcuu4mQIQ2J2lLgCDoIXul79oX1cHB/NwETBWiiULOzBjk5YA1SATPJvKbmgjLg/z5f zdxHsLc2xFwswvf0OG/KUIdL/Fh8h7nkNQYbFbWS/1hcT0poFF4IjSyugKJCUI6b477Q CEZDvWAgGHto/s/x4iy7eWwVAxaBCgsl6Re8KyVmoWEXLD7F8m/YujQn0y9hxuXiNkm2 1ck+him0R7CuCwmZhrJ9+ocLPnrNz3acZG4GlkxF+z2ib4mdvzCN4mzgJiG6/RZg7SWv zhiQ== X-Gm-Message-State: ALoCoQmtruzdgA4ykhp3GgKOrTeYpA99KSyCW+C8/6UaAJVkGh2mjUA1MN6ZMC/+g/N/kyZCPApE X-Received: by 10.70.130.43 with SMTP id ob11mr54589416pdb.35.1430851118352; Tue, 05 May 2015 11:38:38 -0700 (PDT) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id zv8sm16532901pbc.45.2015.05.05.11.38.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 May 2015 11:38:38 -0700 (PDT) Date: Tue, 5 May 2015 11:38:42 -0700 From: Stephen Hemminger To: Cunming Liang Message-ID: <20150505113842.586ec802@urahara> In-Reply-To: <1430804386-28949-7-git-send-email-cunming.liang@intel.com> References: <1425012976-10173-1-git-send-email-cunming.liang@intel.com> <1430804386-28949-1-git-send-email-cunming.liang@intel.com> <1430804386-28949-7-git-send-email-cunming.liang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v7 06/10] eal/linux: add interrupt vectors handling on VFIO 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: Tue, 05 May 2015 18:38:39 -0000 On Tue, 5 May 2015 13:39:42 +0800 Cunming Liang wrote: > diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > index aea1fb1..387f54c 100644 > --- a/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > +++ b/lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > @@ -308,6 +308,18 @@ pci_vfio_setup_interrupts(struct rte_pci_device *dev, int vfio_dev_fd) > case VFIO_PCI_MSIX_IRQ_INDEX: > internal_config.vfio_intr_mode = RTE_INTR_MODE_MSIX; > dev->intr_handle.type = RTE_INTR_HANDLE_VFIO_MSIX; > + for (i = 0; i < RTE_MAX_RXTX_INTR_VEC_ID; i++) { > + fd = eventfd(0, 0); > + if (fd < 0) { > + You should pass EFD_NONBLOCK and EFD_CLOEXEC as flags to any eventfd's created internally.