diff options
author | Petri Savolainen <petri.savolainen@nokia.com> | 2022-10-28 17:43:21 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2022-12-02 17:11:00 +0200 |
commit | 79f3932daa0b04815441790a9a0b4d4cb2e621aa (patch) | |
tree | 718414a1133a134cc02b4a96e9c1110c10a257df /test | |
parent | d3485f67b0f67d1be47baade21240c8adece5921 (diff) |
api: cls: deprecate drop policy
Classifier drop policy option is not well defined and does not
relate to other API features.
Signed-off-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
Diffstat (limited to 'test')
3 files changed, 50 insertions, 0 deletions
diff --git a/test/validation/api/classification/odp_classification_basic.c b/test/validation/api/classification/odp_classification_basic.c index f914ea2ec..f7aa96e52 100644 --- a/test/validation/api/classification/odp_classification_basic.c +++ b/test/validation/api/classification/odp_classification_basic.c @@ -53,7 +53,9 @@ static void classification_test_create_cos(void) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool; cls_param.queue = queue; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif cos = odp_cls_cos_create(NULL, &cls_param); CU_ASSERT(odp_cos_to_u64(cos) != odp_cos_to_u64(ODP_COS_INVALID)); @@ -124,7 +126,9 @@ static void classification_test_destroy_cos(void) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool; cls_param.queue = queue; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif cos = odp_cls_cos_create(name, &cls_param); CU_ASSERT_FATAL(cos != ODP_COS_INVALID); @@ -172,7 +176,9 @@ static void classification_test_create_pmr_match(void) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool; cls_param.queue = queue; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif cos = odp_cls_cos_create("pmr_match", &cls_param); CU_ASSERT(cos != ODP_COS_INVALID); @@ -229,7 +235,9 @@ static void classification_test_cos_set_queue(void) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool; cls_param.queue = queue; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif cos_queue = odp_cls_cos_create(cosname, &cls_param); CU_ASSERT_FATAL(cos_queue != ODP_COS_INVALID); @@ -271,7 +279,9 @@ static void classification_test_cos_set_pool(void) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool; cls_param.queue = queue; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif cos = odp_cls_cos_create(cosname, &cls_param); CU_ASSERT_FATAL(cos != ODP_COS_INVALID); @@ -289,6 +299,8 @@ static void classification_test_cos_set_pool(void) odp_pool_destroy(cos_pool); } +#if ODP_DEPRECATED_API + static void classification_test_cos_set_drop(void) { int retval; @@ -324,6 +336,8 @@ static void classification_test_cos_set_drop(void) odp_queue_destroy(queue); } +#endif + static void classification_test_pmr_composite_create(void) { odp_pmr_t pmr_composite; @@ -360,7 +374,9 @@ static void classification_test_pmr_composite_create(void) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool; cls_param.queue = queue; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif cos = odp_cls_cos_create("pmr_match", &cls_param); CU_ASSERT(cos != ODP_COS_INVALID); @@ -446,7 +462,9 @@ odp_testinfo_t classification_suite_basic[] = { ODP_TEST_INFO(classification_test_destroy_cos), ODP_TEST_INFO(classification_test_create_pmr_match), ODP_TEST_INFO(classification_test_cos_set_queue), +#if ODP_DEPRECATED_API ODP_TEST_INFO(classification_test_cos_set_drop), +#endif ODP_TEST_INFO(classification_test_cos_set_pool), ODP_TEST_INFO(classification_test_pmr_composite_create), ODP_TEST_INFO_CONDITIONAL(classification_test_create_cos_with_hash_queues, diff --git a/test/validation/api/classification/odp_classification_test_pmr.c b/test/validation/api/classification/odp_classification_test_pmr.c index 280e525af..0b29783c0 100644 --- a/test/validation/api/classification/odp_classification_test_pmr.c +++ b/test/validation/api/classification/odp_classification_test_pmr.c @@ -77,7 +77,9 @@ void configure_default_cos(odp_pktio_t pktio, odp_cos_t *cos, odp_cls_cos_param_init(&cls_param); cls_param.pool = default_pool; cls_param.queue = default_queue; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif default_cos = odp_cls_cos_create(cosname, &cls_param); CU_ASSERT(default_cos != ODP_COS_INVALID); @@ -151,7 +153,9 @@ static void classification_test_pktin_classifier_flag(void) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool; cls_param.queue = queue; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif cos = odp_cls_cos_create(cosname, &cls_param); CU_ASSERT(cos != ODP_COS_INVALID); @@ -245,7 +249,9 @@ static void _classification_test_pmr_term_tcp_dport(int num_pkt) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool; cls_param.queue = queue; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif cos = odp_cls_cos_create(cosname, &cls_param); CU_ASSERT(cos != ODP_COS_INVALID); @@ -418,7 +424,9 @@ static void test_pmr(const odp_pmr_param_t *pmr_param, odp_packet_t pkt, odp_cls_cos_param_init(&cls_param); cls_param.pool = pool; cls_param.queue = queue; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif cos = odp_cls_cos_create("PMR test cos", &cls_param); CU_ASSERT_FATAL(cos != ODP_COS_INVALID); @@ -689,7 +697,9 @@ static void classification_test_pmr_term_dmac(void) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool; cls_param.queue = queue; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif cos = odp_cls_cos_create(cosname, &cls_param); CU_ASSERT_FATAL(cos != ODP_COS_INVALID); @@ -1027,7 +1037,9 @@ static void classification_test_pmr_pool_set(void) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool; cls_param.queue = queue; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif cos = odp_cls_cos_create(cosname, &cls_param); CU_ASSERT_FATAL(cos != ODP_COS_INVALID); @@ -1126,7 +1138,9 @@ static void classification_test_pmr_queue_set(void) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool; cls_param.queue = queue; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif cos = odp_cls_cos_create(cosname, &cls_param); CU_ASSERT_FATAL(cos != ODP_COS_INVALID); @@ -1427,7 +1441,9 @@ static void test_pmr_series(const int num_udp, int marking) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool; cls_param.queue = queue_ip; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif cos_ip = odp_cls_cos_create("cos_ip", &cls_param); CU_ASSERT_FATAL(cos_ip != ODP_COS_INVALID); @@ -1469,7 +1485,9 @@ static void test_pmr_series(const int num_udp, int marking) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool; cls_param.queue = queue_udp[i]; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif cos_udp[i] = odp_cls_cos_create(name, &cls_param); CU_ASSERT_FATAL(cos_udp[i] != ODP_COS_INVALID); diff --git a/test/validation/api/classification/odp_classification_tests.c b/test/validation/api/classification/odp_classification_tests.c index 4511fc1d7..68b3e5cd0 100644 --- a/test/validation/api/classification/odp_classification_tests.c +++ b/test/validation/api/classification/odp_classification_tests.c @@ -259,7 +259,9 @@ void configure_cls_pmr_chain(odp_bool_t enable_pktv) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool_list[CLS_PMR_CHAIN_SRC]; cls_param.queue = queue_list[CLS_PMR_CHAIN_SRC]; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif if (enable_pktv) { cls_param.vector.enable = true; @@ -289,7 +291,9 @@ void configure_cls_pmr_chain(odp_bool_t enable_pktv) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool_list[CLS_PMR_CHAIN_DST]; cls_param.queue = queue_list[CLS_PMR_CHAIN_DST]; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif if (enable_pktv) { cls_param.vector.enable = true; @@ -409,7 +413,9 @@ void configure_pktio_default_cos(odp_bool_t enable_pktv) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool_list[CLS_DEFAULT]; cls_param.queue = queue_list[CLS_DEFAULT]; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif if (enable_pktv) { cls_param.vector.enable = true; @@ -623,7 +629,9 @@ void configure_pktio_error_cos(odp_bool_t enable_pktv) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool_list[CLS_ERROR]; cls_param.queue = queue_list[CLS_ERROR]; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif if (enable_pktv) { cls_param.vector.enable = true; @@ -742,7 +750,9 @@ void configure_cos_with_l2_priority(odp_bool_t enable_pktv) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool; cls_param.queue = queue_tbl[i]; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif if (enable_pktv) { cls_param.vector.enable = true; @@ -827,7 +837,9 @@ void configure_pmr_cos(odp_bool_t enable_pktv) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool_list[CLS_PMR]; cls_param.queue = queue_list[CLS_PMR]; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif if (enable_pktv) { cls_param.vector.enable = true; @@ -910,7 +922,9 @@ void configure_pktio_pmr_composite(odp_bool_t enable_pktv) odp_cls_cos_param_init(&cls_param); cls_param.pool = pool_list[CLS_PMR_SET]; cls_param.queue = queue_list[CLS_PMR_SET]; +#if ODP_DEPRECATED_API cls_param.drop_policy = ODP_COS_DROP_POOL; +#endif if (enable_pktv) { cls_param.vector.enable = true; |