From patchwork Fri Apr 10 10:26:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 47022 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A0F35218D9 for ; Fri, 10 Apr 2015 10:26:54 +0000 (UTC) Received: by wgiv13 with SMTP id v13sf3059214wgi.3 for ; Fri, 10 Apr 2015 03:26:53 -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: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=XvKFCRbT1G0KqjdVsLWNetSC4221DGilXyGMxTdiSts=; b=FAGc16FBfh8flv+U5yjsnltyBImKJY++M7XP1bJEAY1bS9MDfyotb5GmZ7n6vOfvrC pK9BrN36/PeMTu708EFjq7PLXuGhims2iBqSSwnwSu1be8k/bxkpfCtExm6Fok6bDWAt SuShcjxXvScgaNK8YoJQpDz82nsMh2A56w2UP9GQxFYnviTUf5qQu5QBTpXhUjqN4q2f q0sp+5y9gp6mK9i2On6zymd7JfJR5SdBZFZ11wFwGuOuM/DnDg2cXvDG98Wqgrhtw2oS JdIrlEPziUq2XzSG5RaG/vU0BaZcBHE+12ohp1NvFx1I96Nz34oIDlHBTBp5HaRtwv7H WA2A== X-Gm-Message-State: ALoCoQnpqVEbpyzzPMs6AjRXg5gA6HpwxaHeutKBLOG3dfotQigEoDMsAK+whzXEXorgXmLOIgs6 X-Received: by 10.152.3.70 with SMTP id a6mr191182laa.0.1428661613891; Fri, 10 Apr 2015 03:26:53 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.208 with SMTP id k16ls433847lab.42.gmail; Fri, 10 Apr 2015 03:26:53 -0700 (PDT) X-Received: by 10.112.167.36 with SMTP id zl4mr810110lbb.22.1428661613697; Fri, 10 Apr 2015 03:26:53 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id d4si1147812lbb.6.2015.04.10.03.26.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Apr 2015 03:26:53 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by labbd9 with SMTP id bd9so9929622lab.2 for ; Fri, 10 Apr 2015 03:26:53 -0700 (PDT) X-Received: by 10.152.8.78 with SMTP id p14mr797148laa.19.1428661613528; Fri, 10 Apr 2015 03:26:53 -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 l1csp998595lbt; Fri, 10 Apr 2015 03:26:52 -0700 (PDT) X-Received: by 10.55.52.4 with SMTP id b4mr1276973qka.37.1428661612218; Fri, 10 Apr 2015 03:26:52 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l9si1398793qcg.2.2015.04.10.03.26.51; Fri, 10 Apr 2015 03:26:52 -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 6C67A650DB; Fri, 10 Apr 2015 10:26:51 +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 AC12A64E66; Fri, 10 Apr 2015 10:26:47 +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 04D7F6509B; Fri, 10 Apr 2015 10:26:46 +0000 (UTC) Received: from mail-qk0-f171.google.com (mail-qk0-f171.google.com [209.85.220.171]) by lists.linaro.org (Postfix) with ESMTPS id DBB4764E66 for ; Fri, 10 Apr 2015 10:26:44 +0000 (UTC) Received: by qkgx75 with SMTP id x75so24117754qkg.1 for ; Fri, 10 Apr 2015 03:26:44 -0700 (PDT) X-Received: by 10.55.20.141 with SMTP id 13mr1367999qku.30.1428661604652; Fri, 10 Apr 2015 03:26:44 -0700 (PDT) Received: from localhost.localdomain ([111.93.218.67]) by mx.google.com with ESMTPSA id 75sm1259769qhw.41.2015.04.10.03.26.42 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 10 Apr 2015 03:26:44 -0700 (PDT) From: bala.manoharan@linaro.org To: lng-odp@lists.linaro.org Date: Fri, 10 Apr 2015 15:56:30 +0530 Message-Id: <1428661592-18311-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] [API-NEXT PATCHv1 1/3] api: classification: remove odp_pmr_create_range() function definition. 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.45 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 The support for a range based packet matching rule is not available in most of the hardwares and hence this API is removed. Signed-off-by: Balasubramanian Manoharan --- include/odp/api/classification.h | 61 +++++++--------------------------------- 1 file changed, 10 insertions(+), 51 deletions(-) diff --git a/include/odp/api/classification.h b/include/odp/api/classification.h index 7db3645..f597b26 100644 --- a/include/odp/api/classification.h +++ b/include/odp/api/classification.h @@ -50,8 +50,8 @@ extern "C" { /** * @def ODP_PMR_INVAL * Invalid odp_pmr_t value. - * This value is returned from odp_pmr_create_match() and - * odp_pmr_create_range() functions on failure. + * This value is returned from odp_pmr_create() + * function on failure. */ /** @@ -236,30 +236,10 @@ typedef enum odp_pmr_term { * @return Handle of the matching rule * @retval ODP_PMR_INVAL on failure */ -odp_pmr_t odp_pmr_create_match(odp_pmr_term_e term, - const void *val, - const void *mask, - uint32_t val_sz); +odp_pmr_t odp_pmr_create(odp_pmr_term_e term, const void *val, + const void *mask, uint32_t val_sz); /** - * Create a packet match rule with value range - * - * @param[in] term One of the enumerated values supported - * @param[in] val1 Lower bound of the header field range. - * @param[in] val2 Upper bound of the header field range. - * @param[in] val_sz Size of the val1 and val2 arguments, - * that must match the value size requirement of the - * specific term. - * - * @return Handle of the matching rule - * @retval ODP_PMR_INVAL on failure - * @note: Range is inclusive [val1..val2]. - */ -odp_pmr_t odp_pmr_create_range(odp_pmr_term_e term, - const void *val1, - const void *val2, - uint32_t val_sz); -/** * Invalidate a packet match rule and vacate its resources * * @param[in] pmr_id Identifier of the PMR to be destroyed @@ -310,39 +290,18 @@ unsigned long long odp_pmr_terms_cap(void); unsigned odp_pmr_terms_avail(void); /** - * Packet Match Type field enumeration - * for fields that may be used to identify - * the different PMR match type. - */ -typedef enum odp_pmr_match_type { - ODP_PMR_MASK, /**< Match a masked set of bits */ - ODP_PMR_RANGE, /**< Match an integer range */ - } odp_pmr_match_type_e; - -/** * Following structure is used to define composite packet matching rules - * in the form of an array of individual match or range rules. + * in the form of an array of individual match rules. * The underlying platform may not support all or any specific combination - * of value match or range rules, and the application should take care + * of value match rules, and the application should take care * of inspecting the return value when installing such rules, and perform * appropriate fallback action. */ typedef struct odp_pmr_match_t { - odp_pmr_match_type_e match_type; /**< Packet Match Type*/ - union { - struct { - odp_pmr_term_e term; - const void *val; - const void *mask; - unsigned int val_sz; - } mask; /**< Match a masked set of bits */ - struct { - odp_pmr_term_e term; - const void *val1; - const void *val2; - unsigned int val_sz; - } range; /**< Match an integer range */ - }; + odp_pmr_term_e term; /**< PMR term value to be matched */ + const void *val; /**< Value to be matched */ + const void *mask; /**< Masked set of bits to be matched */ + unsigned int val_sz; /**< Size of the term value */ } odp_pmr_match_t; /**