Message ID | 1461587516-22980-1-git-send-email-bala.manoharan@linaro.org |
---|---|
State | New |
Headers | show |
Regards, Bala On 15 September 2016 at 11:18, Radosław Biernacki <rad@semihalf.com> wrote: > Hi > > I cannot find this patch either next nor api-next, so I assume that it was > not accepted yet. > > > 2016-04-25 14:31 GMT+02:00 Balasubramanian Manoharan > <bala.manoharan@linaro.org>: >> >> Adds queue group to classification >> >> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> >> --- >> include/odp/api/spec/classification.h | 19 ++++++++++++++++++- >> 1 file changed, 18 insertions(+), 1 deletion(-) >> >> diff --git a/include/odp/api/spec/classification.h >> b/include/odp/api/spec/classification.h >> index 6eca9ab..cf56852 100644 >> --- a/include/odp/api/spec/classification.h >> +++ b/include/odp/api/spec/classification.h >> @@ -126,6 +126,12 @@ typedef struct odp_cls_capability_t { >> >> /** A Boolean to denote support of PMR range */ >> odp_bool_t pmr_range_supported; >> + >> + /** A Boolean to denote support of queue group */ >> + odp_bool_t queue_group_supported; >> + >> + /** A Boolena to denote support of queue */ >> + odp_bool_t queue_supported; >> } odp_cls_capability_t; >> >> /** >> @@ -162,7 +168,18 @@ typedef enum { >> * Used to communicate class of service creation options >> */ >> typedef struct odp_cls_cos_param { >> - odp_queue_t queue; /**< Queue associated with CoS */ >> + /** If True, odp_queue_t is linked with CoS, >> + * if False odp_queue_group_t is linked with CoS. >> + */ >> + odp_bool_t enable_queue; > > > Since this flag defines either queue or queue_gropup field from union will > be used, it might be better to use some enum instead of bool. > Bool is OK for enable/disable flags but may be confusing when used as > selector type. The idea of this RFC was just to focus on the changes required when queue group concept gets introduced. It was kept as a Boolean since there are only two possible values for that can be attached to a CoS either a queue or a queue group. Regards, Bala > >> >> + >> + typedef union { >> + /** Queue associated with CoS */ >> + odp_queue_t queue; >> + >> + /** Queue Group associated with CoS */ >> + odp_queue_group_t queue_group; >> + }; >> odp_pool_t pool; /**< Pool associated with CoS */ >> odp_cls_drop_t drop_policy; /**< Drop policy associated with >> CoS */ >> } odp_cls_cos_param_t; >> -- >> 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/spec/classification.h b/include/odp/api/spec/classification.h index 6eca9ab..cf56852 100644 --- a/include/odp/api/spec/classification.h +++ b/include/odp/api/spec/classification.h @@ -126,6 +126,12 @@ typedef struct odp_cls_capability_t { /** A Boolean to denote support of PMR range */ odp_bool_t pmr_range_supported; + + /** A Boolean to denote support of queue group */ + odp_bool_t queue_group_supported; + + /** A Boolena to denote support of queue */ + odp_bool_t queue_supported; } odp_cls_capability_t; /** @@ -162,7 +168,18 @@ typedef enum { * Used to communicate class of service creation options */ typedef struct odp_cls_cos_param { - odp_queue_t queue; /**< Queue associated with CoS */ + /** If True, odp_queue_t is linked with CoS, + * if False odp_queue_group_t is linked with CoS. + */ + odp_bool_t enable_queue; + + typedef union { + /** Queue associated with CoS */ + odp_queue_t queue; + + /** Queue Group associated with CoS */ + odp_queue_group_t queue_group; + }; odp_pool_t pool; /**< Pool associated with CoS */ odp_cls_drop_t drop_policy; /**< Drop policy associated with CoS */ } odp_cls_cos_param_t;
Adds queue group to classification Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> --- include/odp/api/spec/classification.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)