From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by dpdk.org (Postfix, from userid 33) id 0408310A3; Wed, 31 Oct 2018 11:18:27 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Date: Wed, 31 Oct 2018 10:18:27 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: core X-Bugzilla-Version: 18.11 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mattias.ronnblom@ericsson.com X-Bugzilla-Status: CONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 Subject: [dpdk-dev] [Bug 102] IOVA mode causes deadlock X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2018 10:18:27 -0000 https://bugs.dpdk.org/show_bug.cgi?id=3D102 Bug ID: 102 Summary: IOVA mode causes deadlock Product: DPDK Version: 18.11 Hardware: x86 OS: Linux Status: CONFIRMED Severity: normal Priority: Normal Component: core Assignee: dev@dpdk.org Reporter: mattias.ronnblom@ericsson.com Target Milestone: --- As of commit fe822eb8c5651d00ef5b8eeed6f8511e7a86560f (in RC1 now), all DPDK applications deadlocks at the time of initialization, if I have QAT SR-IOV = VFs bound to DPDK. VT-d and Intel IOMMU are being used. The VFs are on the host (not in a VM). In the first attempt to expand the heap, malloc_heap.c:try_expand_heap() ta= kes the hotplug write lock, and continues to call rte_eal_check_dma_mask() (in = case dma_maskbits !=3D 0, which with IOVA mode it is), which attempts to take the hotplug reader lock, and deadlocks. Beside the deadlock issue, I think there might be more issues with using IO= VA mode. malloc_heap.c:alloc_pages_on_heap(): if (mcfg->dma_maskbits) { mask =3D ~((1ULL << mcfg->dma_maskbits) - 1); printf("mask: %lu\n", mask); if (rte_eal_check_dma_mask(mask)) { RTE_LOG(ERR, EAL, "%s(): couldn't allocate memory due to DMA mask\n", __func__); goto fail; } } rte_eal_check_dma_mask() takes mask *bit count* (as a uint8_t), but this co= de seems to think it's expecting the full mask (uint64_t). I can't say I real= ly understand what's going on here, but shouldn't the allocated memory be chec= ked against the DMA mask? This code looks like it's checking the DMA mask again= st the DMA mask. If I back out fe822eb8c5651d00ef5b8eeed6f8511e7a86560f, I'm ending up with non-IOVA mode, and things starts to work again. --=20 You are receiving this mail because: You are the assignee for the bug.=