vhost: add API to get MTU value
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Sun, 12 Mar 2017 16:34:01 +0000 (17:34 +0100)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Sat, 1 Apr 2017 08:36:17 +0000 (10:36 +0200)
commit72e8543093df4b03b24c53ef00c9b18b3a6e58d9
tree154f03b1a86038a0d10e718b401882c7b2b1684a
parent4c5d8459d2e2206161a78203f5fb737c67c52c42
vhost: add API to get MTU value

This patch implements the function for the application to
get the MTU value.

rte_vhost_get_mtu() fills the mtu parameter with the MTU value
set in QEMU if VIRTIO_NET_F_MTU has been negotiated and returns 0,
-ENOTSUP otherwise.

The function returns -EAGAIN if Virtio feature negotiation
didn't happened yet.

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
lib/librte_vhost/rte_vhost_version.map
lib/librte_vhost/rte_virtio_net.h
lib/librte_vhost/vhost.c