From patchwork Mon Nov 23 10:12:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 57132 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1342469lbb; Mon, 23 Nov 2015 02:13:16 -0800 (PST) X-Received: by 10.55.78.75 with SMTP id c72mr25828737qkb.97.1448273595844; Mon, 23 Nov 2015 02:13:15 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id n76si10583842qhb.34.2015.11.23.02.13.15; Mon, 23 Nov 2015 02:13:15 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dkim=neutral (body hash did not verify) header.i=@linaro-org.20150623.gappssmtp.com Received: by lists.linaro.org (Postfix, from userid 109) id 6ABAC61A2E; Mon, 23 Nov 2015 10:13:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 21B9A618F0; Mon, 23 Nov 2015 10:13:11 +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 55394618F0; Mon, 23 Nov 2015 10:13:09 +0000 (UTC) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) by lists.linaro.org (Postfix) with ESMTPS id 3389161846 for ; Mon, 23 Nov 2015 10:13:08 +0000 (UTC) Received: by pacdm15 with SMTP id dm15so186992526pac.3 for ; Mon, 23 Nov 2015 02:13:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=iHVhVK0A9KmQ0f+xF+ehcE5wyNhR7vq8kG8Xs4QDXpo=; b=anewFvIov5dGTyKON5dw1+65kZW4JhEwi8o8cuHiis8KZBtMxwOD9a8T+R/IKnziF7 R+aCq4rg5ETVqUlWz7pkcdEtXFRA/9A2Fc56oX02PwZiO3FSkU/udpXU2JGhflD6K0mM JKebvwwwOMERWMayHpbY59pJA6A5j3a4K5/UNJ4jPi1EQ1jTxvgWd4MteDNWXiOdqK0u sCNTEpF2G/vRF+SE/IcK7ksLv6V35l6AxPgWGV/Ghgx2RH0gjRI5iX6+bpZXiCJoQr5q +t7V3nCZDKdJemDjCzILXR6kAqr/2OqOGuoxXFUrUpFfv1skyQlnXILqzhBkzfDQqetV C5Gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=iHVhVK0A9KmQ0f+xF+ehcE5wyNhR7vq8kG8Xs4QDXpo=; b=RrnHkEv77c6+Z+0Y7+Jq2+94Etf80wxtSY0V0MLpDdB10FSGzauv4mkLakfpa5jsim R+hRF0hE0Z/0BmMBPA/fJGp+Cv8jt/H+Be4hA9mqyKToknY+BBqdFncNVnjxKbndeU4O I3EbRIq8JuFfD2G6huJ2p28ZyZhXaDFqIBIvqiFG2aouQC4a79awU3809GJXXbOWTL/R IWj1LvyQh7ZG+ggjgx7RqDzc1SUGfJe6ymFSphV00mDK10b1+34jBKBTZDy7UxUJv7Nn lDazf59SNZw/u+hEzVX3uHpe0nRK/FjhZ9s6M/lvczLmvcXtAssW9/I2AAFeoUXAyu/u by4g== X-Gm-Message-State: ALoCoQn1t5gBCmGK28GIpbVa95xyauiMYz/LbM1u5Tg+pVgbNKiXUbvu5R7q3b8LRR6MAY45ye3Q X-Received: by 10.66.217.166 with SMTP id oz6mr6050596pac.96.1448273587496; Mon, 23 Nov 2015 02:13:07 -0800 (PST) Received: from localhost.localdomain ([122.166.219.57]) by smtp.gmail.com with ESMTPSA id 132sm9247648pfc.63.2015.11.23.02.13.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Nov 2015 02:13:06 -0800 (PST) From: Balasubramanian Manoharan To: lng-odp@lists.linaro.org Date: Mon, 23 Nov 2015 15:42:48 +0530 Message-Id: <1448273572-27435-1-git-send-email-bala.manoharan@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: Classification patch Subject: [lng-odp] [API-NEXT PATCHv2 1/5] api: classification: add odp_cls_cos_pool_set() api X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" 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" odp_cls_cos_pool_set() api is used to configure packet pool to CoS. The packets arriving at the CoS is allocated from the configured pool Signed-off-by: Balasubramanian Manoharan --- v2: Incorporates Review comments from Stuart include/odp/api/classification.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/include/odp/api/classification.h b/include/odp/api/classification.h index 380d91b..137ac21 100644 --- a/include/odp/api/classification.h +++ b/include/odp/api/classification.h @@ -379,6 +379,34 @@ int odp_pktio_pmr_match_set_cos(odp_pmr_set_t pmr_set_id, odp_pktio_t src_pktio, odp_cos_t dst_cos); /** +* Assigns a packet buffer pool for a specific Class of service. +* All the packets belonging to the given class of service will +* be allocated from the assigned packet pool. +* +* @param cos_id class-of-service handle +* @param pool_id Packet buffer pool handle +* +* @return 0 on success +* @return <0 on failure +* +* @note The packet pool associated with CoS will supersede +* the packet pool associated with the pktio interface +*/ +int odp_cls_cos_pool_set(odp_cos_t cos_id, odp_pool_t pool_id); + +/** +* Get the pool associated with the given class of service +* +* @param cos_id class-of-service handle +* +* @retval pool handle of the associated pool +* @retval ODP_POO_INVALID if no associated pool found or + incase of an error +* +*/ +odp_pool_t odp_cls_cos_pool(odp_cos_t cos_id); + +/** * Get printable value for an odp_cos_t * * @param hdl odp_cos_t handle to be printed