From patchwork Wed Nov 26 09:59:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 41531 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D7C94203C2 for ; Wed, 26 Nov 2014 09:59:49 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id e53sf1701730eek.11 for ; Wed, 26 Nov 2014 01:59: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=HyxkjFxuRXUpWWccwZ1zyENxY2Y5+g7q4MLaVkNBZtk=; b=JQA8Itmwsq/kMiwbbhpEAJAMalZ7KqdXMlYUOiOUnht0ndbQE1+tsU8nBV1xUfCamZ QAB+bkJHzeLw3tzTpmJ4egaQ4tpy5myok30DVvNww0x592EAeuuWpWAA1wbDonQ34XFg MOjR9Pd/NWkIEE5/bybNuqEk2JiSbyEYKmOqWkI9DRoTBhZL8Y+xDQdR+2Fdg/ecoTnB FppQTablzqOjyFj/+jtEigggCzpajg6H5EqtNLlSPZ2AtEWQIvxigFx2K8tRCjs98Nzy VFMgIh+KG+Z0FP+vXFTmxVFa7BYHhj80VQ78bxpWy1sFYUY07tm3xz1+LSiRdBalxXM+ ne+A== X-Gm-Message-State: ALoCoQktBWK41D7TlllbeI/UOcP9zHFXI7dhGVb/G8vBftb3XDNbd+smdslNZcUlwUl4nBA5oUr1 X-Received: by 10.112.168.228 with SMTP id zz4mr7925229lbb.7.1416995989073; Wed, 26 Nov 2014 01:59:49 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.97 with SMTP id r1ls710553lar.0.gmail; Wed, 26 Nov 2014 01:59:48 -0800 (PST) X-Received: by 10.152.234.140 with SMTP id ue12mr32487838lac.78.1416995988846; Wed, 26 Nov 2014 01:59:48 -0800 (PST) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id bd9si3881527lab.42.2014.11.26.01.59.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Nov 2014 01:59:48 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by mail-lb0-f178.google.com with SMTP id f15so2305517lbj.23 for ; Wed, 26 Nov 2014 01:59:48 -0800 (PST) X-Received: by 10.152.37.69 with SMTP id w5mr32484454laj.67.1416995988336; Wed, 26 Nov 2014 01:59: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.184.201 with SMTP id ew9csp593941lbc; Wed, 26 Nov 2014 01:59:47 -0800 (PST) X-Received: by 10.140.18.240 with SMTP id 103mr20444744qgf.1.1416995986780; Wed, 26 Nov 2014 01:59:46 -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 a33si4456892qgf.78.2014.11.26.01.59.45 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 26 Nov 2014 01:59:46 -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 1XtZNv-0007qX-Sr; Wed, 26 Nov 2014 09:59:43 +0000 Received: from mail-yk0-f176.google.com ([209.85.160.176]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1XtZNp-0007qS-3C for lng-odp@lists.linaro.org; Wed, 26 Nov 2014 09:59:37 +0000 Received: by mail-yk0-f176.google.com with SMTP id q200so1114375ykb.35 for ; Wed, 26 Nov 2014 01:59:32 -0800 (PST) X-Received: by 10.236.2.170 with SMTP id 30mr29005974yhf.122.1416995971913; Wed, 26 Nov 2014 01:59:31 -0800 (PST) Received: from bala-PowerEdge-T110-II.caveonetworks.com ([111.93.218.67]) by mx.google.com with ESMTPSA id v23sm2014099yhv.27.2014.11.26.01.59.30 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Nov 2014 01:59:31 -0800 (PST) From: Balasubramanian Manoharan To: lng-odp@lists.linaro.org Date: Wed, 26 Nov 2014 15:29:18 +0530 Message-Id: <1416995958-26477-1-git-send-email-bala.manoharan@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Topics: Classification patch Subject: [lng-odp] [PATCH v2] Classification: APIs deferred from ODP v1.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.178 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 This patch removes Classification APIs which have been deferred from ODP v1.0 The following is the list of the deferred APIs * odp_cos_set_queue_group * odp_cos_set_pool * odp_cos_set_headroom * odp_cos_flow_set * odp_cos_flow_is_set * odp_cos_class_flow_signature * odp_cos_port_flow_signature Signed-off-by: Balasubramanian Manoharan --- V2: This patch is modified as independantly compilable unit .../linux-generic/include/api/odp_classification.h | 106 +-------------------- platform/linux-generic/odp_classification.c | 48 +--------- 2 files changed, 8 insertions(+), 146 deletions(-) diff --git a/platform/linux-generic/include/api/odp_classification.h b/platform/linux-generic/include/api/odp_classification.h index cc5d84a..64ad73f 100644 --- a/platform/linux-generic/include/api/odp_classification.h +++ b/platform/linux-generic/include/api/odp_classification.h @@ -48,6 +48,9 @@ typedef uint32_t odp_flowsig_t; */ #define ODP_COS_INVALID ((odp_cos_t)~0) +/** Maximum ClassOfService name length in chars */ +#define ODP_COS_NAME_LEN 32 + /** * Class-of-service packet drop policies */ @@ -110,33 +113,6 @@ int odp_cos_destroy(odp_cos_t cos_id); int odp_cos_set_queue(odp_cos_t cos_id, odp_queue_t queue_id); /** - * Assign a homogenous queue-group to a class-of-service. - * - * @param[in] cos_id class-of-service instance - * @param[in] queue_group_id Identifier of the queue group to receive packets - * associated with this class of service. - * - * @return 0 on success, -1 on error. - */ -int odp_cos_set_queue_group(odp_cos_t cos_id, - odp_queue_group_t queue_group_id); - -/** - * Assign packet buffer pool for specific class-of-service - * - * @param[in] cos_id class-of-service instance. - * @param[in] pool_id Buffer pool identifier where all packet buffers - * will be sourced to store packet that - * belong to this class of service. - * - * @return 0 on success, -1 on error. - * - * @note Optional. - */ -int odp_cos_set_pool(odp_cos_t cos_id, odp_buffer_pool_t pool_id); - - -/** * Assign packet drop policy for specific class-of-service * * @param[in] cos_id class-of-service instance. @@ -203,21 +179,6 @@ int odp_pktio_set_skip(odp_pktio_t pktio_in, size_t offset); int odp_pktio_set_headroom(odp_pktio_t pktio_in, size_t headroom); /** - * Specify per-cos buffer headroom - * - * @param[in] cos_id Class-of-service instance - * @param[in] headroom Number of bytes of space preceding packet - * data to reserve for use as headroom. - * Must not exceed the implementation - * defined ODP_PACKET_MAX_HEADROOM. - * - * @return 0 on success, -1 on error. - * - * @note Optional. - */ -int odp_cos_set_headroom(odp_cos_t cos_id, size_t headroom); - -/** * Request to override per-port class of service * based on Layer-2 priority field if present. * @@ -263,60 +224,6 @@ int odp_cos_with_l3_qos(odp_pktio_t pktio_in, typedef uint16_t odp_cos_flow_set_t; /** - * Set a member of the flow signature fields data set - */ -static inline -odp_cos_flow_set_t odp_cos_flow_set(odp_cos_flow_set_t set, - odp_cos_hdr_flow_fields_e field) -{ - return set | (1U << field); -} - -/** - * Test a member of the flow signature fields data set - */ -static inline bool -odp_cos_flow_is_set(odp_cos_flow_set_t set, odp_cos_hdr_flow_fields_e field) -{ - return (set & (1U << field)) != 0; -} - -/** - * Set up set of headers used to calculate a flow signature - * based on class-of-service. - * - * @param[in] cos_id Class of service instance identifier - * @param[in] req_data_set Requested data-set for - * flow signature calculation - * - * @return Data-set that was successfully applied. - * All-zeros data set indicates a failure to - * assign any of the requested fields, - * or other error. - * @note Optional. - */ -odp_cos_flow_set_t -odp_cos_class_flow_signature(odp_cos_t cos_id, - odp_cos_flow_set_t req_data_set); - -/** - * Set up set of headers used to calculate a flow signature - * based on ingress port. - * - * @param[in] pktio_in Ingress port identifier - * @param[in] req_data_set Requested data-set for - * flow signature calculation - * - * @return Data-set that was successfully applied. - * An all-zeros data-set indicates a failure to - * assign any of the requested fields, - * or other error. - */ -odp_cos_flow_set_t -odp_cos_port_flow_signature(odp_pktio_t pktio_in, - odp_cos_flow_set_t req_data_set); - -/** * PMR - Packet Matching Rule * Up to 32 bit of ternary matching of one of the available header fields */ @@ -325,7 +232,7 @@ typedef uint32_t odp_pmr_t; /** * Macro for Invalid PMR. */ -#define ODP_PMR_INVAL ((odp_pmr_t)NULL) +#define ODP_PMR_INVAL ((odp_pmr_t)~0) /** * Packet Matching Rule field enumeration @@ -497,9 +404,6 @@ typedef uint32_t odp_pmr_set_t; * @param[in] num_terms Number of terms in the match rule. * @param[in] terms Array of num_terms entries, one entry per * term desired. - * @param[in] dst_cos Class-of-service to be assigned to packets - * that match the compound rule-set, - * or a subset thereof, if partly applied. * @param[out] pmr_set_id Returned handle to the composite rule set. * * @return Return value may be a positive number @@ -510,7 +414,7 @@ typedef uint32_t odp_pmr_set_t; * or -1 for error. */ int odp_pmr_match_set_create(int num_terms, odp_pmr_match_t *terms, - odp_cos_t dst_cos, odp_pmr_set_t *pmr_set_id); + odp_pmr_set_t *pmr_set_id); /** * Function to delete a composite packet match rule set diff --git a/platform/linux-generic/odp_classification.c b/platform/linux-generic/odp_classification.c index dbc74e2..190d71e 100644 --- a/platform/linux-generic/odp_classification.c +++ b/platform/linux-generic/odp_classification.c @@ -27,23 +27,6 @@ int odp_cos_set_queue(odp_cos_t cos_id, odp_queue_t queue_id) return 0; } -int odp_cos_set_queue_group(odp_cos_t cos_id, odp_queue_group_t queue_group_id) -{ - (void)cos_id; - (void)queue_group_id; - ODP_UNIMPLEMENTED(); - return 0; -} - -int odp_cos_set_pool(odp_cos_t cos_id, odp_buffer_pool_t pool_id) -{ - (void)cos_id; - (void) pool_id; - ODP_UNIMPLEMENTED(); - return 0; -} - - int odp_cos_set_drop(odp_cos_t cos_id, odp_drop_e drop_policy) { (void)cos_id; @@ -59,6 +42,7 @@ int odp_pktio_set_default_cos(odp_pktio_t pktio_in, odp_cos_t default_cos) ODP_UNIMPLEMENTED(); return 0; } + int odp_pktio_set_error_cos(odp_pktio_t pktio_in, odp_cos_t error_cos) { (void)pktio_in; @@ -82,13 +66,6 @@ int odp_pktio_set_headroom(odp_pktio_t port_id, size_t headroom) ODP_UNIMPLEMENTED(); return 0; } -int odp_cos_set_headroom(odp_cos_t cos_id, size_t req_room) -{ - (void)cos_id; - (void)req_room; - ODP_UNIMPLEMENTED(); - return 0; -} int odp_cos_with_l2_priority(odp_pktio_t pktio_in, size_t num_qos, @@ -118,25 +95,6 @@ int odp_cos_with_l3_qos(odp_pktio_t pktio_in, return 0; } -odp_cos_flow_set_t -odp_cos_class_flow_signature(odp_cos_t cos_id, - odp_cos_flow_set_t req_data_set) -{ - (void)cos_id; - (void)req_data_set; - ODP_UNIMPLEMENTED(); - return 0; -} -odp_cos_flow_set_t -odp_cos_port_flow_signature(odp_pktio_t pktio_in, - odp_cos_flow_set_t req_data_set) -{ - (void)pktio_in; - (void)req_data_set; - ODP_UNIMPLEMENTED(); - return 0; -} - odp_pmr_t odp_pmr_create_match(odp_pmr_term_e term, const void *val, const void *mask, @@ -162,6 +120,7 @@ odp_pmr_t odp_pmr_create_range(odp_pmr_term_e term, ODP_UNIMPLEMENTED(); return 0; } + int odp_pmr_destroy(odp_pmr_t pmr_id) { (void)pmr_id; @@ -209,12 +168,11 @@ unsigned odp_pmr_terms_avail(void) } int odp_pmr_match_set_create(int num_terms, odp_pmr_match_t *terms, - odp_cos_t dst_cos, odp_pmr_set_t *pmr_set_id) + odp_pmr_set_t *pmr_set_id) { (void)num_terms; (void)terms; (void)pmr_set_id; - (void)dst_cos; ODP_UNIMPLEMENTED(); return 0; }