From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C3448A00C4; Tue, 25 Jan 2022 11:51:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76B9442926; Tue, 25 Jan 2022 11:51:06 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id CAE9E426D8 for ; Tue, 25 Jan 2022 11:51:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643107864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jitgvgXAJfYQy0296zJVrnLXYTvuKM+4j+3YGBCOpes=; b=VMyD8953P1WqK18gZx4eIzxCcqfTZRly2aEGzAN86OFS6ikibrTrq+XbQ7NPtm8tmGzQLa 2FGmkKugSH6hr7GUJUWs85VLoja8ZK7noDNn0yCwyAhMbsj568r3FUPV/6aP5ESctqdvWX 4hjJkrsifwy2kQAG+1sU9m/6ViMETQU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-350-EO27gCpqMJO9OFNA_iMn0Q-1; Tue, 25 Jan 2022 05:51:01 -0500 X-MC-Unique: EO27gCpqMJO9OFNA_iMn0Q-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0713364140; Tue, 25 Jan 2022 10:51:00 +0000 (UTC) Received: from [10.39.208.46] (unknown [10.39.208.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 336391F435; Tue, 25 Jan 2022 10:50:32 +0000 (UTC) Message-ID: <91fc6365-9e27-8a0a-bb11-8cb00185739c@redhat.com> Date: Tue, 25 Jan 2022 11:50:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH 4/7] vhost: improve Vhost layer logs To: David Marchand Cc: dev , "Xia, Chenbo" References: <20211223083659.245766-1-maxime.coquelin@redhat.com> <20211223083659.245766-5-maxime.coquelin@redhat.com> From: Maxime Coquelin In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 1/4/22 15:48, David Marchand wrote: > On Thu, Dec 23, 2021 at 9:37 AM Maxime Coquelin > wrote: >> >> This patch prepends Vhost logs with the Vhost-user socket >> patch when available to ease filtering logs for a given port. >> >> Signed-off-by: Maxime Coquelin >> --- >> lib/vhost/vhost.c | 104 +++++++++++++++++++++++----------------------- >> 1 file changed, 51 insertions(+), 53 deletions(-) >> >> diff --git a/lib/vhost/vhost.c b/lib/vhost/vhost.c >> index e52d7f7bb6..dac0915ac0 100644 >> --- a/lib/vhost/vhost.c >> +++ b/lib/vhost/vhost.c >> @@ -58,9 +58,8 @@ __vhost_iova_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq, >> >> vhost_user_iotlb_pending_insert(dev, vq, iova, perm); >> if (vhost_user_iotlb_miss(dev, iova, perm)) { >> - VHOST_LOG_CONFIG(ERR, >> - "IOTLB miss req failed for IOVA 0x%" PRIx64 "\n", >> - iova); >> + VHOST_LOG_DATA(ERR, "(%s) IOTLB miss req failed for IOVA 0x%" PRIx64 "\n", >> + dev->ifname, iova); > > This change from CONFIG to DATA looks unrelated, and a separate fix > (which could go with another fix, see below). > I'm adding this one and the below one you spotted in a dedicated patch. >> vhost_user_iotlb_pending_remove(vq, iova, 1, perm); >> } >> > > [snip] > >> >> @@ -422,9 +421,9 @@ translate_log_addr(struct virtio_net *dev, struct vhost_virtqueue *vq, >> gpa = hva_to_gpa(dev, hva, exp_size); >> if (!gpa) { >> VHOST_LOG_CONFIG(ERR, > > translate_log_addr is called from vring_translate which is called from datapath. > So this log should be _DATA, in a separate fix. > > >> - "VQ: Failed to find GPA for log_addr: 0x%" >> + "(%s) failed to find GPA for log_addr: 0x%" >> PRIx64 " hva: 0x%" PRIx64 "\n", >> - log_addr, hva); >> + dev->ifname, log_addr, hva); >> return 0; >> } >> return gpa; >> @@ -551,16 +550,15 @@ init_vring_queue(struct virtio_net *dev, uint32_t vring_idx) >> int numa_node = SOCKET_ID_ANY; >> >> if (vring_idx >= VHOST_MAX_VRING) { >> - VHOST_LOG_CONFIG(ERR, >> - "Failed not init vring, out of bound (%d)\n", >> - vring_idx); >> + VHOST_LOG_CONFIG(ERR, "(%s) failed not init vring, out of bound (%d)\n", > > failed to* Fixed in this patch. > >> + dev->ifname, vring_idx); >> return; >> } >> >> vq = dev->virtqueue[vring_idx]; >> if (!vq) { >> - VHOST_LOG_CONFIG(ERR, "Virtqueue not allocated (%d)\n", >> - vring_idx); >> + VHOST_LOG_CONFIG(ERR, "(%s) virtqueue not allocated (%d)\n", >> + dev->ifname, vring_idx); >> return; >> } >> > > The rest lgtm. > > Thanks, Maxime