From patchwork Tue Apr 26 14:17:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 66702 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1640034qge; Tue, 26 Apr 2016 07:17:42 -0700 (PDT) X-Received: by 10.50.246.14 with SMTP id xs14mr19844109igc.47.1461680262403; Tue, 26 Apr 2016 07:17:42 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id mx6si23539665igb.40.2016.04.26.07.17.41; Tue, 26 Apr 2016 07:17:42 -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 dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 7ABEB610D5; Tue, 26 Apr 2016 14:17:41 +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.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 ADE6B610AC; Tue, 26 Apr 2016 14:17:33 +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 89088610AE; Tue, 26 Apr 2016 14:17:27 +0000 (UTC) Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by lists.linaro.org (Postfix) with ESMTPS id 791D3610A6 for ; Tue, 26 Apr 2016 14:17:26 +0000 (UTC) Received: by mail-oi0-f49.google.com with SMTP id x19so16165020oix.2 for ; Tue, 26 Apr 2016 07:17:26 -0700 (PDT) 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=P5fw3UpfKXhEwVQ3Tw5UryJIMXoN1W96HkTltjV3U8A=; b=ZTGCgMZR+3OCBdGhe3Xb024GFVl5A0zBYO36tJMeBYcta7MrvMT1GpwiAJQ46yZGnc RjF5YIMl+UNYDacr8DrRHw1p5jtC5eSnzBKamc0OYOBm9BEYg16c49iU0IqebqRLbRlh QhNNdIBwyjluQcnCj+TX4SF9ltxS5VIj8BiuPx1YMfhBtrJpuXLhyvXZw9H6s5Scr5MV 5/K1qxGQwvpCk/SFCEoJEIuDz0e+mJbI/c3nY4nDYFWy7zHj0CahSza2xCoaE1tZ4cjL hqJhz3Po8qtNUu79rjyVIBbR0CByavj/FjSnilHQVJijqv5+iKx1keIwzpNFbsxF0Wc6 n21Q== X-Gm-Message-State: AOPr4FWMvkJ2svs5o/fGRhgdxcSX50P2dEHFABJKwgyE3BjVK3Lk+qYHB2c2DP8X8r2D/o/bXCo= X-Received: by 10.157.46.196 with SMTP id w62mr1209458ota.7.1461680245986; Tue, 26 Apr 2016 07:17:25 -0700 (PDT) Received: from Ubuntu15.localdomain (cpe-66-68-129-43.austin.res.rr.com. [66.68.129.43]) by smtp.gmail.com with ESMTPSA id u11sm8106786oie.29.2016.04.26.07.17.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 Apr 2016 07:17:25 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 26 Apr 2016 09:17:23 -0500 Message-Id: <1461680243-2101-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.5.0 X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv2] api: packet: update description for odp_packet_align() 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" Minor rewording for clarity and to specify 0 as a don't care value for the align parameter and to define behavior on excessive alignment requests. Signed-off-by: Bill Fischofer --- include/odp/api/spec/packet.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/odp/api/spec/packet.h b/include/odp/api/spec/packet.h index de128df..5e84abb 100644 --- a/include/odp/api/spec/packet.h +++ b/include/odp/api/spec/packet.h @@ -646,11 +646,11 @@ int odp_packet_rem_data(odp_packet_t *pkt, uint32_t offset, uint32_t len); * Align packet data * * Modify packet data alignment so that 'len' bytes between 'offset' and - * 'offset' plus 'len' are contiguous in memory and start in minimum alignment + * 'offset' plus 'len' are contiguous in memory and have a minimum alignment * of 'align' bytes. * * A successful operation overwrites the packet handle with a new handle, which - * application must use as the reference to the packet instead of the old + * the application must use as the reference to the packet instead of the old * handle. Depending on the implementation, the old and new handles may be * equal. * @@ -667,7 +667,11 @@ int odp_packet_rem_data(odp_packet_t *pkt, uint32_t offset, uint32_t len); * @param offset Byte offset of the contiguous area * @param len Byte length of the contiguous area (0 ... packet_len) * @param align Minimum byte alignment of the contiguous area. - * Implementation rounds up to nearest power of two. + * Valid values are powers of 2. Use 0 to indicate no + * special alignment requirement. All implementations + * support alignments of up to at least 32 bytes. Request + * will fail if requested alignment exceeds implementation + * limits. * * @retval 0 Operation successful, old pointers remain valid * @retval >0 Operation successful, old pointers need to be updated