diff mbox

[API-NEXT,PATCHv3,1/6] api: pktio: add pktio index conversion API

Message ID 1460829337-31120-1-git-send-email-bill.fischofer@linaro.org
State Accepted
Commit 272d5c6577f3237309a9f8e92be89114413b31ae
Headers show

Commit Message

Bill Fischofer April 16, 2016, 5:55 p.m. UTC
Add the odp_pktio_index() API to enable applications to convert packet I/O
handles to indices for managing user contexts and related associated data.

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Bogdan Pricope <Bogdan.Pricope@enea.com>
---
 include/odp/api/spec/packet_io.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Bill Fischofer April 19, 2016, 10:45 p.m. UTC | #1
ping. Needs review.

On Sat, Apr 16, 2016 at 12:55 PM, Bill Fischofer <bill.fischofer@linaro.org>
wrote:

> Add the odp_pktio_index() API to enable applications to convert packet I/O

> handles to indices for managing user contexts and related associated data.

>

> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

> Reviewed-by: Bogdan Pricope <Bogdan.Pricope@enea.com>

> ---

>  include/odp/api/spec/packet_io.h | 10 ++++++++++

>  1 file changed, 10 insertions(+)

>

> diff --git a/include/odp/api/spec/packet_io.h

> b/include/odp/api/spec/packet_io.h

> index 466cab6..de5bc25 100644

> --- a/include/odp/api/spec/packet_io.h

> +++ b/include/odp/api/spec/packet_io.h

> @@ -908,6 +908,16 @@ int odp_pktio_skip_set(odp_pktio_t pktio, uint32_t

> offset);

>  int odp_pktio_headroom_set(odp_pktio_t pktio, uint32_t headroom);

>

>  /**

> + * Get pktio interface index

> + *

> + * @param pktio   Packet I/O handle

> + *

> + * @return        Packet interface index (0..odp_config_pktio_entries()-1)

> + * @retval <0     On failure (e.g., handle not valid)

> + */

> +int odp_pktio_index(odp_pktio_t pktio);

> +

> +/**

>   * Get printable value for an odp_pktio_t

>   *

>   * @param pktio   odp_pktio_t handle to be printed

> --

> 2.5.0

>

>
Maxim Uvarov April 20, 2016, 6:08 p.m. UTC | #2
Merged,
Maxim.

On 04/16/16 20:55, Bill Fischofer wrote:
> Add the odp_pktio_index() API to enable applications to convert packet I/O
> handles to indices for managing user contexts and related associated data.
>
> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
> Reviewed-by: Bogdan Pricope <Bogdan.Pricope@enea.com>
> ---
>   include/odp/api/spec/packet_io.h | 10 ++++++++++
>   1 file changed, 10 insertions(+)
>
> diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h
> index 466cab6..de5bc25 100644
> --- a/include/odp/api/spec/packet_io.h
> +++ b/include/odp/api/spec/packet_io.h
> @@ -908,6 +908,16 @@ int odp_pktio_skip_set(odp_pktio_t pktio, uint32_t offset);
>   int odp_pktio_headroom_set(odp_pktio_t pktio, uint32_t headroom);
>   
>   /**
> + * Get pktio interface index
> + *
> + * @param pktio   Packet I/O handle
> + *
> + * @return        Packet interface index (0..odp_config_pktio_entries()-1)
> + * @retval <0     On failure (e.g., handle not valid)
> + */
> +int odp_pktio_index(odp_pktio_t pktio);
> +
> +/**
>    * Get printable value for an odp_pktio_t
>    *
>    * @param pktio   odp_pktio_t handle to be printed
diff mbox

Patch

diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h
index 466cab6..de5bc25 100644
--- a/include/odp/api/spec/packet_io.h
+++ b/include/odp/api/spec/packet_io.h
@@ -908,6 +908,16 @@  int odp_pktio_skip_set(odp_pktio_t pktio, uint32_t offset);
 int odp_pktio_headroom_set(odp_pktio_t pktio, uint32_t headroom);
 
 /**
+ * Get pktio interface index
+ *
+ * @param pktio   Packet I/O handle
+ *
+ * @return        Packet interface index (0..odp_config_pktio_entries()-1)
+ * @retval <0     On failure (e.g., handle not valid)
+ */
+int odp_pktio_index(odp_pktio_t pktio);
+
+/**
  * Get printable value for an odp_pktio_t
  *
  * @param pktio   odp_pktio_t handle to be printed