[dpdk-dev] [PATCH v3 0/6] use IOVAs check based on DMA mask
Yao, Lei A
lei.a.yao at intel.com
Mon Oct 29 14:18:06 CET 2018
From: Alejandro Lucero [mailto:alejandro.lucero at netronome.com]
Sent: Monday, October 29, 2018 8:56 PM
To: Thomas Monjalon <thomas at monjalon.net>
Cc: Yao, Lei A <lei.a.yao at intel.com>; dev <dev at dpdk.org>; Xu, Qian Q <qian.q.xu at intel.com>; Lin, Xueqin <xueqin.lin at intel.com>; Burakov, Anatoly <anatoly.burakov at intel.com>; Yigit, Ferruh <ferruh.yigit at intel.com>
Subject: Re: [dpdk-dev] [PATCH v3 0/6] use IOVAs check based on DMA mask
On Mon, Oct 29, 2018 at 11:46 AM Thomas Monjalon <thomas at monjalon.net<mailto:thomas at monjalon.net>> wrote:
29/10/2018 12:39, Alejandro Lucero:
> I got a patch that solves a bug when calling rte_eal_dma_mask using the
> mask instead of the maskbits. However, this does not solves the deadlock.
The deadlock is a bigger concern I think.
I think once the call to rte_eal_check_dma_mask uses the maskbits instead of the mask, calling rte_memseg_walk_thread_unsafe avoids the deadlock.
Yao, can you try with the attached patch?
This patch can fix the issue at my side. Thanks a lot
for you quick action.
> Interestingly, the problem looks like a compiler one. Calling
> rte_memseg_walk does not return when calling inside rt_eal_dma_mask, but if
> you modify the call like this:
> - if (rte_memseg_walk(check_iova, &mask))
> + if (!rte_memseg_walk(check_iova, &mask))
> it works, although the value returned to the invoker changes, of course.
> But the point here is it should be the same behaviour when calling
> rte_memseg_walk than before and it is not.
Anyway, the coding style requires to save the return value in a variable,
instead of nesting the call in an "if" condition.
And the "if" check should be explicitly != 0 because it is not a real boolean.
PS: please do not top post and avoid HTML emails, thanks
More information about the dev