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 89472A0093; Tue, 4 Jan 2022 15:48:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 73EA340151; Tue, 4 Jan 2022 15:48:56 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 983B440040 for ; Tue, 4 Jan 2022 15:48:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641307734; 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: in-reply-to:in-reply-to:references:references; bh=lJfffNYiRgSwiXxNW2M0FqacofzHvo4VU9PviDf/ihc=; b=NdaU+SN2S69up5eKVsOnMNH+V0ej2QbbvIWZtQkvnizqgvlfsAr2zj+XFnxk2qBsxIAEly cUSesiU/JS7eMqYEXrAhWzorwtGbJR0qRafnbb5wsXQhiog2RIjvx6Cx31uSp58jSXNEm8 IPccVOM27oeTYR1Il5Ly02rDd8gqf38= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-489-kYItAummNeWyWtWkA7H6vg-1; Tue, 04 Jan 2022 09:48:53 -0500 X-MC-Unique: kYItAummNeWyWtWkA7H6vg-1 Received: by mail-lf1-f70.google.com with SMTP id m8-20020a0565120a8800b00425edb1a456so8016222lfu.16 for ; Tue, 04 Jan 2022 06:48:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lJfffNYiRgSwiXxNW2M0FqacofzHvo4VU9PviDf/ihc=; b=igdwYs3lOwBXrss6E9SulotSXGh9oiYDbHJIyTi8XHZVdeD2ualG+r6pmcOOkE4UPy yQf7ljIuJhVNOASsooVLJZgxnbOhDFfZrolTdFgIxFqOUjo0Qe7oOWkNr8bq4HGNNz08 XFFPaQVx+SN3ftJmjvpWHvbeSWLUe0U6nxz2DoL7FDhb57s9raPbPHJCwGbPaWzQLkiV Gu8tpstXBjkwKTDPk/yLTLp6jWYysjKaQzFgoSc8C15Mg8W4D4NiZKhQIErNWv3meXK8 aKmmwCoDtYtSQh3hwYRfmQabnl73PwBZv7O3gReTfCZ+37znu44OOHrGtUDZmA+5SYVL vKqw== X-Gm-Message-State: AOAM5328eZQD1iQ6vuc6S8ZsOFqWmPswMbRjyKuSjxB60bXmxkE2g7UE T4+4GcB96qBfWr9hYkE8QibUQf5t4OYP4xSEWJRIzsk2E+N/WZl/dGo0diQ/KhlfNPPgvO0ZHju ky+5h7RtiJhk7xpN3Z9o= X-Received: by 2002:a2e:720a:: with SMTP id n10mr33719723ljc.333.1641307731464; Tue, 04 Jan 2022 06:48:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJzTVRx2cZi0jFUoEC7j+49+WT1d8nWfm+Q1ggFutBdJ2pbEk6nLMg+3nGkfp+HivtUAcVed7A8t+k5urol7zl8= X-Received: by 2002:a2e:720a:: with SMTP id n10mr33719690ljc.333.1641307730845; Tue, 04 Jan 2022 06:48:50 -0800 (PST) MIME-Version: 1.0 References: <20211223083659.245766-1-maxime.coquelin@redhat.com> <20211223083659.245766-5-maxime.coquelin@redhat.com> In-Reply-To: <20211223083659.245766-5-maxime.coquelin@redhat.com> From: David Marchand Date: Tue, 4 Jan 2022 15:48:39 +0100 Message-ID: Subject: Re: [PATCH 4/7] vhost: improve Vhost layer logs To: Maxime Coquelin Cc: dev , "Xia, Chenbo" Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 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). > 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* > + 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. -- David Marchand