From patchwork Mon Apr 10 23:02:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Eremin-Solenikov X-Patchwork-Id: 97219 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp1564054qgd; Mon, 10 Apr 2017 16:02:13 -0700 (PDT) X-Received: by 10.200.52.27 with SMTP id u27mr14044262qtb.67.1491865333348; Mon, 10 Apr 2017 16:02:13 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id n1si14751133qkl.166.2017.04.10.16.02.12; Mon, 10 Apr 2017 16:02:13 -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 589EB63538; Mon, 10 Apr 2017 23:02:12 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 4390063577; Mon, 10 Apr 2017 23:02:10 +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 7AF9C635C3; Mon, 10 Apr 2017 23:02:08 +0000 (UTC) Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com [209.85.215.54]) by lists.linaro.org (Postfix) with ESMTPS id 32B3A63538 for ; Mon, 10 Apr 2017 23:02:06 +0000 (UTC) Received: by mail-lf0-f54.google.com with SMTP id 75so18649851lfs.2 for ; Mon, 10 Apr 2017 16:02:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=7fbLlqp38wosxd8MxS4p2kkLGTWMLD+AB8G4EKZOuXI=; b=YvLTnDwU84554lGnK1JG4wE2YAVJqtGHlUn85ki8q/IPK8waLBGXQz9BhBz5xUBI9K du79GbcxNG1WG5fmHjMbOCKAdsTssC+YOit9nRibTXFNQfX1x6T9C6mQI1AzQsCIpifP SiYXSwXm/992ijcatx7Y7n88Uvp/s41QglCKEx7hcV7aG9DAPnGVTyS+tQhjSdibuO9X ixIIRZ3+84YmkMnAYITyQGhmdHqFUhZ2mWh8wxrIUhsD/0epU2tZX+ZjMHte9SXN7oOn nT63yr1s+7vBYGwavE9q3TQnJMIgKd6gJNzsKaACO33Cw7aW3/y3D3hOGjmfc/BQOvoK lw/Q== X-Gm-Message-State: AFeK/H1tQz+XNbtRpN1nvCMyz1D1QaTJ5Boam1Ns48mbp2GPqnyy9PPsxItnBFRQT18Oqwb3fzsJLGiK X-Received: by 10.46.77.12 with SMTP id a12mr15936123ljb.0.1491865324580; Mon, 10 Apr 2017 16:02:04 -0700 (PDT) Received: from forlindon.lumag.auriga.ru ([94.25.228.46]) by smtp.gmail.com with ESMTPSA id f9sm3173530lji.19.2017.04.10.16.02.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Apr 2017 16:02:03 -0700 (PDT) From: Dmitry Eremin-Solenikov To: lng-odp@lists.linaro.org Date: Tue, 11 Apr 2017 02:02:01 +0300 Message-Id: <20170410230201.15919-1-dmitry.ereminsolenikov@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [lng-odp] [PATCH] api: ipsec: change semantics of odp_ipsec_result function 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" - Move packets from the event instead of copying them. This simplifies event handling/freeing code, which now does not have to track, which packets were copied from the event and which packets should be freed. - Do not require to free the event before processing packets. This allows one to copy packets from the event in small batches and process them accordingly. Signed-off-by: Dmitry Eremin-Solenikov --- include/odp/api/spec/ipsec.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.11.0 diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h index a0ceb11a..8c7750f7 100644 --- a/include/odp/api/spec/ipsec.h +++ b/include/odp/api/spec/ipsec.h @@ -1278,8 +1278,7 @@ int odp_ipsec_out_inline(const odp_ipsec_op_param_t *op_param, * Get IPSEC results from an ODP_EVENT_IPSEC_RESULT event * * Copies IPSEC operation results from an event. The event must be of - * type ODP_EVENT_IPSEC_RESULT. It must be freed before the application passes - * any resulting packet handles to other ODP calls. + * type ODP_EVENT_IPSEC_RESULT. It must be freed via odp_event_free(). * * @param[out] result Pointer to operation result for output. Maybe NULL, if * application is interested only on the number of @@ -1288,7 +1287,8 @@ int odp_ipsec_out_inline(const odp_ipsec_op_param_t *op_param, * * @return Number of packets in the event. If this is larger than * 'result.num_pkt', all packets did not fit into result struct and - * application must call the function again with a larger result struct. + * application must call the function again. Packets returned during + * previous calls will not be returned again in subsequent calls. * @retval <0 On failure * * @see odp_ipsec_in_enq(), odp_ipsec_out_enq()