6d6cd38f45
The rte_vhost_get_vring_base function is being called to get the values of last_avail_idx and last_used_idx. These fields will not have the correct values in case the function returns an error. Adding a check for the function return value, and in the case of an error, set the fields to be zero and print a warning message. Fixes: bff735011078 ("vdpa/mlx5: prepare virtio queues") Cc: stable@dpdk.org Signed-off-by: Asaf Penso <asafp@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>