From patchwork Tue Dec 16 14:19:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 42336 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6869A26C54 for ; Tue, 16 Dec 2014 14:20:13 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id bs8sf4992224wib.10 for ; Tue, 16 Dec 2014 06:20:12 -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:in-reply-to :references: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=XH7uJ6y9AxybC9MYWqSuQWcQ4k7wSwf6kZ2MhGp4w9g=; b=Vzfygqavh7AMsPZrBgpcuAWyltwlBLEgafRj5JlJuubaZpIP/YhjtR3tiOrzL5v5B7 JHQS8N74Sdz0uDTL6yIupPmyRY4kMe75JHEJ4OYfnnjYP3tUTW62uKFnYdBoXr6Lt3X6 zjUQh9rt9H0muxRz9/EN231d9xjYaHlvp+naL+gtpndGFGLEHfrgOTgzvlY18k8dLxdb V4Y4iel7L7yj2Colmr7tUNrUkFgjsCquoH3+0TVpbIXiMFdkC/gCcWIW6LsW6XYui019 i1LjauwLuVyrou7nXDBydJpkSHRx+OjM/UYildh2w7CsWgiPu8QbUOWc0TavUTUzufQD UVuA== X-Gm-Message-State: ALoCoQmCAufUINrKbN3YQEM9t22MBW9up9KfA/H9CXGXNieqojz9vheHX27il/trVErpuWNeK3sB X-Received: by 10.180.105.97 with SMTP id gl1mr503936wib.7.1418739612746; Tue, 16 Dec 2014 06:20:12 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.97 with SMTP id r1ls989589lar.0.gmail; Tue, 16 Dec 2014 06:20:12 -0800 (PST) X-Received: by 10.112.119.201 with SMTP id kw9mr35521971lbb.99.1418739612306; Tue, 16 Dec 2014 06:20:12 -0800 (PST) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id q9si903966lag.91.2014.12.16.06.20.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Dec 2014 06:20:12 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id s18so11264108lam.2 for ; Tue, 16 Dec 2014 06:20:12 -0800 (PST) X-Received: by 10.152.25.129 with SMTP id c1mr36499701lag.9.1418739612222; Tue, 16 Dec 2014 06:20:12 -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.142.69 with SMTP id ru5csp1051189lbb; Tue, 16 Dec 2014 06:20:08 -0800 (PST) X-Received: by 10.140.106.35 with SMTP id d32mr61724593qgf.48.1418739608234; Tue, 16 Dec 2014 06:20:08 -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 h32si984884qgf.31.2014.12.16.06.20.07 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 16 Dec 2014 06:20:08 -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 1Y0syr-0001h1-Vq; Tue, 16 Dec 2014 14:20:05 +0000 Received: from mail-la0-f49.google.com ([209.85.215.49]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1Y0syY-0001fE-Tf for lng-odp@lists.linaro.org; Tue, 16 Dec 2014 14:19:47 +0000 Received: by mail-la0-f49.google.com with SMTP id hs14so11137051lab.22 for ; Tue, 16 Dec 2014 06:19:41 -0800 (PST) X-Received: by 10.112.219.37 with SMTP id pl5mr33179237lbc.25.1418739581361; Tue, 16 Dec 2014 06:19:41 -0800 (PST) Received: from uglx0153363.synapse.com ([195.238.92.128]) by mx.google.com with ESMTPSA id l9sm240769lae.0.2014.12.16.06.19.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Dec 2014 06:19:40 -0800 (PST) From: Taras Kondratiuk To: lng-odp@lists.linaro.org, robking@cisco.com Date: Tue, 16 Dec 2014 16:19:30 +0200 Message-Id: <1418739571-656-4-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1418739571-656-1-git-send-email-taras.kondratiuk@linaro.org> References: <1418739571-656-1-git-send-email-taras.kondratiuk@linaro.org> X-Topics: crypto patch Subject: [lng-odp] [PATCHv2 3/4] linux-generic: crypto: implement odp_crypto_get_operation_compl_packet() 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: taras.kondratiuk@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.43 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 Signed-off-by: Taras Kondratiuk --- platform/linux-generic/include/odp_crypto_internal.h | 1 + platform/linux-generic/odp_crypto.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/platform/linux-generic/include/odp_crypto_internal.h b/platform/linux-generic/include/odp_crypto_internal.h index 7ea1f5c..2e5a71c 100644 --- a/platform/linux-generic/include/odp_crypto_internal.h +++ b/platform/linux-generic/include/odp_crypto_internal.h @@ -70,6 +70,7 @@ typedef struct odp_crypto_generic_op_result { odp_crypto_compl_status_t cipher; odp_crypto_compl_status_t auth; void *op_context; + odp_packet_t out_pkt; } odp_crypto_generic_op_result_t; /** diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index 8bbca94..5493eff 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -386,6 +386,7 @@ odp_crypto_operation(odp_crypto_op_params_t *params, result->cipher.hw_err = ODP_CRYPTO_HW_ERR_NONE; result->auth.alg_err = rc_auth; result->auth.hw_err = ODP_CRYPTO_HW_ERR_NONE; + result->out_pkt = params->out_pkt; /* If specified during creation post event to completion queue */ if (ODP_QUEUE_INVALID != session->compl_queue) { @@ -472,8 +473,12 @@ void } odp_packet_t -odp_crypto_get_operation_compl_packet(odp_buffer_t completion_event ODP_UNUSED) +odp_crypto_get_operation_compl_packet(odp_buffer_t completion_event) { - ODP_UNIMPLEMENTED(); - return ODP_PACKET_INVALID; + odp_crypto_generic_op_result_t *result; + + result = get_op_result_from_buffer(completion_event); + ODP_ASSERT(OP_RESULT_MAGIC == result->magic, "Bad completion magic"); + + return result->out_pkt; }