On 10/13/2020 11:06 AM, Thomas Monjalon wrote:
When closing a port, it is supposed to be already stopped,
and marked as such with "dev_started" state zeroed by the stop API.
Resetting "dev_started" before calling the driver close operation
was hiding the case of not properly stopped port being closed.
The flag "dev_started" is not changed anymore in "rte_eth_dev_close()".
In case the "dev_stop" function is called from "dev_close",
bypassing "rte_eth_dev_stop()" API,
the "dev_started" state must be explicitly reset in the PMD
in order to keep the same behaviour.
Signed-off-by: Thomas Monjalon <tho...@monjalon.net>
Acked-by: Stephen Hemminger <step...@networkplumber.org>
Reviewed-by: Andrew Rybchenko <arybche...@solarflare.com>
---
drivers/net/ark/ark_ethdev.c | 1 +
drivers/net/atlantic/atl_ethdev.c | 1 +
drivers/net/dpaa/dpaa_ethdev.c | 1 +
drivers/net/e1000/em_ethdev.c | 2 ++
drivers/net/e1000/igb_ethdev.c | 1 +
drivers/net/ena/ena_ethdev.c | 1 +
drivers/net/enetc/enetc_ethdev.c | 1 +
drivers/net/fm10k/fm10k_ethdev.c | 1 +
drivers/net/hinic/hinic_pmd_ethdev.c | 2 ++
drivers/net/hns3/hns3_ethdev.c | 1 +
drivers/net/hns3/hns3_ethdev_vf.c | 1 +
drivers/net/i40e/i40e_ethdev.c | 1 +
drivers/net/i40e/i40e_ethdev_vf.c | 2 +-
drivers/net/iavf/iavf_ethdev.c | 1 +
drivers/net/ice/ice_ethdev.c | 1 +
drivers/net/igc/igc_ethdev.c | 1 +
drivers/net/ixgbe/ixgbe_ethdev.c | 1 +
drivers/net/kni/rte_eth_kni.c | 1 +
drivers/net/liquidio/lio_ethdev.c | 1 +
drivers/net/mvneta/mvneta_ethdev.c | 2 ++
drivers/net/netvsc/hn_ethdev.c | 1 +
drivers/net/nfb/nfb_ethdev.c | 2 ++
drivers/net/pfe/pfe_ethdev.c | 2 ++
drivers/net/qede/qede_ethdev.c | 1 +
drivers/net/ring/rte_eth_ring.c | 1 +
drivers/net/szedata2/rte_eth_szedata2.c | 2 ++
drivers/net/thunderx/nicvf_ethdev.c | 1 +
drivers/net/vhost/rte_eth_vhost.c | 1 +
drivers/net/virtio/virtio_ethdev.c | 1 +
drivers/net/vmxnet3/vmxnet3_ethdev.c | 1 +
lib/librte_ethdev/rte_ethdev.c | 1 -
31 files changed, 36 insertions(+), 2 deletions(-)
Following non-virtual PMDs doesn't call 'dev_stop()' from 'dev_close()',
maintainers of the PMDs cc'ed.
avp
axgbe
bnx2x
cxgbe
dpaa2
enic
ice_dcf
ionic
ipn3ke
mlx4
mlx5
mvpp2
nfp
octeontx
octeontx2
sfc
Can you please double check for your driver:
1) Device stopped properly before it has been closed?
2) The device stopped state ('dev->data->dev_started') is correct if device
closed without explicitly stopped first.
Thanks,
ferruh