From patchwork Tue Feb 3 08:42:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 44203 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 7F5C721513 for ; Tue, 3 Feb 2015 08:42:37 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id x12sf19439893wgg.0 for ; Tue, 03 Feb 2015 00:42:36 -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=m95uBv2CM156lyErqdW2pH4FvKHEp8QBrP2rTQgDgP0=; b=JNZo4yGHPBobwV2u3+or61PtIG2SRyVnnzXaL5ejPgS2yGJN4l/9M3P9dt20FIojVW yZ6AVdaHafQmt4LOCBEgspUenx79ByOZSy/2kX16d03yBHt3gVV6AwIa/v+LNCThuaJX P1xaEKziGQ89jPv5AH6sIFaDgy949O/PNg9K/My5oPLVumXquqclWkime3jPcx6GKAHg CNF4tXTpcin8ugsHalCRwsUTgBvz/JTWoSrmWrfoWD/Jo+9spV/r9sX7dWbAizmov1Hg b0PA26bf5YuwmGz9UTGqJeB1mg0TyxP753tSLjxSJDtoaiYiDKel/DCPfQOLSgabkVqp XNdg== X-Gm-Message-State: ALoCoQmLgHtT49y0cCDU6cMDYxMwUQNikXdDPuaKYOJHiDno2FUHzz1ZTD447bGNEEzKmq9/d/Wl X-Received: by 10.112.175.10 with SMTP id bw10mr2938368lbc.7.1422952956734; Tue, 03 Feb 2015 00:42:36 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.67 with SMTP id ju3ls268730lab.105.gmail; Tue, 03 Feb 2015 00:42:36 -0800 (PST) X-Received: by 10.112.181.41 with SMTP id dt9mr22864491lbc.56.1422952956585; Tue, 03 Feb 2015 00:42:36 -0800 (PST) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id oe5si18761279lbb.2.2015.02.03.00.42.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 00:42:36 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by mail-la0-f48.google.com with SMTP id pv20so49086679lab.7 for ; Tue, 03 Feb 2015 00:42:36 -0800 (PST) X-Received: by 10.112.176.236 with SMTP id cl12mr4098035lbc.3.1422952956286; Tue, 03 Feb 2015 00:42:36 -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 h5csp1800512lbj; Tue, 3 Feb 2015 00:42:35 -0800 (PST) X-Received: by 10.140.81.208 with SMTP id f74mr1592614qgd.94.1422952951954; Tue, 03 Feb 2015 00:42:31 -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 g95si9379136qgd.123.2015.02.03.00.42.29 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 03 Feb 2015 00:42:31 -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 1YIZ3z-0000TL-RK; Tue, 03 Feb 2015 08:42:27 +0000 Received: from mail-yh0-f44.google.com ([209.85.213.44]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YIZ3u-0000T5-4W for lng-odp@lists.linaro.org; Tue, 03 Feb 2015 08:42:22 +0000 Received: by mail-yh0-f44.google.com with SMTP id i57so17927849yha.3 for ; Tue, 03 Feb 2015 00:42:17 -0800 (PST) X-Received: by 10.236.22.41 with SMTP id s29mr9404481yhs.58.1422952936897; Tue, 03 Feb 2015 00:42:16 -0800 (PST) Received: from localhost.localdomain ([111.93.218.67]) by mx.google.com with ESMTPSA id u3sm13903751yhu.0.2015.02.03.00.42.14 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 00:42:16 -0800 (PST) From: bala.manoharan@linaro.org To: lng-odp@lists.linaro.org Date: Tue, 3 Feb 2015 14:12:05 +0530 Message-Id: <1422952925-17875-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 v2] api: classification: pmr statistics counter API removal 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.215.48 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 Reviewed-by: Mike Holmes --- v2: Incorporated review comments from Mike 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, };