diff mbox

[1/5] api: classification: add odp_cls_cos_pool_set() api

Message ID 1447741013-7333-1-git-send-email-bala.manoharan@linaro.org
State New
Headers show

Commit Message

Balasubramanian Manoharan Nov. 17, 2015, 6:16 a.m. UTC
odp_cls_cos_pool_set() api is used to configure packet pool to CoS.
The packets arriving at the CoS is allocated from the configured pool

Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
---
 include/odp/api/classification.h | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

Comments

Bill Fischofer Nov. 17, 2015, 1:16 p.m. UTC | #1
This should be marked API-NEXT.

On Tue, Nov 17, 2015 at 12:16 AM, Balasubramanian Manoharan <
bala.manoharan@linaro.org> wrote:

> odp_cls_cos_pool_set() api is used to configure packet pool to CoS.

> The packets arriving at the CoS is allocated from the configured pool

>

> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>

> ---

>  include/odp/api/classification.h | 27 +++++++++++++++++++++++++++

>  1 file changed, 27 insertions(+)

>

> diff --git a/include/odp/api/classification.h

> b/include/odp/api/classification.h

> index 380d91b..bb52c10 100644

> --- a/include/odp/api/classification.h

> +++ b/include/odp/api/classification.h

> @@ -379,6 +379,33 @@ int odp_pktio_pmr_match_set_cos(odp_pmr_set_t

> pmr_set_id, odp_pktio_t src_pktio,

>                                 odp_cos_t dst_cos);

>

>  /**

> +* Assigns a packet buffer pool for a specific Class of service.

> +* All the packets belonging to the given class of service will

> +* be allocated from the assigned packet pool.

> +*

> +* @param       cos_id  class-of-service handle

> +* @param       pool_id Packet buffer pool handle

> +*

> +* @return      0 on success

> +* @return      <0 on failure

> +*

> +* @note                The packet pool associated with CoS will supersede

> +*              the packet pool associated with the pktio interface

> +*/

> +int odp_cls_cos_pool_set(odp_cos_t cos_id, odp_pool_t pool_id);

> +

> +/**

> +* Get the pool associated with the given class of service

> +*

> +* @param       cos_id  class-of-service handle

> +*

> +* @retval      pool handle of the associated pool

> +* @retval      ODP_POO_INVALID in case of failure

> +*

> +*/

> +odp_pool_t odp_cls_cos_pool(odp_cos_t cos_id);

> +

