From patchwork Tue May 30 12:44:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 100712 Delivered-To: patch@linaro.org Received: by 10.182.202.35 with SMTP id kf3csp1123741obc; Tue, 30 May 2017 05:45:23 -0700 (PDT) X-Received: by 10.237.36.151 with SMTP id t23mr24464510qtc.115.1496148323121; Tue, 30 May 2017 05:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496148323; cv=none; d=google.com; s=arc-20160816; b=YUH/GA/9Q3uLIny02kEDnNpJBkfYr53UNz1Zo+B7wX8Bc4iyFgSLblKlDrBblgjeTF 6UXXC6KiyTux3LSbPmreVnzDavRB9eggkNppemdas9CbcASwUUAxD6VGCgB+MeOPV3ZR 8P+eAzgodEVpSaD9eLpS+dLzb5gZaWs3GFCI3SAuPHx9v/5OqGqcRepFUhZrWzwUjZsu uqWf4WYSGh1KfT9i6kmmMm3jI7hWFaEpm3glAQW6qidxu0PjCk/CWFAPDjZ+Ur9zRFGg flXC+DrW6VbUnSwcDsUmd/b997DNHQSMxThluBkzxGYyoQMB4IZBSZ/h4W0RTJI8tUJt 8MTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:to:from :delivered-to:arc-authentication-results; bh=CUItEgmgF0///X9gFkmih0yMy8V/OGIlNGRVmZFg750=; b=X+wLNq7f2gcnGAFjoO56xC0D+Iqts99D5Z2Fddbzo1zx6W3sPlHunq1GY97eYOzVEU 5RBBl7WpavwmUSOUV8KKHijgRapWroHTdqFlFjZzxSqm9reiSF5bGv4TvQKJo2mZXWp2 B7ITsG1heKE8k/L1m+3iQBNcZyStaiWaGDhOfaWbsp1GmUOPY2PylLd7qaYia58KJ9Uy /58EhD0UiZSBFVzTjqo4iYGk2DxeKBNYtFpA+1XII2QPfPZGhlIL1JZsAK7NAaYv3Mnt EyMojuZiXXjveBwITIc69HDxFKrf+7VYt6EsLVW5f8bXxLPWTIJjXhOGzzQ5XMCbtYsH 8uYg== ARC-Authentication-Results: i=1; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j18si12735869qta.23.2017.05.30.05.45.22; Tue, 30 May 2017 05:45:23 -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; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id BFE7360B12; Tue, 30 May 2017 12:45:22 +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=-4.7 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 9F19B60825; Tue, 30 May 2017 12:45:16 +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 824DF60AF8; Tue, 30 May 2017 12:45:14 +0000 (UTC) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30090.outbound.protection.outlook.com [40.107.3.90]) by lists.linaro.org (Postfix) with ESMTPS id 2F7C660683 for ; Tue, 30 May 2017 12:45:13 +0000 (UTC) Received: from DB6PR07CA0007.eurprd07.prod.outlook.com (2603:10a6:6:2d::17) by AM2PR07MB0579.eurprd07.prod.outlook.com (2a01:111:e400:840a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.6; Tue, 30 May 2017 12:45:11 +0000 Received: from AM5EUR03FT020.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::203) by DB6PR07CA0007.outlook.office365.com (2603:10a6:6:2d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.6 via Frontend Transport; Tue, 30 May 2017 12:45:11 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.240 as permitted sender) Received: from mailrelay.int.nokia.com (131.228.2.240) by AM5EUR03FT020.mail.protection.outlook.com (10.152.16.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1101.12 via Frontend Transport; Tue, 30 May 2017 12:45:10 +0000 Received: from fihe3nok0734.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v4UCifZ1020453 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 30 May 2017 15:44:41 +0300 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v4UCiemH020445 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Tue, 30 May 2017 15:44:40 +0300 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Tue, 30 May 2017 15:44:40 +0300 Message-ID: <20170530124440.5857-1-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.11.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.240; IPV:CAL; SCL:-1; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39450400003)(39840400002)(39410400002)(39850400002)(39400400002)(39860400002)(2970300002)(189002)(199003)(9170700003)(33646002)(5660300001)(22756006)(77096006)(189998001)(47776003)(6916009)(86362001)(305945005)(1076002)(105596002)(110136004)(38730400002)(106466001)(50986999)(2906002)(48376002)(356003)(5003940100001)(53936002)(81166006)(36756003)(50466002)(498600001)(8676002)(2351001)(8936002)(50226002)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM2PR07MB0579; H:mailrelay.int.nokia.com; FPR:; SPF:SoftFail; MLV:sfv; MX:3; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM5EUR03FT020; 1:tjE74B5GDzhv6miysbD32qH8PA04HJQY5NHck9C7XSG0jILrUloMMUK4pKdyF7wsbJYSJ15/oS9hqkoojBsZmAHhOUQbNDpO41kf3Rc2MBsHlDEfSY8u9PBt1adb7GOAbQQ0lsrpcDvt0X+wMYdtwft0BmocHrMPyJWTbeQ6esj6vKy5gHL627QHV1k6CaSWS5mpFNY9s2zb3+r/GaPl+6AYaJFPbAVCPXPxuOBCyIGjW1CJBogoQI4gps9cKKTR7AyhNTWileKj8C6Y4qW7oV1SQs0k0LscpXOSBw+SVqhlEXzB+qoYQKeXqEUTxHZsjfWbKZIn3DL0Bf3yEwn3zpfPaP/tiCd0UMupnvwMA+Mzqo7qs0GBLUeHPhauhLVMu8nhqTQ7pt3XmuYA95PvTX/JigfkyBrUYEXtTZgR59aQqjVDHZ/4DE2DA4hA5rrQLkvkVFpIh/Q3e/M2oagHtrjXEYjRtZa70jXNcOSEdLMDy/yx6ow8Bfp/PyfaKN9a MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM2PR07MB0579: X-MS-Office365-Filtering-Correlation-Id: 4519c075-2389-4d0e-2353-08d4a759b57c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081); SRVR:AM2PR07MB0579; X-Microsoft-Exchange-Diagnostics: 1; AM2PR07MB0579; 3:6BiBO4ls6sDda51HvkMyg1EgkGDmE6xgV3zolcLc7uY860URaWNGWrtIY37qLgLkbxB3gfWbyXnAU4AuCHNOLCHgkqxUFqKULFE5Yl6JxIofUt+i4rkiDvkAagNDnINkRBXgFkRbSH6etjWbMEOlqVyW9bNFg+H9QuKHqt6zLvbaHx+SbiVzVKNPspdnn9nsau7rIDWi89zjR1NrvD6yBpDka6KDPHbggQ92DYKERn1BuwCPRIcbNaTgfMN1Qsrn8GbnoznkqNgGh3udvallcJuXSwCOOrpcLw7IatcHRCyt0kX9+eJTLLJFSvtmbO2jOHzo2m4+EVgz7a5yH6/WWw3kEsOniPkvOG7955YR3MP6lrIpSUjaNlnN9azbalA1O+D4uZ32O3SL1gb+NXRW65qhsADcSzoskPNqzozzI7TZVusTfMEv9e3ARS/VDBH0tVAdpkWRMzMk2OlA3Rkjig== X-Microsoft-Exchange-Diagnostics: 1; AM2PR07MB0579; 25:dBd7192uk0gkiaKBuIO02wyc6kU1/PTBblz/55bRS7+z/ftCYPTJ3HYb8U/P8gj1GN2hmj5hiXFiorLqqgE1HHxTHDcBAbMnWA4udVtg2MQKnk2noJTZXQnR+pO9mzVbHKPHZ/4GAY+YZAp8nhFcEWKk6bb1tUBHEAfiwFe5xUh/Ljp22HTpzoNumV29dEsDQuCuLElUWFA3D55HFxrTTJjUHAhPoRhGMdumf4tvskLs7OwRTtxUw7AiV1pdNxH9lKuzdbFDqe8iwVVI8yPR6+cn6uRiDEks7sHftFua2iXkrNslHc/bmFzbI8WFPN1dI7DYjELiEsbU+21vz3r5a6GsZaY8zjMEN061Z7X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-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(131327999870524); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(13013025)(13021025)(10201501046)(93006095)(93003095)(3002001)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061750153)(20161123564025)(20161123555025)(20161123562025)(20161123558100)(20161123560025)(6072148); SRVR:AM2PR07MB0579; BCL:0; PCL:0; RULEID:; SRVR:AM2PR07MB0579; X-Microsoft-Exchange-Diagnostics: 1; AM2PR07MB0579; 4:zu1q7qUMuah2lbqnxKxw+0FAzN7Bu7eAHp6mRI9gxYUaRgRzGmUEGnfSZvgEv96Q2yI9jsmnYzG3nuTJOO1AfssbCFpwltZkaoXSLbzJN9u1gaGhB5LRDXQ09LTGF4wW45cZjPmLBwp5KNJDppFJLVx+TsTKNAK8yyyFR82ODMvF4bJ8fU+pVf4Vt06oGNPU7GdMd+xjFAzsphZWy+sXPFkgUGeWCoPPQ7sObcV5OS/wu9j5gAAJGH3GU4Wb+rKPpyyAD3wjAR812SvllS380SpjLChczepAaS0ujk9N8UlJC/plim7Zx8+GCCYbN+ufW9O96wMtJkgP7nSTvHHukw/pjGe/tQq2VHSusED7cJMzfVB1uO6rhLE66T/mP0f3dKxWvqWSbD+VGLc1mnMkLxfdy1MOUSvScs8IgRYjb2C9Fok1xSQoYHQCYz78Y/JlziA303+UuIp0MPLfqogHJQSowNY4pnJ9srYSGF/ps3tlwGGVOH3Q3lqAwtzCbZysTyPx1TWdXoqSwuphODJX4k/DRUqiz2tiyD9IfKPSfE8gPSuoaQEM5KLl1cF+V7S/1wKHVt4J9XB2ZNXXD+7MnVD3PsbEGlWaz6F5MqHQ+XUgTquwgBbHT1q6qhnQSr/CxEEPCm3wn7As6ioG3/h6rxiEjzA+sV12CvMQGIw+QNyf7gJPXcj8JuYol7DTkcW352pLgZspkxH4T9w7WtFuk+Lvb0BXBw69EBTk9O9NcrKw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guPoup+VIzcSAm2IM+7dXBUxRuT1GRSZEvt79gP0nZ3zRCjSsTXeQzlyM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR07MB0579; 7:ipOPFP6G9VPaKxuORmnZjqAwyw/87zOFefSJLcKp5ZsMMSz/S8prDDAjCUlnROcdEthZ0AEZdEJru+nGH1ZQHYXomp1K0iNYGBb4+/jUyHzzorY/5OjmlfuEGMZ4Z9asTmeHkioWhlG/OKOXQsIYCdBz4duSCsKX4bIoJ8y1jpCDg3kL8sbp+vOSXUeZmy4mFxkdaWNuOvBbLEIJsMPIiHrX/6p4iA/eZxrnAIhWZwo9HLuQNxJnSef97Coehkdv+YsMoBJbEXipWSwEsVK4EEcfmURNxfISHYc5HYQS1jZjmJOs8Byn8BFCD9rT26AzZ0d4wHFNDwQxCIyNsFQxvA== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2017 12:45:10.3103 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.240]; Helo=[mailrelay.int.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR07MB0579 Subject: [lng-odp] [API-NEXT PATCH v2] api: pool: additional packet length configuration 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: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Added packet pool parameters for more fine grained pool configuration. The basic usage of the parameters is not changed, except that implementation may now round up 'num' by default. Application can limit the round up with new 'max_num' parameter. Another new parameter (opt) allows application give hints and requirements about e.g. memory to be used for pools (or parts of pools). Additionally, pool configuration may be extended with a table of num/len/opt values. This gives application more flexibility to specify requirements for various packet sizes. Signed-off-by: Petri Savolainen --- include/odp/api/spec/pool.h | 138 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 127 insertions(+), 11 deletions(-) -- 2.11.0 diff --git a/include/odp/api/spec/pool.h b/include/odp/api/spec/pool.h index 6fc5b6b4..f9d9cbbb 100644 --- a/include/odp/api/spec/pool.h +++ b/include/odp/api/spec/pool.h @@ -41,6 +41,9 @@ extern "C" { * Maximum pool name length in chars including null char */ +/** Maximum number of packet pool subparameters */ +#define ODP_POOL_PKT_SUB_MAX 7 + /** * Pool capabilities */ @@ -156,6 +159,44 @@ typedef struct odp_pool_capability_t { int odp_pool_capability(odp_pool_capability_t *capa); /** + * Pool memory type + */ +typedef enum odp_pool_mem_type_t { + /** Default memory type */ + ODP_POOL_MEM_DEFAULT = 0, + + /** Fast memory */ + ODP_POOL_MEM_FAST + +} odp_pool_mem_type_t; + +/** + * Pool segmentation options + */ +typedef enum odp_pool_seg_opt_t { + /** Default segmentation. Pool may or may not store packet data into + * multiple segments. */ + ODP_POOL_SEG_DEFAULT = 0, + + /** Pool must not segment packets. All data of a packet must be stored + * into single, contiguous memory area. */ + ODP_POOL_SEG_DISABLED + +} odp_pool_seg_opt_t; + +/** + * Additional options for packet pool creation + */ +typedef struct odp_pool_pkt_opt_t { + /** Pool memory type */ + odp_pool_mem_type_t type; + + /** Segmentation options */ + odp_pool_seg_opt_t seg; + +} odp_pool_pkt_opt_t; + +/** * Pool parameters * Used to communicate pool creation options. * @note A single thread may not be able to allocate all 'num' elements @@ -185,25 +226,54 @@ typedef struct odp_pool_param_t { /** Parameters for packet pools */ struct { - /** The number of packets that the pool must provide - that are packet length 'len' bytes or smaller. - The maximum value is defined by pool capability - pkt.max_num. */ + /** The minimum number of packets that are packet length + * 'len' bytes or smaller. The maximum value is defined + * by pool capability pkt.max_num. An implementation + * may round up the value, as long as the 'max_num' + * parameter below is not violated. + */ uint32_t num; - /** Minimum packet length that the pool must provide - 'num' packets. The number of packets may be less - than 'num' when packets are larger than 'len'. - The maximum value is defined by pool capability - pkt.max_len. Use 0 for default. */ + /** The minimum packet length that at least 'num' + * packets are required. The maximum value is defined + * by pool capability pkt.max_len. Use 0 for default. + */ uint32_t len; + /** Packet pool options + * + * Options contain additional hints and requirements, + * which quide implementation e.g. to select correct + * memory type for the pool. + */ + odp_pool_pkt_opt_t opt; + + /** Number of subparameters + * + * The number of subparameter table (pkt.sub[]) entries + * filled in. Subparameters continue pool configuration + * after the three parameters ('num', 'len' and 'opt'). + * above. The value must not exceed + * ODP_POOL_PKT_SUB_MAX. The default value is 0. + */ + uint8_t num_sub; + /** Maximum packet length that will be allocated from the pool. The maximum value is defined by pool capability pkt.max_len. Use 0 for default (the pool maximum). */ uint32_t max_len; + /** Maximum number of packets + * + * This is the maximum number of packets of any length + * that can be allocated from the pool. The maximum + * value is defined by pool capability pkt.max_num. + * Use 0 for no requirement for maximum number. + * The default value is 0. + */ + uint32_t max_num; + /** Minimum number of packet data bytes that are stored in the first segment of a packet. The maximum value is defined by pool capability pkt.max_seg_len. @@ -214,6 +284,36 @@ typedef struct odp_pool_param_t { defined by pool capability pkt.max_uarea_size. Specify as 0 if no user area is needed. */ uint32_t uarea_size; + + /** Packet pool subparameters + * + * This table gives more fine grained requirements for + * pool configuration. The table continues from + * num/len/opt specification above. Therefore, + * pkt.sub[0].len must be greater than pkt.len, and + * pkt.sub[0].num refers to packet lengths between + * pkt.len + 1 and pkt.sub[0].len. + * + * Table enties must be ordered by the packet length. + * A number of packets figure (pkt.sub[N].num) refers + * to packet lengths between pkt.sub[N-1].len + 1 and + * pkt.sub[N].len. Each number of packets requirement + * may be rounded up, as long as the 'max_num' + * parameter is not violated. A pool fulfills each + * num/len requirement separately (when there are no + * other allocations from the pool). + */ + struct { + /** Number of packets */ + uint32_t num; + + /** Packet length in bytes */ + uint32_t len; + + /** Packet pool options */ + odp_pool_pkt_opt_t opt; + + } sub[ODP_POOL_PKT_SUB_MAX]; } pkt; /** Parameters for timeout pools */ @@ -278,8 +378,24 @@ odp_pool_t odp_pool_lookup(const char *name); * Used to get information about a pool. */ typedef struct odp_pool_info_t { - const char *name; /**< pool name */ - odp_pool_param_t params; /**< pool parameters */ + /** Pool name */ + const char *name; + + /** Copy of the pool parameters */ + odp_pool_param_t params; + + /** Packet pool info */ + struct { + /** Maximum number of packets of any length + * + * This many packets in maximum can be allocated from the pool. + * Application can use this e.g. to prepare enough per packet + * contexts. + */ + uint32_t max_num; + + } pkt; + } odp_pool_info_t; /**