diff mbox

[PATCH/API-NEXT,1/3] api: traffic_mngr: Add pktio interface to odp_tm_egress_t struct

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

Commit Message

Balasubramanian Manoharan June 20, 2016, 11:01 a.m. UTC
Replaces pktio interface as input to TM system instead of
odp_pktout_queue_t.This creates an 1 to 1 mapping between a TM system
and pktio interface.

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

Comments

Mike Holmes June 20, 2016, 12:32 p.m. UTC | #1
Bala, why is this a good idea  ?
On Jun 20, 2016 1:02 PM, "Balasubramanian Manoharan" <
bala.manoharan@linaro.org> wrote:

> Replaces pktio interface as input to TM system instead of
> odp_pktout_queue_t.This creates an 1 to 1 mapping between a TM system
> and pktio interface.
>
> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
> ---
>  include/odp/api/spec/traffic_mngr.h | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/include/odp/api/spec/traffic_mngr.h
> b/include/odp/api/spec/traffic_mngr.h
> index 83b89e7..8c4be4b 100644
> --- a/include/odp/api/spec/traffic_mngr.h
> +++ b/include/odp/api/spec/traffic_mngr.h
> @@ -280,6 +280,12 @@ typedef struct {
>          * expected to do. */
>         odp_bool_t tm_queue_shaper_supported;
>
> +       /** egress_fcn_supported indicates whether the tm system supports
> +       * egress function. It is an optional features used to receive the
> +       * packet from the tm system and its performance might be limited.
> +       */
> +       odp_bool_t egress_fcn_supported;
> +
>         /** tm_queue_wred_supported indicates that the tm_queues support
> some
>          * form of Random Early Detection. */
>         odp_bool_t tm_queue_wred_supported;
> @@ -467,7 +473,7 @@ typedef struct {
>         odp_tm_egress_kind_t egress_kind; /**< Union discriminator */
>
>         union {
> -               odp_pktout_queue_t pktout;
> +               odp_pktio_t pktio;
>                 odp_tm_egress_fcn_t egress_fcn;
>         };
>  } odp_tm_egress_t;
> --
> 1.9.1
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
Balasubramanian Manoharan June 20, 2016, 1:56 p.m. UTC | #2
Hi,

In the existing TM api the odp_pktout_queue_t is given as input
parameter by the application to configure a TM system, the following
are the drawback of this approach,

1). A TM system is configured per pktio interface and not pktout queue
within an interface.
2). With the existing approach the pktout queue has to be configured
by the application before configuring a TM system and it opens the
possibility of a single pktio interface having both TM system and a
output queue whereas most HW support either TM or queue mode per pktio
interface.
2). Since during pktio open the application opens the pktio interface
in one of the following modes ODP_PKTOUT_MODE_QUEUE or
ODP_PKTOUT_MODE_TM the existing approach creates a discrepancy.

Regards,
Bala