> +/**

>   * Get printable value for an odp_cos_t

>   *

>   * @param hdl  odp_cos_t handle to be printed

> --

> 1.9.1

>

> _______________________________________________

> lng-odp mailing list

> lng-odp@lists.linaro.org

> https://lists.linaro.org/mailman/listinfo/lng-odp

>
Balasubramanian Manoharan Nov. 17, 2015, 1:35 p.m. UTC | #2
Thanks for pointing out.
Will update in the next version.

Regards,
Bala

On 17 November 2015 at 18:46, Bill Fischofer <bill.fischofer@linaro.org> wrote:
> This should be marked API-NEXT.
>
> On Tue, Nov 17, 2015 at 12:16 AM, Balasubramanian Manoharan
> <bala.manoharan@linaro.org> wrote:
>>
>> odp_cls_cos_pool_set() api is used to configure packet pool to CoS.
>> The packets arriving at the CoS is allocated from the configured pool
>>
>> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
>> ---
>>  include/odp/api/classification.h | 27 +++++++++++++++++++++++++++
>>  1 file changed, 27 insertions(+)
>>
>> diff --git a/include/odp/api/classification.h
>> b/include/odp/api/classification.h
>> index 380d91b..bb52c10 100644
>> --- a/include/odp/api/classification.h
>> +++ b/include/odp/api/classification.h
>> @@ -379,6 +379,33 @@ int odp_pktio_pmr_match_set_cos(odp_pmr_set_t
>> pmr_set_id, odp_pktio_t src_pktio,
>>                                 odp_cos_t dst_cos);
>>
>>  /**
>> +* Assigns a packet buffer pool for a specific Class of service.
>> +* All the packets belonging to the given class of service will
>> +* be allocated from the assigned packet pool.
>> +*
>> +* @param       cos_id  class-of-service handle
>> +* @param       pool_id Packet buffer pool handle
>> +*
>> +* @return      0 on success
>> +* @return      <0 on failure
>> +*
>> +* @note                The packet pool associated with CoS will supersede
>> +*              the packet pool associated with the pktio interface
>> +*/
>> +int odp_cls_cos_pool_set(odp_cos_t cos_id, odp_pool_t pool_id);
>> +
>> +/**
>> +* Get the pool associated with the given class of service
>> +*
>> +* @param       cos_id  class-of-service handle
>> +*
>> +* @retval      pool handle of the associated pool
>> +* @retval      ODP_POO_INVALID in case of failure
>> +*
>> +*/
>> +odp_pool_t odp_cls_cos_pool(odp_cos_t cos_id);
>> +
>> +/**
>>   * Get printable value for an odp_cos_t
>>   *
>>   * @param hdl  odp_cos_t handle to be printed
>> --
>> 1.9.1
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
Stuart Haslam Nov. 19, 2015, 11:05 a.m. UTC | #3
On Tue, Nov 17, 2015 at 11:46:49AM +0530, Balasubramanian Manoharan wrote:
> odp_cls_cos_pool_set() api is used to configure packet pool to CoS.
> The packets arriving at the CoS is allocated from the configured pool
> 
> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
> ---
>  include/odp/api/classification.h | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/include/odp/api/classification.h b/include/odp/api/classification.h
> index 380d91b..bb52c10 100644
> --- a/include/odp/api/classification.h
> +++ b/include/odp/api/classification.h
> @@ -379,6 +379,33 @@ int odp_pktio_pmr_match_set_cos(odp_pmr_set_t pmr_set_id, odp_pktio_t src_pktio,
>  				odp_cos_t dst_cos);
>  
>  /**
> +* Assigns a packet buffer pool for a specific Class of service.
> +* All the packets belonging to the given class of service will
> +* be allocated from the assigned packet pool.
> +*
> +* @param	cos_id	class-of-service handle
> +* @param	pool_id	Packet buffer pool handle
> +*
> +* @return	0 on success
> +* @return	<0 on failure
> +*
> +* @note		The packet pool associated with CoS will supersede
> +*		the packet pool associated with the pktio interface
> +*/
> +int odp_cls_cos_pool_set(odp_cos_t cos_id, odp_pool_t pool_id);
> +
> +/**
> +* Get the pool associated with the given class of service
> +*
> +* @param	cos_id	class-of-service handle
> +*
> +* @retval	pool handle of the associated pool
> +* @retval	ODP_POO_INVALID	in case of failure

ODP_POOL_INVALID

if no pool associated or a failure occurred

> +*
> +*/
> +odp_pool_t odp_cls_cos_pool(odp_cos_t cos_id);
> +
> +/**
>   * Get printable value for an odp_cos_t
>   *
>   * @param hdl  odp_cos_t handle to be printed
> -- 
> 1.9.1
>
diff mbox

Patch

diff --git a/include/odp/api/classification.h b/include/odp/api/classification.h
index 380d91b..bb52c10 100644
--- a/include/odp/api/classification.h
+++ b/include/odp/api/classification.h
@@ -379,6 +379,33 @@  int odp_pktio_pmr_match_set_cos(odp_pmr_set_t pmr_set_id, odp_pktio_t src_pktio,
 				odp_cos_t dst_cos);
 
 /**
+* Assigns a packet buffer pool for a specific Class of service.
+* All the packets belonging to the given class of service will
+* be allocated from the assigned packet pool.
+*
+* @param	cos_id	class-of-service handle
+* @param	pool_id	Packet buffer pool handle
+*
+* @return	0 on success
+* @return	<0 on failure
+*
+* @note		The packet pool associated with CoS will supersede
+*		the packet pool associated with the pktio interface
+*/
+int odp_cls_cos_pool_set(odp_cos_t cos_id, odp_pool_t pool_id);
+
+/**
+* Get the pool associated with the given class of service
+*
+* @param	cos_id	class-of-service handle
+*
+* @retval	pool handle of the associated pool
+* @retval	ODP_POO_INVALID	in case of failure
+*
+*/
+odp_pool_t odp_cls_cos_pool(odp_cos_t cos_id);
+
+/**
  * Get printable value for an odp_cos_t
  *
  * @param hdl  odp_cos_t handle to be printed