From patchwork Tue Feb 3 12:59:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 44223 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E5A932034D for ; Tue, 3 Feb 2015 13:00:24 +0000 (UTC) Received: by mail-wi0-f197.google.com with SMTP id n3sf25562310wiv.0 for ; Tue, 03 Feb 2015 05:00:24 -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=zfMdO+iilQg7XIwHnC9OPme4OT7AvDLtG+mcSt6EIqA=; b=QJyhPj4SoORVNvKQ2DXxVayLZ5T4DDoaEEhD5li7001/aqUZqjZf/KbiRixQOJPH7f KpEotENOZXAyfkoGTigzjag2i7dj/kFHvJ9zUmkfYbHaMM39ATYhjGysbxWewwbiG3qu XIF0v899f9m51h5vgp+zib5TBzAoXYSe3UHORelBhOdwFx/DxkIf0p8SKndI6JMyo/3j CEP9P4myg5SpQ/hcPR5e8y4VC+gQg1GhHvpgcjp4SEpaguUFG+eWzoSuJjqDvraZyki4 qBd692RMGPGSMQTOcd5MdAd5vcHg/UWIesxrm06q0qB7b5OBL65Q8ln+9YHQdvCwAEJj oKOg== X-Gm-Message-State: ALoCoQkdDmXwENEb0cZQW1l043EHrjQvMGar4+LM2RWeWgOaaJqVyJNJxZp+IAviJcroo3bNN8+D X-Received: by 10.180.80.7 with SMTP id n7mr1947998wix.0.1422968424139; Tue, 03 Feb 2015 05:00:24 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.74 with SMTP id q10ls738817laq.43.gmail; Tue, 03 Feb 2015 05:00:23 -0800 (PST) X-Received: by 10.152.3.70 with SMTP id a6mr24193708laa.71.1422968423839; Tue, 03 Feb 2015 05:00:23 -0800 (PST) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id mz7si19099876lbb.36.2015.02.03.05.00.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 05:00:23 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by mail-la0-f52.google.com with SMTP id ge10so51342919lab.11 for ; Tue, 03 Feb 2015 05:00:23 -0800 (PST) X-Received: by 10.112.41.234 with SMTP id i10mr24367755lbl.25.1422968423694; Tue, 03 Feb 2015 05:00:23 -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.35.133 with SMTP id h5csp1920951lbj; Tue, 3 Feb 2015 05:00:21 -0800 (PST) X-Received: by 10.140.31.163 with SMTP id f32mr45723917qgf.23.1422968421130; Tue, 03 Feb 2015 05:00:21 -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 j10si28756490qga.33.2015.02.03.05.00.20 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 03 Feb 2015 05:00:21 -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 1YId5W-00048F-4c; Tue, 03 Feb 2015 13:00:18 +0000 Received: from mail-qa0-f42.google.com ([209.85.216.42]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YId5Q-00046S-Av for lng-odp@lists.linaro.org; Tue, 03 Feb 2015 13:00:12 +0000 Received: by mail-qa0-f42.google.com with SMTP id dc16so33584152qab.1 for ; Tue, 03 Feb 2015 05:00:07 -0800 (PST) X-Received: by 10.140.84.136 with SMTP id l8mr48824254qgd.86.1422968407057; Tue, 03 Feb 2015 05:00:07 -0800 (PST) Received: from mcpro03.emea.nsn-net.net (ec2-23-23-178-99.compute-1.amazonaws.com. [23.23.178.99]) by mx.google.com with ESMTPSA id n4sm21194037qas.20.2015.02.03.05.00.04 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 05:00:05 -0800 (PST) From: Petri Savolainen To: lng-odp@lists.linaro.org Date: Tue, 3 Feb 2015 14:59:26 +0200 Message-Id: <1422968368-14340-1-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.2.2 X-Topics: patch Subject: [lng-odp] [PATCH v2 1/3] api: pool: Added packet pool parameters 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: petri.savolainen@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.52 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 Completed odp_pool_param_t definition with packet pool parameters. Parameter definition is close to what we are using already. * seg_len: Defines minimum segment buffer length. With this parameter user can: * trade-off between pool memory usage and SW performance (linear memory access) * avoid segmentation in packet head (e.g. if legacy app cannot handle segmentation in the middle of the packet headers) * seg_len < ODP_CONFIG_PACKET_SEG_LEN_MIN is rounded up to ODP_CONFIG_PACKET_SEG_LEN_MIN * seg_len > ODP_CONFIG_PACKET_SEG_LEN_MAX is not valid * seg_align: Defines minimum segment buffer alignment. With this parameter, user can force buffer alignment to match e.g. aligment requirements of data structures stored in or algorithms accessing the packet headroom. When user don't have specific alignment requirement 0 should be used for default. * seg_num: Number of segments. This is also the maximum number of packets. Signed-off-by: Petri Savolainen --- include/odp/api/pool.h | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/include/odp/api/pool.h b/include/odp/api/pool.h index d09d92e..a1d7494 100644 --- a/include/odp/api/pool.h +++ b/include/odp/api/pool.h @@ -61,13 +61,29 @@ typedef struct odp_pool_param_t { of 8. */ uint32_t num; /**< Number of buffers in the pool */ } buf; -/* Reserved for packet and timeout specific params struct { - uint32_t seg_size; - uint32_t seg_align; - uint32_t num; + uint32_t seg_len; /**< Minimum packet segment buffer + length in bytes. It includes + possible head-/tailroom bytes. + The maximum value is defined by + ODP_CONFIG_PACKET_SEG_LEN_MAX. + Use 0 for default length. */ + uint32_t seg_align; /**< Minimum packet segment buffer + alignment in bytes. Valid + values are powers of two. The + maximum value is defined by + ODP_CONFIG_PACKET_SEG_ALIGN_MAX + . Use 0 for default alignment. + Default will always be a + multiple of 8. + */ + uint32_t seg_num; /**< Number of packet segments in + the pool. This is also the + maximum number of packets, + since each packet consist of + at least one segment. + */ } pkt; -*/ struct { uint32_t __res1; /* Keep struct identical to buf, */ uint32_t __res2; /* until pool implementation is fixed*/