From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Kevin Traynor <ktraynor@redhat.com>,
Adrian Moreno <amorenoz@redhat.com>,
dev@dpdk.org
Cc: yinan.wang@intel.com, patrick.fu@intel.com, stable@dpdk.org,
Chenbo Xia <chenbo.xia@intel.com>,
Zhihong Wang <zhihong.wang@intel.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] virtio-user: fix backend selection if stat fails
Date: Tue, 20 Oct 2020 11:11:07 +0200 [thread overview]
Message-ID: <525cba16-8f46-fc7e-47ec-1f0ec45c00e2@redhat.com> (raw)
In-Reply-To: <c44dfd2a-248c-1672-7dfa-291454c4be5e@redhat.com>
On 10/20/20 11:01 AM, Kevin Traynor wrote:
> On 20/10/2020 08:16, Adrian Moreno wrote:
>> If stat fails it means the backend must be vhost-user in server mode
>>
>> Bugzilla ID: 559
>> Fixes: f908b22ea47a ("net/virtio: move backend type selection to ethdev")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
>> ---
>> drivers/net/virtio/virtio_user_ethdev.c | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c
>> index 042665bc0..ce74d08ab 100644
>> --- a/drivers/net/virtio/virtio_user_ethdev.c
>> +++ b/drivers/net/virtio/virtio_user_ethdev.c
>> @@ -560,9 +560,10 @@ virtio_user_backend_type(const char *path)
>> struct stat sb;
>>
>> if (stat(path, &sb) == -1) {
>> - PMD_INIT_LOG(ERR, "Stat fails: %s (%s)\n", path,
>> + PMD_INIT_LOG(INFO, "Stat fails: %s (%s)\n", path,
>> strerror(errno));
>
> It may be accurate, but a 'fail' in the logs can be confusing for users
> when it is an INFO log and normal operation. Suggest to reword to
> something softer like 'Unable to stat' or 'Not able to get file status'
We may want to:
- only return VIRTIO_USER_BACKEND_VHOST_USER if -ENOENT, and log that
we assume this is Vhost-user backend in server mode at INFO level.
- return VIRTIO_USER_BACKEND_UNKNOWN otherwise and print an error
message with the strerror(errno).
What do you think?
>> - return VIRTIO_USER_BACKEND_UNKNOWN;
>> + /* Must be vhost-user in server mode */
>> + return VIRTIO_USER_BACKEND_VHOST_USER;
>> }
>>
>> if (S_ISSOCK(sb.st_mode)) {
>>
>
next prev parent reply other threads:[~2020-10-20 9:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-20 7:16 [dpdk-stable] " Adrian Moreno
2020-10-20 8:43 ` [dpdk-stable] [dpdk-dev] " Jiang, YuX
2020-10-20 9:01 ` Kevin Traynor
2020-10-20 9:11 ` Maxime Coquelin [this message]
2020-10-20 9:38 ` Kevin Traynor
2020-10-20 9:55 ` Maxime Coquelin
2020-10-20 10:33 ` Adrian Moreno
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=525cba16-8f46-fc7e-47ec-1f0ec45c00e2@redhat.com \
--to=maxime.coquelin@redhat.com \
--cc=amorenoz@redhat.com \
--cc=chenbo.xia@intel.com \
--cc=dev@dpdk.org \
--cc=ktraynor@redhat.com \
--cc=patrick.fu@intel.com \
--cc=stable@dpdk.org \
--cc=yinan.wang@intel.com \
--cc=zhihong.wang@intel.com \
/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).