Re: [dpdk-dev] [PATCH v9 1/3] ethdev: add an API to get device configuration info
From: Thomas Monjalon <hidden>
Date: 2021-09-27 07:56:10
27/09/2021 09:21, Wang, Jie1X:
From: Thomas Monjalon <redacted>quoted
26/09/2021 11:20, Jie Wang:quoted
This patch adds a new API "rte_eth_dev_conf_info_get()" to help users get device configuration info.[...]quoted
+ * 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.
OK I see. Please update the commit log to explain this.