vhost: fix MTU device feature check
The MTU feature support check has to be done against MTU
feature bit mask, and not bit position.
Fixes: 72e8543093
("vhost: add API to get MTU value")
Cc: stable@dpdk.org
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
This commit is contained in:
parent
c665d9a231
commit
02f62392ff
@ -272,7 +272,7 @@ rte_vhost_get_mtu(int vid, uint16_t *mtu)
|
||||
if (!(dev->flags & VIRTIO_DEV_READY))
|
||||
return -EAGAIN;
|
||||
|
||||
if (!(dev->features & VIRTIO_NET_F_MTU))
|
||||
if (!(dev->features & (1ULL << VIRTIO_NET_F_MTU)))
|
||||
return -ENOTSUP;
|
||||
|
||||
*mtu = dev->mtu;
|
||||
|
Loading…
Reference in New Issue
Block a user