diff mbox

[API-NEXT,PATCHv1,3/3] validation: remove test case for odp_pmr_create_range() function

Message ID 1428661592-18311-3-git-send-email-bala.manoharan@linaro.org
State New
Headers show

Commit Message

Balasubramanian Manoharan April 10, 2015, 10:26 a.m. UTC
From: Balasubramanian Manoharan <bala.manoharan@linaro.org>

This patch removes the validation suite test case for odp_pmr_create_range() function.

Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
---
 .../classification/odp_classification_basic.c      | 37 ++++++----------------
 .../classification/odp_classification_tests.c      | 32 ++++++++-----------
 2 files changed, 24 insertions(+), 45 deletions(-)
diff mbox

Patch

diff --git a/test/validation/classification/odp_classification_basic.c b/test/validation/classification/odp_classification_basic.c
index 2d4c2ac..b327e35 100644
--- a/test/validation/classification/odp_classification_basic.c
+++ b/test/validation/classification/odp_classification_basic.c
@@ -40,21 +40,7 @@  static void classification_create_pmr_match(void)
 	uint16_t mask;
 	val = 1024;
 	mask = 0xffff;
-	pmr = odp_pmr_create_match(ODP_PMR_TCP_SPORT, &val, &mask, sizeof(val));
-	CU_ASSERT(pmr != ODP_PMR_INVAL);
-	CU_ASSERT(odp_pmr_to_u64(pmr) != odp_pmr_to_u64(ODP_PMR_INVAL));
-	odp_pmr_destroy(pmr);
-}
-
-static void classification_create_pmr_range(void)
-{
-	odp_pmr_t pmr;
-	uint16_t val1;
-	uint16_t val2;
-	val1 = 1024;
-	val2 = 2048;
-	pmr = odp_pmr_create_range(ODP_PMR_TCP_SPORT, &val1,
-				   &val2, sizeof(val1));
+	pmr = odp_pmr_create(ODP_PMR_TCP_SPORT, &val, &mask, sizeof(val));
 	CU_ASSERT(pmr != ODP_PMR_INVAL);
 	CU_ASSERT(odp_pmr_to_u64(pmr) != odp_pmr_to_u64(ODP_PMR_INVAL));
 	odp_pmr_destroy(pmr);
@@ -68,7 +54,7 @@  static void classification_destroy_pmr(void)
 	int retval;
 	val = 1024;
 	mask = 0xffff;
-	pmr = odp_pmr_create_match(ODP_PMR_TCP_SPORT, &val, &mask, sizeof(val));
+	pmr = odp_pmr_create(ODP_PMR_TCP_SPORT, &val, &mask, sizeof(val));
 	retval = odp_pmr_destroy(pmr);
 	CU_ASSERT(retval == 0);
 	retval = odp_pmr_destroy(ODP_PMR_INVAL);
@@ -126,11 +112,10 @@  static void classification_pmr_match_set_create(void)
 	uint16_t mask = 0xffff;
 	int i;
 	for (i = 0; i < PMR_SET_NUM; i++) {
-		pmr_terms[i].match_type = ODP_PMR_MASK;
-		pmr_terms[i].mask.term = ODP_PMR_TCP_DPORT;
-		pmr_terms[i].mask.val = &val;
-		pmr_terms[i].mask.mask = &mask;
-		pmr_terms[i].mask.val_sz = sizeof(val);
+		pmr_terms[i].term = ODP_PMR_TCP_DPORT;
+		pmr_terms[i].val = &val;
+		pmr_terms[i].mask = &mask;
+		pmr_terms[i].val_sz = sizeof(val);
 	}
 
 	retval = odp_pmr_match_set_create(PMR_SET_NUM, pmr_terms, &pmr_set);
@@ -155,11 +140,10 @@  static void classification_pmr_match_set_destroy(void)
 	CU_ASSERT(retval < 0);
 
 	for (i = 0; i < PMR_SET_NUM; i++) {
-		pmr_terms[i].match_type = ODP_PMR_MASK;
-		pmr_terms[i].mask.term = ODP_PMR_TCP_DPORT;
-		pmr_terms[i].mask.val = &val;
-		pmr_terms[i].mask.mask = &mask;
-		pmr_terms[i].mask.val_sz = sizeof(val);
+		pmr_terms[i].term = ODP_PMR_TCP_DPORT;
+		pmr_terms[i].val = &val;
+		pmr_terms[i].mask = &mask;
+		pmr_terms[i].val_sz = sizeof(val);
 	}
 
 	retval = odp_pmr_match_set_create(PMR_SET_NUM, pmr_terms, &pmr_set);
@@ -173,7 +157,6 @@  CU_TestInfo classification_basic[] = {
 	_CU_TEST_INFO(classification_create_cos),
 	_CU_TEST_INFO(classification_destroy_cos),
 	_CU_TEST_INFO(classification_create_pmr_match),
-	_CU_TEST_INFO(classification_create_pmr_range),
 	_CU_TEST_INFO(classification_destroy_pmr),
 	_CU_TEST_INFO(classification_cos_set_queue),
 	_CU_TEST_INFO(classification_cos_set_drop),
diff --git a/test/validation/classification/odp_classification_tests.c b/test/validation/classification/odp_classification_tests.c
index 0530f99..34b1473 100644
--- a/test/validation/classification/odp_classification_tests.c
+++ b/test/validation/classification/odp_classification_tests.c
@@ -406,16 +406,14 @@  void configure_cls_pmr_chain(void)
 				   queue_list[CLS_PMR_CHAIN_DST]);
 
 	parse_ipv4_string(CLS_PMR_CHAIN_SADDR, &addr, &mask);
-	pmr_list[CLS_PMR_CHAIN_SRC] = odp_pmr_create_match(ODP_PMR_SIP_ADDR,
-							   &addr, &mask,
-							   sizeof(addr));
+	pmr_list[CLS_PMR_CHAIN_SRC] = odp_pmr_create(ODP_PMR_SIP_ADDR, &addr,
+						     &mask, sizeof(addr));
 	CU_ASSERT_FATAL(pmr_list[CLS_PMR_CHAIN_SRC] != ODP_PMR_INVAL);
 
 	val = CLS_PMR_CHAIN_SPORT;
 	maskport = 0xffff;
-	pmr_list[CLS_PMR_CHAIN_DST] = odp_pmr_create_match(ODP_PMR_UDP_SPORT,
-							   &val, &maskport,
-							   sizeof(val));
+	pmr_list[CLS_PMR_CHAIN_DST] = odp_pmr_create(ODP_PMR_UDP_SPORT, &val,
+						     &maskport, sizeof(val));
 	CU_ASSERT_FATAL(pmr_list[CLS_PMR_CHAIN_DST] != ODP_PMR_INVAL);
 
 	retval = odp_pktio_pmr_cos(pmr_list[CLS_PMR_CHAIN_SRC], pktio_loop,
@@ -668,8 +666,8 @@  void configure_pmr_cos(void)
 	char cosname[ODP_COS_NAME_LEN];
 	char queuename[ODP_QUEUE_NAME_LEN];
 
-	pmr_list[CLS_PMR] = odp_pmr_create_match(ODP_PMR_UDP_SPORT, &val,
-						 &mask, sizeof(val));
+	pmr_list[CLS_PMR] = odp_pmr_create(ODP_PMR_UDP_SPORT, &val,
+					   &mask, sizeof(val));
 	CU_ASSERT(pmr_list[CLS_PMR] != ODP_PMR_INVAL);
 
 	sprintf(cosname, "PMR_CoS");
@@ -727,20 +725,18 @@  void configure_pktio_pmr_match_set_cos(void)
 	uint32_t mask;
 
 	parse_ipv4_string(CLS_PMR_SET_SADDR, &addr, &mask);
-	pmr_terms[0].match_type = ODP_PMR_MASK;
-	pmr_terms[0].mask.term = ODP_PMR_SIP_ADDR;
-	pmr_terms[0].mask.val = &addr;
-	pmr_terms[0].mask.mask = &mask;
-	pmr_terms[0].mask.val_sz = sizeof(addr);
+	pmr_terms[0].term = ODP_PMR_SIP_ADDR;
+	pmr_terms[0].val = &addr;
+	pmr_terms[0].mask = &mask;
+	pmr_terms[0].val_sz = sizeof(addr);
 
 
 	val = CLS_PMR_SET_SPORT;
 	maskport = 0xffff;
-	pmr_terms[1].match_type = ODP_PMR_MASK;
-	pmr_terms[1].mask.term = ODP_PMR_UDP_SPORT;
-	pmr_terms[1].mask.val = &val;
-	pmr_terms[1].mask.mask = &maskport;
-	pmr_terms[1].mask.val_sz = sizeof(val);
+	pmr_terms[1].term = ODP_PMR_UDP_SPORT;
+	pmr_terms[1].val = &val;
+	pmr_terms[1].mask = &maskport;
+	pmr_terms[1].val_sz = sizeof(val);
 
 	retval = odp_pmr_match_set_create(num_terms, pmr_terms, &pmr_set);
 	CU_ASSERT(retval > 0);