[dpdk-dev] ethdev: improve doc for name by port ID API

Message ID 1526047551-28882-1-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Andrew Rybchenko May 11, 2018, 2:05 p.m. UTC
  From: Ivan Malov <ivan.malov@oktetlabs.ru>

Description of rte_eth_dev_get_name_by_port() calls
port ID argument a pointer, which is misleading.
Also, output buffer minimal size is not mentioned.
These points need to be improved.

Fixes: bde516d5a85a ("ethdev: get port by name")
Cc: Reshma Pattan <reshma.pattan@intel.com>
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_ethdev/rte_ethdev.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Ferruh Yigit May 11, 2018, 4:09 p.m. UTC | #1
On 5/11/2018 3:05 PM, Andrew Rybchenko wrote:
> From: Ivan Malov <ivan.malov@oktetlabs.ru>
> 
> Description of rte_eth_dev_get_name_by_port() calls
> port ID argument a pointer, which is misleading.
> Also, output buffer minimal size is not mentioned.
> These points need to be improved.
> 
> Fixes: bde516d5a85a ("ethdev: get port by name")
> Cc: Reshma Pattan <reshma.pattan@intel.com>
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Ferruh Yigit May 11, 2018, 4:12 p.m. UTC | #2
On 5/11/2018 5:09 PM, Ferruh Yigit wrote:
> On 5/11/2018 3:05 PM, Andrew Rybchenko wrote:
>> From: Ivan Malov <ivan.malov@oktetlabs.ru>
>>
>> Description of rte_eth_dev_get_name_by_port() calls
>> port ID argument a pointer, which is misleading.
>> Also, output buffer minimal size is not mentioned.
>> These points need to be improved.
>>
>> Fixes: bde516d5a85a ("ethdev: get port by name")
>> Cc: Reshma Pattan <reshma.pattan@intel.com>
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 0bb14ff66..78e12bf5d 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -3670,9 +3670,9 @@  rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id);
 * Get the device name from port id
 *
 * @param port_id
-*   pointer to port identifier of the device
+*   Port identifier of the device.
 * @param name
-*  pci address or name of the device
+*   Buffer of size RTE_ETH_NAME_MAX_LEN to store the name.
 * @return
 *   - (0) if successful.
 *   - (-EINVAL) on failure.