From: Tetsuya Mukawa <mukawa@igel.co.jp>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH] BugFix: VFIO never works
Date: Sat, 11 Jul 2015 15:32:02 +0900 [thread overview]
Message-ID: <55A0B862.5070905@igel.co.jp> (raw)
In-Reply-To: <26119720.PorKJiMAo6@xps13>
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 <mukawa@igel.co.jp> 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 <michael.qiu@intel.com>
> [...]
>>>>> --- 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
next prev parent reply other threads:[~2015-07-11 6:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 7:47 [PATCH] BugFix: VFIO never works Michael Qiu
2015-07-10 8:34 ` Tetsuya Mukawa
2015-07-10 11:25 ` David Marchand
2015-07-10 11:35 ` Tetsuya Mukawa
2015-07-10 11:38 ` Bruce Richardson
2015-07-10 12:12 ` Tetsuya Mukawa
2015-07-10 12:16 ` Thomas Monjalon
2015-07-11 6:32 ` Tetsuya Mukawa [this message]
2015-07-11 6:29 ` [PATCH] eal: fix vfio device " Tetsuya Mukawa
2015-07-14 5:03 ` Qiu, Michael
2015-07-14 7:43 ` Tetsuya Mukawa
2015-07-14 8:44 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55A0B862.5070905@igel.co.jp \
--to=mukawa@igel.co.jp \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.