@@ -393,6 +393,7 @@ static void configure_cos(odp_cos_t default_cos, appl_args_t *args)
char pool_name[ODP_POOL_NAME_LEN];
odp_pool_param_t pool_params;
odp_cls_cos_param_t cls_param;
+ odp_pmr_param_t pmr_param;
int i;
global_statistics *stats;
odp_queue_param_t qparam;
@@ -438,15 +439,14 @@ static void configure_cos(odp_cos_t default_cos, appl_args_t *args)
cls_param.drop_policy = ODP_COS_DROP_POOL;
stats->cos = odp_cls_cos_create(cos_name, &cls_param);
- const odp_pmr_match_t match = {
- .term = stats->rule.term,
- .val = &stats->rule.val,
- .mask = &stats->rule.mask,
- .val_sz = stats->rule.val_sz,
- .offset = stats->rule.offset
- };
+ odp_cls_pmr_param_init(&pmr_param);
+ pmr_param.term = stats->rule.term;
+ pmr_param.match.value = &stats->rule.val;
+ pmr_param.match.mask = &stats->rule.mask;
+ pmr_param.val_sz = stats->rule.val_sz;
+ pmr_param.offset = stats->rule.offset;
- stats->pmr = odp_cls_pmr_create(&match, 1, default_cos,
+ stats->pmr = odp_cls_pmr_create(&pmr_param, 1, default_cos,
stats->cos);
if (stats->pmr == ODP_PMR_INVAL) {
EXAMPLE_ERR("odp_pktio_pmr_cos failed");
Modifies the classifier example to support classification capability and PMR range funcionality. Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> --- example/classifier/odp_classifier.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)