[PATCH 3/7] vhost: improve socket layer logs

Maxime Coquelin maxime.coquelin at redhat.com
Tue Jan 25 11:50:55 CET 2022



On 1/4/22 16:02, David Marchand wrote:
> On Thu, Dec 23, 2021 at 9:37 AM Maxime Coquelin
> <maxime.coquelin at redhat.com> wrote:
>> @@ -471,16 +468,14 @@ vhost_user_client_reconnect(void *arg __rte_unused)
>>                                                  sizeof(reconn->un));
>>                          if (ret == -2) {
>>                                  close(reconn->fd);
>> -                               VHOST_LOG_CONFIG(ERR,
>> -                                       "reconnection for fd %d failed\n",
>> -                                       reconn->fd);
>> +                               VHOST_LOG_CONFIG(ERR, "(%s) reconnection for fd %d failed\n",
>> +                                       reconn->vsocket->path, reconn->fd);
>>                                  goto remove_fd;
>>                          }
>>                          if (ret == -1)
>>                                  continue;
>>
>> -                       VHOST_LOG_CONFIG(INFO,
>> -                               "%s: connected\n", reconn->vsocket->path);
>> +                       VHOST_LOG_CONFIG(INFO, "%s: connected\n", reconn->vsocket->path);
> 
> Another nit that I caught when testing in OVS.
> For consistency, we can have () around the socket path.
> 
> dpdk|WARN|VHOST_CONFIG: (/var/lib/vhost_sockets/vhost0) failed to
> connect: No such file or directory
> dpdk|INFO|VHOST_CONFIG: (/var/lib/vhost_sockets/vhost0) reconnecting...
> dpdk|INFO|VHOST_CONFIG: /var/lib/vhost_sockets/vhost4: connected
> dpdk|INFO|VHOST_CONFIG: (/var/lib/vhost_sockets/vhost4) new device, handle is 0
> dpdk|INFO|VHOST_CONFIG: /var/lib/vhost_sockets/vhost5: connected
> dpdk|INFO|VHOST_CONFIG: (/var/lib/vhost_sockets/vhost5) new device, handle is 1
> dpdk|INFO|VHOST_CONFIG: /var/lib/vhost_sockets/vhost6: connected
> dpdk|INFO|VHOST_CONFIG: (/var/lib/vhost_sockets/vhost6) new device, handle is 2
> dpdk|INFO|VHOST_CONFIG: /var/lib/vhost_sockets/vhost7: connected
> dpdk|INFO|VHOST_CONFIG: (/var/lib/vhost_sockets/vhost7) new device, handle is 3
> 

Agree, changed in v2.

Thanks,
Maxime

> 
>>                          vhost_user_add_connection(reconn->fd, reconn->vsocket);
>>   remove_fd:
>>                          TAILQ_REMOVE(&reconn_list.head, reconn, next);
> 
> 



More information about the dev mailing list