net/vhost: retrieve vid for a given port
authorCiara Loftus <ciara.loftus@intel.com>
Tue, 13 Sep 2016 13:47:43 +0000 (14:47 +0100)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Thu, 29 Sep 2016 13:07:13 +0000 (15:07 +0200)
commite22ed042882abefb969f4a70cdd1f268b5a67260
tree2c3bbe4b6f56b48249b1d44f75a94b8daa0c06b5
parent2d7c37194ee42bf31e401498adbd51dd14a6d6b5
net/vhost: retrieve vid for a given port

In some cases when using the vHost PMD, certain vHost library functions
may still need to be accessed. One such example is the
rte_vhost_get_queue_num function which returns the number of virtqueues
reported by the guest - information which is not exposed by the PMD.

This commit introduces a new rte_eth_vhost function that returns the
'vid' associated with a given port id. This allows the PMD user to call
vHost library functions which require the 'vid' value.

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
drivers/net/vhost/rte_eth_vhost.c
drivers/net/vhost/rte_eth_vhost.h
drivers/net/vhost/rte_pmd_vhost_version.map