common/idpf: remove device stop flag
PATCH 1/1 common/idpf: remove device stop flag
Remove device stop flag, as we already have dev->data-dev_started. This also fixed the issue when close port directly without start it first, some error message will be reported in dev_stop.
--- drivers/common/idpf/idpf_common_device.h | 2 -- drivers/net/cpfl/cpfl_ethdev.c | 6 +----- drivers/net/idpf/idpf_ethdev.c | 6 +----- 3 files changed, 2 insertions(+), 12 deletions(-)
drivers/common/idpf/idpf_common_device.h +0 -2
@@ -110,8 +110,6 @@ struct idpf_vport {uint16_t devarg_id; -bool stopped; -bool rx_vec_allowed;bool tx_vec_allowed;bool rx_use_avx512;
drivers/net/cpfl/cpfl_ethdev.c +1 -5
@@ -798,8 +798,6 @@ cpfl_dev_start(struct rte_eth_dev *dev)if (cpfl_dev_stats_reset (dev))PMD_DRV_LOG (ERR ,"Failed to reset stats" ); - vport->stopped =0 ; -return 0 ; err_vport:
@@ -817,7 +815,7 @@ cpfl_dev_stop(struct rte_eth_dev *dev) {struct idpf_vport *vport = dev->data->dev_private; -if (vport->stopped ==1 ) +if (dev->data->dev_started ==0 )return 0 ;idpf_vc_vport_ena_dis (vport, false);
@@ -828,8 +826,6 @@ cpfl_dev_stop(struct rte_eth_dev *dev)idpf_vc_vectors_dealloc (vport); - vport->stopped =1 ; -return 0 ; }
drivers/net/idpf/idpf_ethdev.c +1 -5
@@ -792,8 +792,6 @@ idpf_dev_start(struct rte_eth_dev *dev)if (idpf_dev_stats_reset (dev))PMD_DRV_LOG (ERR ,"Failed to reset stats" ); - vport->stopped =0 ; -return 0 ; err_vport:
@@ -811,7 +809,7 @@ idpf_dev_stop(struct rte_eth_dev *dev) {struct idpf_vport *vport = dev->data->dev_private; -if (vport->stopped ==1 ) +if (dev->data->dev_started ==0 )return 0 ;idpf_vc_vport_ena_dis (vport, false);
@@ -822,8 +820,6 @@ idpf_dev_stop(struct rte_eth_dev *dev)idpf_vc_vectors_dealloc (vport); - vport->stopped =1 ; -return 0 ; }
Signature · 1 line
2.31.1
Quoted 13 lines
-----Original Message-----
From: Zhang, Qi Z <[email protected]>
Sent: Thursday, April 20, 2023 11:57 PM
To: Xing, Beilei <[email protected]>
Cc: [email protected]; Zhang, Qi Z <[email protected]>; [email protected]
Subject: [PATCH] common/idpf: remove device stop flagRemove device stop flag, as we already have dev->data-dev_started. This also fixed the issue when close port directly without start it first, some error message will be reported in
dev_stop.
Quoted 5 lines
Fixes 14aa6ed8f2ec ("net/idpf: support device start and stop")Fixes 1082a773a86b ("common/idpf: add vport structure")Signed-off-by Qi Zhang <[email protected]>
Zhang, Qi Z
AppliedQuoted 22 lines
-----Original Message-----
From: Xing, Beilei <[email protected]>
Sent: Wednesday, April 26, 2023 2:42 PM
To: Zhang, Qi Z <[email protected]>
Cc: [email protected]; [email protected]
Subject: RE: [PATCH] common/idpf: remove device stop flagQuoted 11 lines
-----Original Message-----
From: Zhang, Qi Z <[email protected]>
Sent: Thursday, April 20, 2023 11:57 PM
To: Xing, Beilei <[email protected]>
Cc: [email protected]; Zhang, Qi Z <[email protected]>; [email protected]
Subject: [PATCH] common/idpf: remove device stop flagRemove device stop flag, as we already have dev->data-dev_started. This also fixed the issue when close port directly without start it first, some error message will be reported in
dev_stop.
Quoted 6 lines
Quoted 5 lines
Fixes 14aa6ed8f2ec ("net/idpf: support device start and stop")Fixes 1082a773a86b ("common/idpf: add vport structure")Signed-off-by Qi Zhang <[email protected]>Acked-by Beilei Xing <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi