From patchwork Wed Jan 13 16:59:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 59674 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp3483425lbb; Wed, 13 Jan 2016 08:59:25 -0800 (PST) X-Received: by 10.140.172.84 with SMTP id s81mr182004101qhs.40.1452704365665; Wed, 13 Jan 2016 08:59:25 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j32si1401719qga.91.2016.01.13.08.59.25; Wed, 13 Jan 2016 08:59:25 -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 Received: by lists.linaro.org (Postfix, from userid 109) id 1091461781; Wed, 13 Jan 2016 16:59:25 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=iYCSg/sp; dkim-adsp=none (unprotected policy); dkim-atps=neutral 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 533FF61739; Wed, 13 Jan 2016 16:59:21 +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 A703F6174B; Wed, 13 Jan 2016 16:59:19 +0000 (UTC) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) by lists.linaro.org (Postfix) with ESMTPS id C9F7561738 for ; Wed, 13 Jan 2016 16:59:18 +0000 (UTC) Received: by mail-lf0-f45.google.com with SMTP id h129so64335139lfh.3 for ; Wed, 13 Jan 2016 08:59:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=bz9d62Gj/2ZD2UwQCG2VJMeSxY9/jhnqp0rvtPWKltk=; b=iYCSg/spSoOYMdU23++NDZLZau6VZFqcv+Ch2cDyHQxjnZMJniN2IctkzyjezLMTBo flwDC+4zWwT85EaD2ypSx/soI2Lp2DXqH41C4beVT3I5INBXwjNUXnFNEXeCjF4z8dnA cxLGds5HC5CwXcL3KYRdyf1bw0ag6qMRqetdc= 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=bz9d62Gj/2ZD2UwQCG2VJMeSxY9/jhnqp0rvtPWKltk=; b=XvnbpzWL5xt/ToTqLKImPmIxxMh+Mioz2aqTxYYWda8LgjUk8FwqpU5IzI7xIJ0ADG dONAJ13iHg3sb/GYAvvPOf2Nllif46Q5DYEVDgDd76coV64UBMkZI5h0XsE0eN5xJte3 nXA8F4YvfqYUbruTZhg8iejcYSyCVSfN5nW7CXT/uFkR+SD1d9qXovPxPFM4Q8LmcyDj MNkFRvHyT/eEe9pw/HCpKj3oxcKGxNpmvWYfmgS7cMFw/DiSYbBt7hML7+rKAXi8M3X3 x1xBj+Q4CLKa+8YjsukqOhvbLFkPZkFi8KgoC6j0YWfDUTZ3aXkcZ+MfOAdQzF4BndQk H0lg== X-Gm-Message-State: ALoCoQmc2jniVFKiei9WgCwufT2nR9AypHYXY4fPbdUk8vSeo/YAYlOkc5dlaf5dsYTfWhQrtB+tluCM6R9V6I0K9pRjQmxrgA== X-Received: by 10.25.20.221 with SMTP id 90mr6287200lfu.98.1452704357744; Wed, 13 Jan 2016 08:59:17 -0800 (PST) Received: from localhost.localdomain ([195.238.92.128]) by smtp.gmail.com with ESMTPSA id b135sm286482lfe.28.2016.01.13.08.59.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Jan 2016 08:59:17 -0800 (PST) From: Ivan Khoronzhuk To: lng-odp@lists.linaro.org Date: Wed, 13 Jan 2016 18:59:08 +0200 Message-Id: <1452704348-11818-1-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [RFC PATCH] api: packet_io: return headroom when set new one 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" It can be used to restore headroom later. Does it possible a headroom to be > sizeof(int32)/2? Signed-off-by: Ivan Khoronzhuk --- include/odp/api/packet_io.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h index cf92751..7b9d82a 100644 --- a/include/odp/api/packet_io.h +++ b/include/odp/api/packet_io.h @@ -356,12 +356,12 @@ int odp_pktio_skip_set(odp_pktio_t pktio, uint32_t offset); * Must not exceed the implementation * defined ODP_PACKET_MAX_HEADROOM. * - * @retval 0 on success + * @retval prevoius headroom * @retval <0 on failure * * @note Optional. */ -int odp_pktio_headroom_set(odp_pktio_t pktio, uint32_t headroom); +int32_t odp_pktio_headroom_set(odp_pktio_t pktio, int32_t headroom); /** * Get printable value for an odp_pktio_t