Presently, on device reset, ethdev configuration state,
dev_configured, is not reset.

On device reset, reset ethdev configuration state to make
sure device reconfiguration happens cleanly.

Signed-off-by: Hanumanth Pothula <hpoth...@marvell.com>
---
v5:
 - Move nic-to-pmd-rx-metadata declaration to struct rte_port.
v4:
 - As per spec rte_eth_rx_metadata_negotiate() is processed only when
   dev_configured is set. Hence can't enable automatically when a flow
   command requests metadata.
 - Add new testpmd command to allow NIC to PMD Rx metadata negotiation.
v3:
 - Updated run_app.rst with the new command line argument,
   nic-to-pmd-rx-metadata.
 - Updated commit text.
v2:
 - taken cared alignment issues
 - renamed command line argument from rx-metadata to nic-to-pmd-rx-metadata
 - renamed variable name from rx-metadata to nic_to_pmd_rx_metadata
---
 lib/ethdev/rte_ethdev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 5d5e18db1e..18c59044bc 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -1629,6 +1629,8 @@ rte_eth_dev_reset(uint16_t port_id)
                        port_id, rte_strerror(-ret));
        }
        ret = dev->dev_ops->dev_reset(dev);
+       if (!ret)
+               dev->data->dev_configured = 0;
 
        return eth_err(port_id, ret);
 }
-- 
2.25.1

Reply via email to