From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zeish-0005DQ-HL for qemu-devel@nongnu.org; Wed, 23 Sep 2015 08:10:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zeisd-0000cZ-E2 for qemu-devel@nongnu.org; Wed, 23 Sep 2015 08:10:39 -0400 Received: from lhrrgout.huawei.com ([194.213.3.17]:56303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zeisc-0000c3-8R for qemu-devel@nongnu.org; Wed, 23 Sep 2015 08:10:35 -0400 References: <1442333283-13119-1-git-send-email-marcandre.lureau@redhat.com> <1442333283-13119-18-git-send-email-marcandre.lureau@redhat.com> <5601647A.9060107@huawei.com> From: Claudio Fontana Message-ID: <560296B0.1080307@huawei.com> Date: Wed, 23 Sep 2015 14:10:24 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 17/46] ivshmem: improve debug messages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= Cc: Andrew Jones , cam , QEMU , Stefan Hajnoczi On 23.09.2015 12:29, Marc-André Lureau wrote: > On Tue, Sep 22, 2015 at 4:23 PM, Claudio Fontana > wrote: >> This MSI-X use vs not use is a bit confusing to me. >> I see that the use of MSI is controlled mainly by IVSHMEM_MSI (Property "msi"), >> but then there are if (msix_present()) checks spread around. >> >> Could this printf be a bit more clear, possibly adding other DPRINTFs as necessary? >> >> Is your IVSHMEM_DPRINTF("use msix\n"); actually intended to mean ("using MSIX\n")? But then why is the check for if (!msix_present(d)) only afterwards? > > > I don't remember precisely why it's there, only I probably wanted to > trace the entering of function ivshmem_use_msix(). > > Let's change it for IVSHMEM_DPRINTF("use msix, present: %d\n", > msix_present(d)); ok? > what about something like IVSHMEM_DPRINTF("%susing MSI-X\n", msix_present(d) ? "" : "not "); or just if (!msix_present(d) { IVSHMEM_DPRINTF("not using MSI-X"); return; } IVSHMEM_DPRINTF("using MSI-X"); Ciao CLaudio