net/idpf: need to stop device when closing device
PATCH 1/1 net/idpf: need to stop device when closing device
From: Beilei Xing <[email protected]>
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 <[email protected]>
--- drivers/net/idpf/idpf_ethdev.c | 7 +++++++ drivers/net/idpf/idpf_ethdev.h | 2 ++ 2 files changed, 9 insertions(+)
drivers/net/idpf/idpf_ethdev.c +7 -0
@@ -605,6 +605,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);
@@ -613,6 +616,8 @@ idpf_dev_stop(struct rte_eth_dev *dev)idpf_vc_dealloc_vectors (vport); + vport->stopped =1 ; +return 0 ; }
@@ -622,6 +627,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);
drivers/net/idpf/idpf_ethdev.h +2 -0
@@ -127,6 +127,8 @@ struct idpf_vport {struct idpf_chunks_info chunks_info;uint16_t devarg_id; + +bool stopped; };struct idpf_adapter {
Signature · 1 line
2.26.2
Quoted 9 lines
-----Original Message-----
From: Xing, Beilei <[email protected]>
Sent: Monday, November 14, 2022 6:40 PM
To: Wu, Jingjing <[email protected]>; Zhang, Qi Z <[email protected]>
Cc: [email protected]; Xing, Beilei <[email protected]>
Subject: [PATCH] net/idpf: need to stop device when closing device
Quoted 7 lines
From: Beilei Xing <[email protected]>
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 <[email protected]>
Acked-by Qi Zhang <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi