From patchwork Tue Feb 24 11:03:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 44931 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7CE5120502 for ; Tue, 24 Feb 2015 11:03:29 +0000 (UTC) Received: by lams18 with SMTP id s18sf16405730lam.1 for ; Tue, 24 Feb 2015 03:03:28 -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=i3rUmuyx4Xd9xH7vLBunzBpXt60nnuJrL9O8ytYuzG8=; b=e6Oe0akAI19/O2ee72RkH7JeD52W5DZJwCQt/k2PcoaMQvWv3LVK/fRKJsS1+impMf IbwP71+Wh7z0+0+0nSAHeL+zhzpYk4iSVcbs9JEta8jWKe8npc9pib9n2Ph3j1N78JMe 1ZNooFMGnW9UnC+gQb05qsmXQtrrR/Tzph41yHoBOx6S2fWMwKb4eZDRx3lW5Fo/u0Su sXfl+P/HPDzs/JcUgNhmZq1qGeeNaIZm+SFkoufaJbuglyaoUkzPRGzNDJiCiBbq8hOo 8YWzjA4uPJ247nIHsNdb3rLFI0nAHG5B1g4/dozF9vOI7R2NBl5I6mcPiJbt3Ou08w+8 6Bfw== X-Gm-Message-State: ALoCoQm+PsvEUFQxnChxGZXzs8Rai8Bh4bGlsfy4H9L46q4RO4XbotFK4OiqCCgIt4wnY37SBSGI X-Received: by 10.112.35.135 with SMTP id h7mr2018047lbj.23.1424775808409; Tue, 24 Feb 2015 03:03:28 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.225.132 with SMTP id rk4ls214848lac.79.gmail; Tue, 24 Feb 2015 03:03:28 -0800 (PST) X-Received: by 10.112.54.228 with SMTP id m4mr13998749lbp.20.1424775808267; Tue, 24 Feb 2015 03:03:28 -0800 (PST) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id qx4si6249891lbb.107.2015.02.24.03.03.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Feb 2015 03:03:28 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbdu10 with SMTP id u10so24061635lbd.7 for ; Tue, 24 Feb 2015 03:03:28 -0800 (PST) X-Received: by 10.152.203.194 with SMTP id ks2mr6370115lac.88.1424775808181; Tue, 24 Feb 2015 03:03:28 -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 h5csp1834964lbj; Tue, 24 Feb 2015 03:03:27 -0800 (PST) X-Received: by 10.140.82.71 with SMTP id g65mr33255533qgd.42.1424775806971; Tue, 24 Feb 2015 03:03:26 -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 d1si2038875qag.120.2015.02.24.03.03.25 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 24 Feb 2015 03:03:26 -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 1YQDGu-0000WG-6a; Tue, 24 Feb 2015 11:03:24 +0000 Received: from mail-lb0-f170.google.com ([209.85.217.170]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YQDGk-0000Nv-4c for lng-odp@lists.linaro.org; Tue, 24 Feb 2015 11:03:14 +0000 Received: by lbvp9 with SMTP id p9so24235840lbv.0 for ; Tue, 24 Feb 2015 03:03:08 -0800 (PST) X-Received: by 10.152.29.102 with SMTP id j6mr14176820lah.12.1424775788488; Tue, 24 Feb 2015 03:03:08 -0800 (PST) Received: from localhost.localdomain ([80.77.38.170]) by mx.google.com with ESMTPSA id pq1sm6180805lbb.41.2015.02.24.03.03.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 Feb 2015 03:03:07 -0800 (PST) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Tue, 24 Feb 2015 13:03:01 +0200 Message-Id: <1424775782-15453-2-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1424775782-15453-1-git-send-email-taras.kondratiuk@linaro.org> References: <1424775782-15453-1-git-send-email-taras.kondratiuk@linaro.org> X-Topics: crypto patch Subject: [lng-odp] [PATCHv2 1/2] api: crypto: add error code for invalid IV 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.217.173 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 Add an error code for a case when a session is created without specifying an IV value, and then crypto operation is invoked without a valid override_iv_ptr. Signed-off-by: Taras Kondratiuk --- include/odp/api/crypto.h | 3 +++ platform/linux-generic/include/odp/plat/crypto_types.h | 1 + 2 files changed, 4 insertions(+) diff --git a/include/odp/api/crypto.h b/include/odp/api/crypto.h index a71753c..506f765 100644 --- a/include/odp/api/crypto.h +++ b/include/odp/api/crypto.h @@ -223,6 +223,9 @@ typedef struct odp_crypto_op_params { * * @enum crypto_alg_err:ODP_CRYPTO_ALG_ERR_ICV_CHECK * Computed ICV value mismatch + * + * @enum crypto_alg_err:ODP_CRYPTO_ALG_ERR_IV_INVALID + * IV value not specified */ /** diff --git a/platform/linux-generic/include/odp/plat/crypto_types.h b/platform/linux-generic/include/odp/plat/crypto_types.h index 3c26aa1..1b10a5d 100644 --- a/platform/linux-generic/include/odp/plat/crypto_types.h +++ b/platform/linux-generic/include/odp/plat/crypto_types.h @@ -60,6 +60,7 @@ enum crypto_alg_err { ODP_CRYPTO_ALG_ERR_DATA_SIZE, ODP_CRYPTO_ALG_ERR_KEY_SIZE, ODP_CRYPTO_ALG_ERR_ICV_CHECK, + ODP_CRYPTO_ALG_ERR_IV_INVALID, }; enum crypto_hw_err {