vhost: export the number of vrings
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Sat, 1 Apr 2017 07:22:48 +0000 (15:22 +0800)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Sat, 1 Apr 2017 08:42:44 +0000 (10:42 +0200)
commitb50a2039861052ebe8e498795f8d7d5c68a64d4c
treeb9cff3a0f1c1832ff6e8d1d879bdb10cfd2584e1
parentab4d7b9f1afcc70719b0a3040efcc11950ccfa75
vhost: export the number of vrings

We used to use rte_vhost_get_queue_num() for telling how many vrings.
However, the return value is the number of "queue pairs", which is
very virtio-net specific. To make it generic, we should return the
number of vrings instead, and let the driver do the proper translation.
Say, virtio-net driver could turn it to the number of queue pairs by
dividing 2.

Meanwhile, mark rte_vhost_get_queue_num as deprecated.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
doc/guides/rel_notes/release_17_05.rst
drivers/net/vhost/rte_eth_vhost.c
lib/librte_vhost/rte_vhost_version.map
lib/librte_vhost/rte_virtio_net.h
lib/librte_vhost/vhost.c