From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) by dpdk.org (Postfix) with ESMTP id C50F8374C for ; Sat, 11 Jul 2015 08:32:06 +0200 (CEST) Received: by pdbep18 with SMTP id ep18so195684311pdb.1 for ; Fri, 10 Jul 2015 23:32:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=haauIEBh/ygxeIgyzw050EtLP0z5J5Q6WblFHlOgJl4=; b=LiBvQ54/wipjR4iedR6LZREOloVPxxxQiqIaM7UGzpfw3kiTkXp3SWSNEYghJzqGjm eNxrpup4SEuoyYtxuyoJZF4d3RaHOY4/aJya4i6jYbnfoAajcwQGda1OTSHal32uLec5 P+hRZN1jMvIIu6iwi9i8blmIJGjM86yTpYS+auZayVoLUd55s74YEZDdw5RGocq9jZiL 7G9pJ0rAUKOZgn0rzu+MMkGwlbro9dlT1Lzt72L6onf3Xas7U7mZNYAptejUOFdiDbUI tznC1i5Sf3yi2qu9gpcZCxPv0IMLp0xoCVpRQu+EfvSzOmAATWU/wDarqKu2u2aqpO1f 15dQ== X-Gm-Message-State: ALoCoQmbwvZ0rl0SQ+rqwzUD+isea96TMU//dd3Efnph7xHfbE1NvlrfjmCVC4kVv3GzfsHrBzw2 X-Received: by 10.68.240.40 with SMTP id vx8mr49152928pbc.14.1436596326194; Fri, 10 Jul 2015 23:32:06 -0700 (PDT) Received: from [10.16.129.101] (napt.igel.co.jp. [219.106.231.132]) by smtp.googlemail.com with ESMTPSA id uz9sm11677794pac.34.2015.07.10.23.32.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jul 2015 23:32:05 -0700 (PDT) Message-ID: <55A0B862.5070905@igel.co.jp> Date: Sat, 11 Jul 2015 15:32:02 +0900 From: Tetsuya Mukawa User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Thomas Monjalon References: <1436514439-4893-1-git-send-email-michael.qiu@intel.com> <20150710113826.GA10608@bricha3-MOBL3> <26119720.PorKJiMAo6@xps13> In-Reply-To: <26119720.PorKJiMAo6@xps13> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] BugFix: VFIO never works 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: Sat, 11 Jul 2015 06:32:07 -0000 On 2015/07/10 21:16, Thomas Monjalon wrote: > 2015-07-10 12:38, Bruce Richardson: >> On Fri, Jul 10, 2015 at 01:25:49PM +0200, David Marchand wrote: >>> On Fri, Jul 10, 2015 at 10:34 AM, Tetsuya Mukawa wrote: >>>> On 2015/07/10 16:47, Michael Qiu wrote: >>>>> Commit 35b3313e322b ("pci: merge mapping functions for linux and bsd") >>>>> >>>>> introduced a bug that all vfio will be >>>>> blocked. >>>>> >>>>> Root cause is that VFIO_PRESENT is unaccessable in eal >>>>> common level. >>>>> >>>>> This patch is to fix this. >>>>> >>>>> Signed-off-by: Michael Qiu > [...] >>>>> --- a/lib/librte_eal/common/eal_common_pci.c >>>>> +++ b/lib/librte_eal/common/eal_common_pci.c >>>>> @@ -146,10 +146,8 @@ pci_map_device(struct rte_pci_device *dev) >>>>> /* try mapping the NIC resources using VFIO if it exists */ >>>>> switch (dev->kdrv) { >>>>> case RTE_KDRV_VFIO: >>>>> -#ifdef VFIO_PRESENT >>>>> if (pci_vfio_is_enabled()) >>>>> ret = pci_vfio_map_resource(dev); >>>>> -#endif >>> This is a common file, vfio is not available on BSD. >>> I missed that during review. >>> >>> Did you test build on BSD ? >>> >> Just tried it. BSD build fails with this patch applied. >> >> Rather than using ifdefs, we could also look at providing dummy functions for >> vfio in BSD. They would never be called by this code as drivers in BSD should >> never have dev->kdrv == RTE_KDRV_VFIO. > Why not implementing different versions of pci_map_device() and pci_unmap_device() > in linuxapp and bsdapp EAL? They are only wrappers so no code would be duplicated. Thanks for comment. Right, it should be. I fixed like above. Tetsuya