On 20 June 2016 at 18:02, Mike Holmes <mike.holmes@linaro.org> wrote:
> Bala, why is this a good idea  ?
>
> On Jun 20, 2016 1:02 PM, "Balasubramanian Manoharan"
> <bala.manoharan@linaro.org> wrote:
>>
>> Replaces pktio interface as input to TM system instead of
>> odp_pktout_queue_t.This creates an 1 to 1 mapping between a TM system
>> and pktio interface.
>>
>> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
>> ---
>>  include/odp/api/spec/traffic_mngr.h | 8 +++++++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/odp/api/spec/traffic_mngr.h
>> b/include/odp/api/spec/traffic_mngr.h
>> index 83b89e7..8c4be4b 100644
>> --- a/include/odp/api/spec/traffic_mngr.h
>> +++ b/include/odp/api/spec/traffic_mngr.h
>> @@ -280,6 +280,12 @@ typedef struct {
>>          * expected to do. */
>>         odp_bool_t tm_queue_shaper_supported;
>>
>> +       /** egress_fcn_supported indicates whether the tm system supports
>> +       * egress function. It is an optional features used to receive the
>> +       * packet from the tm system and its performance might be limited.
>> +       */
>> +       odp_bool_t egress_fcn_supported;
>> +
>>         /** tm_queue_wred_supported indicates that the tm_queues support
>> some
>>          * form of Random Early Detection. */
>>         odp_bool_t tm_queue_wred_supported;
>> @@ -467,7 +473,7 @@ typedef struct {
>>         odp_tm_egress_kind_t egress_kind; /**< Union discriminator */
>>
>>         union {
>> -               odp_pktout_queue_t pktout;
>> +               odp_pktio_t pktio;
>>                 odp_tm_egress_fcn_t egress_fcn;
>>         };
>>  } odp_tm_egress_t;
>> --
>> 1.9.1
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
Balasubramanian Manoharan June 23, 2016, 11:09 a.m. UTC | #3
Regards,
Bala


On 23 June 2016 at 16:13, Savolainen, Petri (Nokia - FI/Espoo)
<petri.savolainen@nokia-bell-labs.com> wrote:
>
>
>> -----Original Message-----
>> From: Balasubramanian Manoharan [mailto:bala.manoharan@linaro.org]
>> Sent: Monday, June 20, 2016 2:02 PM
>> To: lng-odp@lists.linaro.org
>> Cc: spinney@mellanox.com; Savolainen, Petri (Nokia - FI/Espoo)
>> <petri.savolainen@nokia-bell-labs.com>; Balasubramanian Manoharan
>> <bala.manoharan@linaro.org>
>> Subject: [PATCH/API-NEXT 1/3] api: traffic_mngr: Add pktio interface to
>> odp_tm_egress_t struct
>>
>> Replaces pktio interface as input to TM system instead of
>> odp_pktout_queue_t.This creates an 1 to 1 mapping between a TM system
>> and pktio interface.
>>
>> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
>> ---
>>  include/odp/api/spec/traffic_mngr.h | 8 +++++++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/odp/api/spec/traffic_mngr.h
>> b/include/odp/api/spec/traffic_mngr.h
>> index 83b89e7..8c4be4b 100644
>> --- a/include/odp/api/spec/traffic_mngr.h
>> +++ b/include/odp/api/spec/traffic_mngr.h
>> @@ -280,6 +280,12 @@ typedef struct {
>>        * expected to do. */
>>       odp_bool_t tm_queue_shaper_supported;
>>
>> +     /** egress_fcn_supported indicates whether the tm system supports
>> +     * egress function. It is an optional features used to receive the
>
> Typo: features -> feature
>
>
>> +     * packet from the tm system and its performance might be limited.
>> +     */
>> +     odp_bool_t egress_fcn_supported;
>
> This new _supported flag would fit better e.g. just after "max_levels". This patch locates it between "tm_queue_shaper_supported" and "tm_queue_wred_supported", which is not logical (between tm_queue_xxx_supported flags).

Agreed.
>
>
> Also all three patches should be squashed into one, since it's not a backwards compatible change and build fails if e.g. only this first patch is applied.

Yes this can be done. I kept the header file changes as separate patch
for ease of review.
I will merge them as single patch in next version.

Regards,
Bala
>
>
> -Petri
diff mbox

Patch

diff --git a/include/odp/api/spec/traffic_mngr.h b/include/odp/api/spec/traffic_mngr.h
index 83b89e7..8c4be4b 100644
--- a/include/odp/api/spec/traffic_mngr.h
+++ b/include/odp/api/spec/traffic_mngr.h
@@ -280,6 +280,12 @@  typedef struct {
 	 * expected to do. */
 	odp_bool_t tm_queue_shaper_supported;
 
+	/** egress_fcn_supported indicates whether the tm system supports
+	* egress function. It is an optional features used to receive the
+	* packet from the tm system and its performance might be limited.
+	*/
+	odp_bool_t egress_fcn_supported;
+
 	/** tm_queue_wred_supported indicates that the tm_queues support some
 	 * form of Random Early Detection. */
 	odp_bool_t tm_queue_wred_supported;
@@ -467,7 +473,7 @@  typedef struct {
 	odp_tm_egress_kind_t egress_kind; /**< Union discriminator */
 
 	union {
-		odp_pktout_queue_t pktout;
+		odp_pktio_t pktio;
 		odp_tm_egress_fcn_t egress_fcn;
 	};
 } odp_tm_egress_t;