[dpdk-dev,v2,03/13] ethdev: add more annotation
Commit Message
Add more annotation, to clearly tell the 'rte_eth_dev_info_get()'
users that the buffer should be cleared first.
v2 changes:
Add more annotation for 'rte_eth_dev_info_get()'.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Reviewed-by: Jijiang Liu <jijiang.liu@intel.com>
Reviewed-by: Cunming Liang <cunming.liang@intel.com>
Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
---
lib/librte_ether/rte_ethdev.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
2014-09-25 16:40, Helin Zhang:
> Add more annotation, to clearly tell the 'rte_eth_dev_info_get()'
> users that the buffer should be cleared first.
Since commit http://dpdk.org/browse/dpdk/commit/?id=a30268e9a2
(ethdev: reset whole dev info structure before filling),
this patch is now useless.
Hi Thomas
OK. Good to know that. I will rework my patch based on latest master branch. Thank you very much!
Regards,
Helin
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, October 22, 2014 4:39 AM
> To: Zhang, Helin
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2 03/13] ethdev: add more annotation
>
> 2014-09-25 16:40, Helin Zhang:
> > Add more annotation, to clearly tell the 'rte_eth_dev_info_get()'
> > users that the buffer should be cleared first.
>
> Since commit http://dpdk.org/browse/dpdk/commit/?id=a30268e9a2
> (ethdev: reset whole dev info structure before filling), this patch is now useless.
>
> --
> Thomas
@@ -2120,7 +2120,8 @@ extern void rte_eth_macaddr_get(uint8_t port_id, struct ether_addr *mac_addr);
* The port identifier of the Ethernet device.
* @param dev_info
* A pointer to a structure of type *rte_eth_dev_info* to be filled with
- * the contextual information of the Ethernet device.
+ * the contextual information of the Ethernet device. The buffer should
+ * be cleared first, as it might not fill all fields.
*/
extern void rte_eth_dev_info_get(uint8_t port_id,
struct rte_eth_dev_info *dev_info);