diff mbox

[RFC/API-NEXT] api: assigning packet pool per class of service

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

Commit Message

Balasubramanian Manoharan July 24, 2015, 10:51 a.m. UTC
This API proposal links a packet pool to a CoS and the packets belonging
to this CoS will be allocated from this packet pool.
This packet pool belonging to the CoS will supersede the packet pool
associated with the pktio interface.

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

Comments

Ivan Khoronzhuk July 24, 2015, 11:52 a.m. UTC | #1
I though it's already in API :),
Only now realized that it was only in local tree.
I think it's "must have" feature.

On 24.07.15 13:51, Balasubramanian Manoharan wrote:
>
> This API proposal links a packet pool to a CoS and the packets belonging
> to this CoS will be allocated from this packet pool.
> This packet pool belonging to the CoS will supersede the packet pool
> associated with the pktio interface.
>
> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
> ---
>   include/odp/api/classification.h | 16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
>
> diff --git a/include/odp/api/classification.h b/include/odp/api/classification.h
> index f597b26..7a47021 100644
> --- a/include/odp/api/classification.h
> +++ b/include/odp/api/classification.h
> @@ -358,6 +358,22 @@ 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_cos_set_pool(odp_cos_t cos_id, odp_pool_t pool_id);
> +
> +/**
>    * Get printable value for an odp_cos_t
>    *
>    * @param hdl  odp_cos_t handle to be printed
>
Bill Fischofer July 24, 2015, 12:08 p.m. UTC | #2
For consistency with ODP naming conventions there should be a standard
getter/setter for this information that have the following signatures:

odp_pool_t  odp_cos_pool(odp_cos_t cos);

and

int odp_cos_pool_set(odp_cos_t cos, odp_pool_t pool);

And while we're at it, we should make the rest of the classifier APIs
consistent with the rest of ODP:

odp_cos_set_queue() --> odp_cos_queue()/odp_cos_queue_set()

odp_cos_set_drop() --> odp_cos_drop()/odp_cos_drop_set()




On Fri, Jul 24, 2015 at 6:52 AM, Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org
> wrote:

> I though it's already in API :),
> Only now realized that it was only in local tree.
> I think it's "must have" feature.
>
> On 24.07.15 13:51, Balasubramanian Manoharan wrote:
>
>>
>> This API proposal links a packet pool to a CoS and the packets belonging
>> to this CoS will be allocated from this packet pool.
>> This packet pool belonging to the CoS will supersede the packet pool
>> associated with the pktio interface.
>>
>> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
>>
>> ---
>>   include/odp/api/classification.h | 16 ++++++++++++++++
>>   1 file changed, 16 insertions(+)
>>
>> diff --git a/include/odp/api/classification.h
>> b/include/odp/api/classification.h
>> index f597b26..7a47021 100644
>> --- a/include/odp/api/classification.h
>> +++ b/include/odp/api/classification.h
>> @@ -358,6 +358,22 @@ 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_cos_set_pool(odp_cos_t cos_id, odp_pool_t pool_id);
>> +
>> +/**
>>    * Get printable value for an odp_cos_t
>>    *
>>    * @param hdl  odp_cos_t handle to be printed
>>
>>
> --
> Regards,
> Ivan Khoronzhuk
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
Balasubramanian Manoharan July 24, 2015, 1:14 p.m. UTC | #3
Agreed. Please raise a BUG against me on this topic and I will send a patch
to change them.

Regards,
Bala

On 24 July 2015 at 17:38, Bill Fischofer <bill.fischofer@linaro.org> wrote:

> For consistency with ODP naming conventions there should be a standard
> getter/setter for this information that have the following signatures:
>
> odp_pool_t  odp_cos_pool(odp_cos_t cos);
>
> and
>
> int odp_cos_pool_set(odp_cos_t cos, odp_pool_t pool);
>
> And while we're at it, we should make the rest of the classifier APIs
> consistent with the rest of ODP:
>
> odp_cos_set_queue() --> odp_cos_queue()/odp_cos_queue_set()
>
> odp_cos_set_drop() --> odp_cos_drop()/odp_cos_drop_set()
>
>
>
>
> On Fri, Jul 24, 2015 at 6:52 AM, Ivan Khoronzhuk <
> ivan.khoronzhuk@linaro.org> wrote:
>
>> I though it's already in API :),
>> Only now realized that it was only in local tree.
>> I think it's "must have" feature.
>>
>> On 24.07.15 13:51, Balasubramanian Manoharan wrote:
>>
>>>
>>> This API proposal links a packet pool to a CoS and the packets belonging
>>> to this CoS will be allocated from this packet pool.
>>> This packet pool belonging to the CoS will supersede the packet pool
>>> associated with the pktio interface.
>>>
>>> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
>>>
>>> ---
>>>   include/odp/api/classification.h | 16 ++++++++++++++++
>>>   1 file changed, 16 insertions(+)
>>>
>>> diff --git a/include/odp/api/classification.h
>>> b/include/odp/api/classification.h
>>> index f597b26..7a47021 100644
>>> --- a/include/odp/api/classification.h
>>> +++ b/include/odp/api/classification.h
>>> @@ -358,6 +358,22 @@ 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_cos_set_pool(odp_cos_t cos_id, odp_pool_t pool_id);
>>> +
>>> +/**
>>>    * Get printable value for an odp_cos_t
>>>    *
>>>    * @param hdl  odp_cos_t handle to be printed
>>>
>>>
>> --
>> Regards,
>> Ivan Khoronzhuk
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
>
Bill Fischofer July 24, 2015, 1:28 p.m. UTC | #4
Bug 1171 opened to track this.  Thanks.

On Fri, Jul 24, 2015 at 8:14 AM, Bala Manoharan <bala.manoharan@linaro.org>
wrote:

> Agreed. Please raise a BUG against me on this topic and I will send a
> patch to change them.
>
> Regards,
> Bala
>
> On 24 July 2015 at 17:38, Bill Fischofer <bill.fischofer@linaro.org>
> wrote:
>
>> For consistency with ODP naming conventions there should be a standard
>> getter/setter for this information that have the following signatures:
>>
>> odp_pool_t  odp_cos_pool(odp_cos_t cos);
>>
>> and
>>
>> int odp_cos_pool_set(odp_cos_t cos, odp_pool_t pool);
>>
>> And while we're at it, we should make the rest of the classifier APIs
>> consistent with the rest of ODP:
>>
>> odp_cos_set_queue() --> odp_cos_queue()/odp_cos_queue_set()
>>
>> odp_cos_set_drop() --> odp_cos_drop()/odp_cos_drop_set()
>>
>>
>>
>>
>> On Fri, Jul 24, 2015 at 6:52 AM, Ivan Khoronzhuk <
>> ivan.khoronzhuk@linaro.org> wrote:
>>
>>> I though it's already in API :),
>>> Only now realized that it was only in local tree.
>>> I think it's "must have" feature.
>>>
>>> On 24.07.15 13:51, Balasubramanian Manoharan wrote:
>>>
>>>>
>>>> This API proposal links a packet pool to a CoS and the packets belonging
>>>> to this CoS will be allocated from this packet pool.
>>>> This packet pool belonging to the CoS will supersede the packet pool
>>>> associated with the pktio interface.
>>>>
>>>> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
>>>>
>>>> ---
>>>>   include/odp/api/classification.h | 16 ++++++++++++++++
>>>>   1 file changed, 16 insertions(+)
>>>>
>>>> diff --git a/include/odp/api/classification.h
>>>> b/include/odp/api/classification.h
>>>> index f597b26..7a47021 100644
>>>> --- a/include/odp/api/classification.h
>>>> +++ b/include/odp/api/classification.h
>>>> @@ -358,6 +358,22 @@ 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_cos_set_pool(odp_cos_t cos_id, odp_pool_t pool_id);
>>>> +
>>>> +/**
>>>>    * Get printable value for an odp_cos_t
>>>>    *
>>>>    * @param hdl  odp_cos_t handle to be printed
>>>>
>>>>
>>> --
>>> Regards,
>>> Ivan Khoronzhuk
>>> _______________________________________________
>>> lng-odp mailing list
>>> lng-odp@lists.linaro.org
>>> https://lists.linaro.org/mailman/listinfo/lng-odp
>>>
>>
>>
>
diff mbox

Patch

diff --git a/include/odp/api/classification.h b/include/odp/api/classification.h
index f597b26..7a47021 100644
--- a/include/odp/api/classification.h
+++ b/include/odp/api/classification.h
@@ -358,6 +358,22 @@  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_cos_set_pool(odp_cos_t cos_id, odp_pool_t pool_id);
+
+/**
  * Get printable value for an odp_cos_t
  *
  * @param hdl  odp_cos_t handle to be printed