Message ID | 1442493572-21590-1-git-send-email-maxim.uvarov@linaro.org |
---|---|
State | New |
Headers | show |
prefix should be api-next of course. Skip that patch, will send corrected. Maxim. On 09/17/15 15:39, Maxim Uvarov wrote: > Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> > --- > include/odp/api/packet_io.h | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h > index 9b930bd..631aec2 100644 > --- a/include/odp/api/packet_io.h > +++ b/include/odp/api/packet_io.h > @@ -345,6 +345,28 @@ int odp_pktio_headroom_set(odp_pktio_t pktio, uint32_t headroom); > uint64_t odp_pktio_to_u64(odp_pktio_t pktio); > > /** > + * Determine if link is up or down for a packet IO interface. > + * > + * @param[in] pktio Packet IO handle. > + * > + * @retval 1 link is up. > + * @retval 0 link is down. > + * @retval <0 on failure > +*/ > +int odp_pktio_link(odp_pktio_t pktio); > + > +/** > + * Up/Down link on a packet IO interface. > + * > + * @param[in] pktio Packet IO handle. > + * @param[in] enable 1 to link up, 0 to link down. > + * > + * @retval 0 on success > + * @retval <0 on failure > + */ > +int odp_pktio_link_set(odp_pktio_t pktio, odp_bool_t up); > + > +/** > * @} > */ >
On 17 September 2015 at 08:39, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: > Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> > --- > include/odp/api/packet_io.h | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h > index 9b930bd..631aec2 100644 > --- a/include/odp/api/packet_io.h > +++ b/include/odp/api/packet_io.h > @@ -345,6 +345,28 @@ int odp_pktio_headroom_set(odp_pktio_t pktio, > uint32_t headroom); > uint64_t odp_pktio_to_u64(odp_pktio_t pktio); > > /** > + * Determine if link is up or down for a packet IO interface. > + * > + * @param[in] pktio Packet IO handle. > + * > + * @retval 1 link is up. > + * @retval 0 link is down. > + * @retval <0 on failure > +*/ > +int odp_pktio_link(odp_pktio_t pktio); > + > +/** > + * Up/Down link on a packet IO interface. > Should say it 'sets' link up/down state > + * > + * @param[in] pktio Packet IO handle. > + * @param[in] enable 1 to link up, 0 to link down. > + * > + * @retval 0 on success > + * @retval <0 on failure > + */ > +int odp_pktio_link_set(odp_pktio_t pktio, odp_bool_t up); > Is it possible to try to set state on an a pktio id that cant be configured for whatever reason ? Should odp_errno be -ENOTSUP in that case ? > + > +/** > * @} > */ > > -- > 1.9.1 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp >
diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h index 9b930bd..631aec2 100644 --- a/include/odp/api/packet_io.h +++ b/include/odp/api/packet_io.h @@ -345,6 +345,28 @@ int odp_pktio_headroom_set(odp_pktio_t pktio, uint32_t headroom); uint64_t odp_pktio_to_u64(odp_pktio_t pktio); /** + * Determine if link is up or down for a packet IO interface. + * + * @param[in] pktio Packet IO handle. + * + * @retval 1 link is up. + * @retval 0 link is down. + * @retval <0 on failure +*/ +int odp_pktio_link(odp_pktio_t pktio); + +/** + * Up/Down link on a packet IO interface. + * + * @param[in] pktio Packet IO handle. + * @param[in] enable 1 to link up, 0 to link down. + * + * @retval 0 on success + * @retval <0 on failure + */ +int odp_pktio_link_set(odp_pktio_t pktio, odp_bool_t up); + +/** * @} */
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org> --- include/odp/api/packet_io.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)