> -----Original Message-----
> From: Thomas Monjalon <[email protected]>
> Sent: Monday, September 27, 2021 2:19 PM
> To: Wang, Jie1X <[email protected]>
> Cc: [email protected]; Yigit, Ferruh <[email protected]>;
> [email protected]; Li, Xiaoyun <[email protected]>; Yang,
> SteveX <[email protected]>
> Subject: Re: [PATCH v9 1/3] ethdev: add an API to get device configuration 
> info
> 
> 26/09/2021 11:20, Jie Wang:
> > This patch adds a new API "rte_eth_dev_conf_info_get()" to help users
> > get device configuration info.
> >
> > Cc: [email protected]
> 
> No we don't backport new features.

Ok, I'll remove 'Cc: [email protected]'.

> 
> > Signed-off-by: Jie Wang <[email protected]>
> [...]
> > + * Retrieve the configuration of an Ethernet device.
> > + *
> > + * @param port_id
> > + *   The port identifier of the Ethernet device.
> > + * @param dev_conf_info
> > + *   A pointer to a structure of type *rte_eth_conf* to be filled with
> > + *   the configuration of the Ethernet device.
> > + *   And the memory of the structure should be allocated by the caller.
> > + * @return
> > + *   - (0) if successful.
> > + *   - (-ENODEV) if *port_id* invalid.
> > + *   - (-EINVAL) if bad parameter.
> > + */
> > +__rte_experimental
> > +int rte_eth_dev_conf_info_get(uint16_t port_id,
> > +                           struct rte_eth_conf *dev_conf_info);
> 
> It does not make sense to me.
> rte_eth_conf is passed by the app to rte_eth_dev_configure.
> Why the app would need to get the same info back?
> 
> 

In rte_eth_dev_configure, dev->data->dev_conf copies the info from 
port->dev_conf, and then the driver updates it. It doesn't same as 
port->dev_conf.
We need to get the updated device configuration.

Reply via email to