DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, "Xia, Chenbo" <chenbo.xia@intel.com>
Subject: Re: [PATCH 4/7] vhost: improve Vhost layer logs
Date: Tue, 25 Jan 2022 11:50:31 +0100	[thread overview]
Message-ID: <91fc6365-9e27-8a0a-bb11-8cb00185739c@redhat.com> (raw)
In-Reply-To: <CAJFAV8zHPYU1kQEWFC6_5XdmYUqUoRNPO133_LWVP1GneDcwpg@mail.gmail.com>



On 1/4/22 15:48, David Marchand wrote:
> On Thu, Dec 23, 2021 at 9:37 AM Maxime Coquelin
> <maxime.coquelin@redhat.com> 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 <maxime.coquelin@redhat.com>
>> ---
>>   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


  reply	other threads:[~2022-01-25 10:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23  8:36 [PATCH 0/7] vhost: improve logging Maxime Coquelin
2021-12-23  8:36 ` [PATCH 1/7] vhost: improve IOTLB logs Maxime Coquelin
2022-01-04 14:44   ` David Marchand
2022-01-25  9:39     ` Maxime Coquelin
2021-12-23  8:36 ` [PATCH 2/7] vhost: improve vDPA registration failure log Maxime Coquelin
2021-12-23  8:36 ` [PATCH 3/7] vhost: improve socket layer logs Maxime Coquelin
2022-01-04 14:47   ` David Marchand
2022-01-25 10:44     ` Maxime Coquelin
2022-01-04 15:02   ` David Marchand
2022-01-25 10:50     ` Maxime Coquelin
2021-12-23  8:36 ` [PATCH 4/7] vhost: improve Vhost " Maxime Coquelin
2022-01-04 14:48   ` David Marchand
2022-01-25 10:50     ` Maxime Coquelin [this message]
2021-12-23  8:36 ` [PATCH 5/7] vhost: improve Vhost-user " Maxime Coquelin
2021-12-23  8:36 ` [PATCH 6/7] vhost: improve Virtio-net " Maxime Coquelin
2021-12-23  8:36 ` [PATCH 7/7] vhost: remove multi-line logs Maxime Coquelin
2021-12-23 15:59 ` [PATCH 0/7] vhost: improve logging Stephen Hemminger
2022-01-04 15:05 ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=91fc6365-9e27-8a0a-bb11-8cb00185739c@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).