From patchwork Tue Nov 17 06:16:49 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Balasubramanian Manoharan X-Patchwork-Id: 56703 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp1741142lbb; Mon, 16 Nov 2015 22:17:13 -0800 (PST) X-Received: by 10.140.92.16 with SMTP id a16mr40681943qge.54.1447741033020; Mon, 16 Nov 2015 22:17:13 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id a3si20936205qha.10.2015.11.16.22.17.12; Mon, 16 Nov 2015 22:17:12 -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 5479761CE5; Tue, 17 Nov 2015 06:17:12 +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 7513461C7B; Tue, 17 Nov 2015 06:17:08 +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 6494F61C7E; Tue, 17 Nov 2015 06:17:07 +0000 (UTC) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by lists.linaro.org (Postfix) with ESMTPS id 7D5D161C68 for ; Tue, 17 Nov 2015 06:17:06 +0000 (UTC) Received: by pacdm15 with SMTP id dm15so200709848pac.3 for ; Mon, 16 Nov 2015 22:17:05 -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=Wm/x+YyRCYIxDC2HvYVsqZRvqWRGNzizt5+Rv+f5658=; b=JeXkJma4qF5BqjtOKVtzIGp/HVbU5z6BbAtchUvxmD/HYTx0rSkKrAjOMsMPwF9cZg 99ZUuMeYNUHpqTJKdWasWIixKM7mephO4H8I4XWxYsilrlQRpTM7EfZJswmEKf1oSnSZ lrjJMcVzVsksnr32bQr5CifFiCWalbKhWGRMOsfAaYoipsoBHS8tJ9DgqRtr68DLfvx2 HckotOO87OXirK3Iv7V4zT0WytieNAGSs7cL8FDP/tHHVqpbu+3DjLnfJeH+d6xWau1G wXqDlxZii8X4UQYTXrS8mGs47H1x0y7gaTCeqBfv1kRCdyYdrZBVw46aR2hZPiTQKuij RUWA== 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=Wm/x+YyRCYIxDC2HvYVsqZRvqWRGNzizt5+Rv+f5658=; b=NCHwo70uhFVY/NrgPaPtRkp8m37lu82uy/tinHlXDJEpJx/1kO/+LSE1YwsqK1V0+O AwPZyI4b92DJuOJJipYK1endmFsBB4iD6X6eE86FkPRSPKHaJFnAf82YLPTQ7ZSdl3hF lQqd7vxhTA3T41EUNdMibIKkVSCrdyQlhUibeXiBfC2z4+FCnkI84Be1VJ9w32KiXG5d qG9xzeLMcochPRLS/praWEUIceEO6QG9u1AQ341ya0OfVvQVRGpmL3cDmBvEbuFi1tM2 s7WuaWhBM/izyK4MSLiY+4fZHVImk1P+Icfaj6PKXFHiTbZKLtNgy0uqlOfDkpxbi9Xx Lr/A== X-Gm-Message-State: ALoCoQn+Gg5MedfBkcV5A90ENkgTPQQkpajpa1i/fkfTudBr6zddOcoRYoOUPQRdWMepm9wCV1uR X-Received: by 10.66.121.110 with SMTP id lj14mr59915218pab.61.1447741025715; Mon, 16 Nov 2015 22:17:05 -0800 (PST) Received: from localhost.localdomain ([122.166.219.57]) by smtp.gmail.com with ESMTPSA id tp6sm40199084pbc.81.2015.11.16.22.17.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 16 Nov 2015 22:17:05 -0800 (PST) From: Balasubramanian Manoharan To: lng-odp@lists.linaro.org Date: Tue, 17 Nov 2015 11:46:49 +0530 Message-Id: <1447741013-7333-1-git-send-email-bala.manoharan@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: Classification patch Subject: [lng-odp] [PATCH 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 --- include/odp/api/classification.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/include/odp/api/classification.h b/include/odp/api/classification.h index 380d91b..bb52c10 100644 --- a/include/odp/api/classification.h +++ b/include/odp/api/classification.h @@ -379,6 +379,33 @@ 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 in case of failure +* +*/ +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