net/vhost: prevent multiple setups on reconfiguration
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Tue, 18 Feb 2020 17:22:40 +0000 (18:22 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 19 Feb 2020 12:51:06 +0000 (13:51 +0100)
commit366a0500f432a862f37ab2ca220e60f5654eadd7
tree958df8ac9b95c8be28fb882e086aacd2498c92ca
parent3e00307549ef7c90a9752f58f1d423542399267c
net/vhost: prevent multiple setups on reconfiguration

Ethdev's .dev_configure callback can be called multiple
time during a device life-time, but Vhost makes the
wrong assumption that it is not the case and try to
setup again the device on reconfiguration.

This patch ensures the device hasn't been already setup
before proceeding.

Fixes: 3d01b759d267 ("net/vhost: delay driver setup")
Cc: stable@dpdk.org
Reported-by: Yinan Wang <yinan.wang@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Tested-by: Yinan Wang <yinan.wang@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Tiwei Bie <tiwei.bie@intel.com>
drivers/net/vhost/rte_eth_vhost.c