From patchwork Fri Apr 10 10:26:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 47023 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B8CDE218D9 for ; Fri, 10 Apr 2015 10:27:44 +0000 (UTC) Received: by wgin8 with SMTP id n8sf3109167wgi.0 for ; Fri, 10 Apr 2015 03:27:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=JUV7NdM081Y1ipQZEmDsyF2KwjlA9ydMtzOulj6f6Q8=; b=h3Utya2D4so1pO9DU6NBW5a9aPuQg467ecO0GGqS6sjOxaQ1+oIse603nXBzlJZQYU ExD0OD3/IiG8psYqSDb+/4DPTJ0dU0UJqPDq45xyBbsr7YvL5CT7NQK27u5BfjqAS1U2 IW/JcP5r0Jj35dQnEChdA+g9MFx2S+J1e8FVOFdPEG+APMVJU5fivd1IBNxQZAsep/ag OF/wb+eXnrMJlHD7CUJhXBCKpo2joI1Fkl7wy9Sf4gRsvhP5w1T9iy/daS9y8d24+Btg CLsenQ+RybVqwXNc2XJUoW1aJpaVtv5yiz5rWiLFgE666f+/a5zNkSM+uE2CtVwYXwP2 tqDQ== X-Gm-Message-State: ALoCoQkSPnWOsk0LUMpGGa7ykbkAJL3rlnTqXogtPP+8uU6N/idVRpM8f78f+mlUN+lFEpTbTPGX X-Received: by 10.112.42.236 with SMTP id r12mr202542lbl.2.1428661664013; Fri, 10 Apr 2015 03:27:44 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.229 with SMTP id l5ls353555lab.68.gmail; Fri, 10 Apr 2015 03:27:43 -0700 (PDT) X-Received: by 10.112.119.234 with SMTP id kx10mr808629lbb.35.1428661663820; Fri, 10 Apr 2015 03:27:43 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id mu1si1149365lbc.3.2015.04.10.03.27.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Apr 2015 03:27:43 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by layy10 with SMTP id y10so9978177lay.0 for ; Fri, 10 Apr 2015 03:27:43 -0700 (PDT) X-Received: by 10.112.141.202 with SMTP id rq10mr813749lbb.88.1428661663680; Fri, 10 Apr 2015 03:27:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp998919lbt; Fri, 10 Apr 2015 03:27:43 -0700 (PDT) X-Received: by 10.140.148.81 with SMTP id 78mr873752qhu.36.1428661662277; Fri, 10 Apr 2015 03:27:42 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 6si1377401qhv.48.2015.04.10.03.27.41; Fri, 10 Apr 2015 03:27:42 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Received: by lists.linaro.org (Postfix, from userid 109) id 80CCE650DA; Fri, 10 Apr 2015 10:27:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 8780E64E66; Fri, 10 Apr 2015 10:27:36 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 888236509B; Fri, 10 Apr 2015 10:27:33 +0000 (UTC) Received: from mail-qk0-f175.google.com (mail-qk0-f175.google.com [209.85.220.175]) by lists.linaro.org (Postfix) with ESMTPS id E75D86509B for ; Fri, 10 Apr 2015 10:26:57 +0000 (UTC) Received: by qkgx75 with SMTP id x75so24124595qkg.1 for ; Fri, 10 Apr 2015 03:26:57 -0700 (PDT) X-Received: by 10.140.82.176 with SMTP id h45mr756946qgd.75.1428661617699; Fri, 10 Apr 2015 03:26:57 -0700 (PDT) Received: from localhost.localdomain ([111.93.218.67]) by mx.google.com with ESMTPSA id 75sm1259769qhw.41.2015.04.10.03.26.55 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 10 Apr 2015 03:26:57 -0700 (PDT) From: bala.manoharan@linaro.org To: lng-odp@lists.linaro.org Date: Fri, 10 Apr 2015 15:56:32 +0530 Message-Id: <1428661592-18311-3-git-send-email-bala.manoharan@linaro.org> X-Mailer: git-send-email 2.0.1.472.g6f92e5f In-Reply-To: <1428661592-18311-1-git-send-email-bala.manoharan@linaro.org> References: <1428661592-18311-1-git-send-email-bala.manoharan@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv1 3/3] validation: remove test case for odp_pmr_create_range() function X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bala.manoharan@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Balasubramanian Manoharan This patch removes the validation suite test case for odp_pmr_create_range() function. Signed-off-by: Balasubramanian Manoharan --- .../classification/odp_classification_basic.c | 37 ++++++---------------- .../classification/odp_classification_tests.c | 32 ++++++++----------- 2 files changed, 24 insertions(+), 45 deletions(-) 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);