From c6854a41266a962d1f013065db7828517b246fef Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 19 May 2020 09:52:27 -0700 Subject: [PATCH] net/netvsc: fix warning when VF is removed The code to unset owner of VF device was changing port to invalid value before calling unset. Fixes: 4a9efcddaddd ("net/netvsc: fix VF support with secondary process") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger --- drivers/net/netvsc/hn_vf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c index b7e3ba46bf..a745c7c36e 100644 --- a/drivers/net/netvsc/hn_vf.c +++ b/drivers/net/netvsc/hn_vf.c @@ -120,11 +120,11 @@ static void hn_vf_remove(struct hn_data *hv) /* Stop incoming packets from arriving on VF */ hn_nvs_set_datapath(hv, NVS_DATAPATH_SYNTHETIC); - /* Stop transmission over VF */ - hv->vf_port = HN_INVALID_PORT; - /* Give back ownership */ rte_eth_dev_owner_unset(hv->vf_port, hv->owner.id); + + /* Stop transmission over VF */ + hv->vf_port = HN_INVALID_PORT; } } -- 2.20.1