[dpdk-dev,v2,03/13] ethdev: add more annotation

Message ID 1411634427-746-4-git-send-email-helin.zhang@intel.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Zhang, Helin Sept. 25, 2014, 8:40 a.m. UTC
  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

Thomas Monjalon Oct. 21, 2014, 8:38 p.m. UTC | #1
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.
  
Zhang, Helin Oct. 21, 2014, 10:20 p.m. UTC | #2
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
  

Patch

diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 60b24c5..2c5ab13 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -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);