net/idpf: stop before closing device
This patch stops device at the beginning of idpf_dev_close. Fixes: 14aa6ed8f2ec ("net/idpf: support device start and stop") Signed-off-by: Beilei Xing <beilei.xing@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
This commit is contained in:
parent
5583abf6a3
commit
e9ff6df15b
@ -609,6 +609,9 @@ idpf_dev_stop(struct rte_eth_dev *dev)
|
||||
{
|
||||
struct idpf_vport *vport = dev->data->dev_private;
|
||||
|
||||
if (vport->stopped == 1)
|
||||
return 0;
|
||||
|
||||
idpf_vc_ena_dis_vport(vport, false);
|
||||
|
||||
idpf_stop_queues(dev);
|
||||
@ -617,6 +620,8 @@ idpf_dev_stop(struct rte_eth_dev *dev)
|
||||
|
||||
idpf_vc_dealloc_vectors(vport);
|
||||
|
||||
vport->stopped = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -626,6 +631,8 @@ idpf_dev_close(struct rte_eth_dev *dev)
|
||||
struct idpf_vport *vport = dev->data->dev_private;
|
||||
struct idpf_adapter *adapter = vport->adapter;
|
||||
|
||||
idpf_dev_stop(dev);
|
||||
|
||||
idpf_vc_destroy_vport(vport);
|
||||
|
||||
rte_free(vport->rss_lut);
|
||||
|
@ -127,6 +127,8 @@ struct idpf_vport {
|
||||
struct idpf_chunks_info chunks_info;
|
||||
|
||||
uint16_t devarg_id;
|
||||
|
||||
bool stopped;
|
||||
};
|
||||
|
||||
struct idpf_adapter {
|
||||
|
Loading…
x
Reference in New Issue
Block a user