From patchwork Fri Jan 30 06:20:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 44018 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CB30F2410D for ; Fri, 30 Jan 2015 06:20:50 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id b6sf27341607lbj.0 for ; Thu, 29 Jan 2015 22:20:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id: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=FrUToaMjUxm1TvdVec8Xb/5H2eVEWvWkw78yWGpT/kE=; b=R2dZwV48apCAzIcS+FFEJJZJMJiy8gqm4r9LvfEIHnCYXREbE7uJ8uOmrS5rPRutCG +LCezEUK+kCHAE/6yCag8mRdDTJqreGWVRAeXHfNzLDI29xyGrl8+VC2oAMovxFFXrHc ns7z0R4SdKmtq2kYOMjMfnBQ70zfaKOanR1eDVmFdv1pkQY40nSCdNRB0MQsQsWKGMkQ Ytw6I4Vt8p1wQRE6wbGUqHlgwFfp+ASY3xINtXrfwWTH98V2ztVpuCZ9GdYcC+jStnjn 6vIeFcLB8nZRQ1QhbXcL/mibhjntSndUSVqWjSzIm/uBVnXS4PNAeg/mKR2eHp5XrfVz m8EQ== X-Gm-Message-State: ALoCoQl3EpvW9HPz67euX1NUfhaVKUSIk4HM8A/um4m0yyaK1DXehuunsm5PzJX4yFe7D1dEzIqX X-Received: by 10.112.162.35 with SMTP id xx3mr574685lbb.16.1422598849487; Thu, 29 Jan 2015 22:20:49 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.206.65 with SMTP id lm1ls168781lac.38.gmail; Thu, 29 Jan 2015 22:20:49 -0800 (PST) X-Received: by 10.112.54.167 with SMTP id k7mr4869194lbp.72.1422598849210; Thu, 29 Jan 2015 22:20:49 -0800 (PST) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id mq9si9457094lbb.4.2015.01.29.22.20.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Jan 2015 22:20:48 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by mail-lb0-f180.google.com with SMTP id b6so34750268lbj.11 for ; Thu, 29 Jan 2015 22:20:48 -0800 (PST) X-Received: by 10.112.243.12 with SMTP id wu12mr4836209lbc.91.1422598848539; Thu, 29 Jan 2015 22:20:48 -0800 (PST) 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.35.133 with SMTP id h5csp179570lbj; Thu, 29 Jan 2015 22:20:47 -0800 (PST) X-Received: by 10.224.124.16 with SMTP id s16mr9129985qar.72.1422598847086; Thu, 29 Jan 2015 22:20:47 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id u4si12408687qcm.43.2015.01.29.22.20.44 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 29 Jan 2015 22:20:47 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YH4wb-00041o-LE; Fri, 30 Jan 2015 06:20:41 +0000 Received: from mail-yk0-f181.google.com ([209.85.160.181]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YH4wW-00041j-5y for lng-odp@lists.linaro.org; Fri, 30 Jan 2015 06:20:36 +0000 Received: by mail-yk0-f181.google.com with SMTP id 79so16391098ykr.12 for ; Thu, 29 Jan 2015 22:20:31 -0800 (PST) X-Received: by 10.236.228.137 with SMTP id f9mr2026679yhq.34.1422598830783; Thu, 29 Jan 2015 22:20:30 -0800 (PST) Received: from manoharan-Vostro-2520.caveonetworks.com ([111.93.218.67]) by mx.google.com with ESMTPSA id i2sm6037758yhd.19.2015.01.29.22.20.28 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Jan 2015 22:20:30 -0800 (PST) From: bala.manoharan@linaro.org To: lng-odp@lists.linaro.org Date: Fri, 30 Jan 2015 11:50:18 +0530 Message-Id: <1422598818-14905-1-git-send-email-bala.manoharan@linaro.org> X-Mailer: git-send-email 2.0.1.472.g6f92e5f X-Topics: Classification patch Subject: [lng-odp] [PATCH v1] api: classification: pmr statistics counter API moved out of ODP 1.0 X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 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-bounces@lists.linaro.org 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.217.180 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 odp_pmr_match_count() API related to statistics count of PMR has been moved out of ODP 1.0 version and the same will be incorporated once an ODP level common statistics counter design has been achieved. Signed-off-by: Balasubramanian Manoharan --- include/odp/api/classification.h | 9 --------- platform/linux-generic/odp_classification.c | 8 -------- .../classification/odp_classification_tests.c | 21 --------------------- 3 files changed, 38 deletions(-) diff --git a/include/odp/api/classification.h b/include/odp/api/classification.h index 5c6636f..609d529 100644 --- a/include/odp/api/classification.h +++ b/include/odp/api/classification.h @@ -279,15 +279,6 @@ int odp_pktio_pmr_cos(odp_pmr_t pmr_id, int odp_cos_pmr_cos(odp_pmr_t pmr_id, odp_cos_t src_cos, odp_cos_t dst_cos); /** - * Retrieve packet matcher statistics - * - * @param[in] pmr_id PMR from which to retrieve the count - * - * @return Current number of matches for a given matcher instance. - */ -signed long odp_pmr_match_count(odp_pmr_t pmr_id); - -/** * Inquire about matching terms supported by the classifier * * @return A mask one bit per enumerated term, one for each of op_pmr_term_e diff --git a/platform/linux-generic/odp_classification.c b/platform/linux-generic/odp_classification.c index 78597ef..31d1328 100644 --- a/platform/linux-generic/odp_classification.c +++ b/platform/linux-generic/odp_classification.c @@ -505,14 +505,6 @@ int odp_cos_pmr_cos(odp_pmr_t pmr_id, odp_cos_t src_cos, odp_cos_t dst_cos) return 0; } -signed long odp_pmr_match_count(odp_pmr_t pmr_id) -{ - pmr_t *pmr = get_pmr_entry(pmr_id); - if (pmr == NULL) - return -1; - return (signed long)odp_atomic_load_u32(&pmr->s.count); -} - unsigned long long odp_pmr_terms_cap(void) { unsigned long long term_cap = 0; diff --git a/test/validation/classification/odp_classification_tests.c b/test/validation/classification/odp_classification_tests.c index e4b3260..45822d3 100644 --- a/test/validation/classification/odp_classification_tests.c +++ b/test/validation/classification/odp_classification_tests.c @@ -423,8 +423,6 @@ void test_cls_pmr_chain(void) pkt = receive_packet(&queue, ODP_TIME_SEC); CU_ASSERT(queue == queue_list[CLS_PMR_CHAIN_SRC]); CU_ASSERT(seq == cls_pkt_get_seq(pkt)); - - CU_ASSERT(1 == odp_pmr_match_count(pmr_list[CLS_PMR_CHAIN_DST])); odp_packet_free(pkt); } @@ -657,7 +655,6 @@ void test_pmr_cos(void) pkt = receive_packet(&queue, ODP_TIME_SEC); CU_ASSERT(queue == queue_list[CLS_PMR]); CU_ASSERT(seq == cls_pkt_get_seq(pkt)); - CU_ASSERT(1 == odp_pmr_match_count(pmr_list[CLS_PMR])); odp_packet_free(pkt); } @@ -740,23 +737,6 @@ void test_pktio_pmr_match_set_cos(void) odp_packet_free(pkt); } -static void classification_pmr_match_count(void) -{ - odp_pmr_t pmr; - uint16_t val; - uint16_t mask; - val = 1024; - mask = 0xffff; - int retval; - pmr = odp_pmr_create_match(ODP_PMR_TCP_SPORT, &val, &mask, sizeof(val)); - CU_ASSERT(pmr != ODP_PMR_INVAL); - - retval = odp_pmr_match_count(pmr); - CU_ASSERT(retval == 0); - - odp_pmr_destroy(pmr); -} - static void classification_pmr_terms_avail(void) { int retval; @@ -814,6 +794,5 @@ CU_TestInfo classification_tests[] = { _CU_TEST_INFO(classification_pmr_terms_cap), _CU_TEST_INFO(classification_pktio_configure), _CU_TEST_INFO(classification_pktio_test), - _CU_TEST_INFO(classification_pmr_match_count), CU_TEST_INFO_NULL, };