[PATCH v5 1/2] ethdev: fix ethdev configuration state on reset

Hanumanth Reddy Pothula hpothula at marvell.com
Mon Jan 16 11:43:02 CET 2023


Ping

> -----Original Message-----
> From: Hanumanth Pothula <hpothula at marvell.com>
> Sent: Wednesday, December 21, 2022 7:37 AM
> To: Thomas Monjalon <thomas at monjalon.net>; Ferruh Yigit
> <ferruh.yigit at amd.com>; Andrew Rybchenko
> <andrew.rybchenko at oktetlabs.ru>
> Cc: dev at dpdk.org; viacheslavo at nvidia.com; Jerin Jacob Kollanukkaran
> <jerinj at marvell.com>; Nithin Kumar Dabilpuram
> <ndabilpuram at marvell.com>; Hanumanth Reddy Pothula
> <hpothula at marvell.com>
> Subject: [PATCH v5 1/2] ethdev: fix ethdev configuration state on reset
> 
> 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 <hpothula at 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



More information about the dev mailing list