_link_up() might be confused with setting command. Not with getting status command.

How about:
odp_pktio_status_link_up()?

There might be some other statuses for pktio which we can extend later and use the same prefix odp_pktio_status_

Maxim.


On 12/11/2015 15:53, Alexandru Badicioiu wrote:
Wouldn't be the application code more clear if the function is renamed to _link_up()? Return values clearly suggest this. The application has to remember that 1 means link up and 0 means link down.

Alex


On 11 December 2015 at 14:44, Maxim Uvarov <maxim.uva...@linaro.org <mailto:maxim.uva...@linaro.org>> wrote:

    Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org
    <mailto:maxim.uva...@linaro.org>>
    ---
     v1 was link_state(), now it's link_status().

     include/odp/api/packet_io.h | 11 +++++++++++
     1 file changed, 11 insertions(+)

    diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h
    index 443841e..8999b2c 100644
    --- a/include/odp/api/packet_io.h
    +++ b/include/odp/api/packet_io.h
    @@ -673,6 +673,17 @@ void
    odp_pktio_output_queue_param_init(odp_pktio_output_queue_param_t
    *param);
     void odp_pktio_print(odp_pktio_t pktio);

     /**
    + * Determine pktio link is up or down for a packet IO interface.
    + *
    + * @param pktio Packet IO handle.
    + *
    + * @retval  1 link is up
    + * @retval  0 link is down
    + * @retval <0 on failure
    +*/
    +int odp_pktio_link_status(odp_pktio_t pktio);
    +
    +/**
      * @}
      */

    --
    1.9.1

    _______________________________________________
    lng-odp mailing list
    lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
    https://lists.linaro.org/mailman/listinfo/lng-odp



_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to