net/virtio-user: fix backend selection if stat fails
authorAdrian Moreno <amorenoz@redhat.com>
Mon, 26 Oct 2020 16:39:25 +0000 (17:39 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:05 +0000 (23:35 +0100)
commitb0395dc81844f5d5b8885ed5fa8c697c5cd7225d
tree7d7ccc2ac4ef436589d3a0a3698dca8c12b05e20
parent41c2bb635724fdf118c28878ff0a4e97c2b79e63
net/virtio-user: fix backend selection if stat fails

If stat fails because the file does not exist, it means that
the backend must be vhost-user in server mode.

Also, log the detected backend type.

Bugzilla ID: 559
Fixes: f908b22ea47a ("net/virtio: move backend type selection to ethdev")
Cc: stable@dpdk.org
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
drivers/net/virtio/virtio_user/virtio_user_dev.c
drivers/net/virtio/virtio_user/virtio_user_dev.h
drivers/net/virtio/virtio_user_ethdev.c