From patchwork Tue Feb 3 04:44:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 44196 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4DEB22034D for ; Tue, 3 Feb 2015 04:46:20 +0000 (UTC) Received: by mail-la0-f70.google.com with SMTP id ge10sf18884240lab.1 for ; Mon, 02 Feb 2015 20:46:19 -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=oQY5MThemcNxgAnX6P5KtsWljIQo3hWoZlTWt6+HDsY=; b=kbotWVTeC49CFX61LGJJezb1ZRw5RjLz8SR1VakDj0ATmS4saWGPeNnwWi+0y77Tm2 F2W9NsxCCZlFhaKpvdNyUM6EH6d0b8qcODD9EIn/svYzxU99nUNhidNJjfaE0695xpAP 9zqfni2cY5Sft+o0AMmPzB0HLA0Iqapo8JEsh5XfBsgSvM6O03zjXvOH31FkxQkRV3ww SRyIpxyX0QNVvmd+G6DKPYqgQNL/l5q+KMjIKZtPZi4d9hatng6KYkN0ZSdUbQnQLrOW 6/FKCYwPUkJ9CVg8TGOY5rz3B3bcfxPpFIqeKuAkSQv6EoX7mq0luTHyelzWY6ffKvx9 /3LA== X-Gm-Message-State: ALoCoQnyMWaZzQYnL5w1hz/gTJ3SSGqIwyIDuccMDd9Z0RbtN9yMxmqcVe0dvLAeuHUWTvx74ME6 X-Received: by 10.112.161.201 with SMTP id xu9mr2832682lbb.11.1422938779184; Mon, 02 Feb 2015 20:46:19 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.71 with SMTP id k7ls714638laf.9.gmail; Mon, 02 Feb 2015 20:46:18 -0800 (PST) X-Received: by 10.152.206.2 with SMTP id lk2mr18279650lac.13.1422938778828; Mon, 02 Feb 2015 20:46:18 -0800 (PST) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id q10si18339240laq.122.2015.02.02.20.46.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Feb 2015 20:46:18 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by mail-la0-f41.google.com with SMTP id gm9so48027673lab.0 for ; Mon, 02 Feb 2015 20:46:18 -0800 (PST) X-Received: by 10.112.125.41 with SMTP id mn9mr22476077lbb.80.1422938778521; Mon, 02 Feb 2015 20:46:18 -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 h5csp1712508lbj; Mon, 2 Feb 2015 20:46:17 -0800 (PST) X-Received: by 10.224.2.71 with SMTP id 7mr50423187qai.94.1422938777208; Mon, 02 Feb 2015 20:46:17 -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 k89si27705625qge.62.2015.02.02.20.46.16 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 02 Feb 2015 20:46:17 -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 1YIVNO-00069A-0X; Tue, 03 Feb 2015 04:46:14 +0000 Received: from mail-oi0-f49.google.com ([209.85.218.49]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YIVMm-00060r-Hk for lng-odp@lists.linaro.org; Tue, 03 Feb 2015 04:45:36 +0000 Received: by mail-oi0-f49.google.com with SMTP id a3so47353432oib.8 for ; Mon, 02 Feb 2015 20:45:31 -0800 (PST) X-Received: by 10.202.45.9 with SMTP id t9mr13492094oit.100.1422938731309; Mon, 02 Feb 2015 20:45:31 -0800 (PST) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id vs5sm10277537oeb.14.2015.02.02.20.45.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Feb 2015 20:45:30 -0800 (PST) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Mon, 2 Feb 2015 22:44:53 -0600 Message-Id: <1422938699-12877-14-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1422938699-12877-1-git-send-email-bill.fischofer@linaro.org> References: <1422938699-12877-1-git-send-email-bill.fischofer@linaro.org> X-Topics: crypto patch Subject: [lng-odp] [PATCHv5 13/19] linux-generic: crypto: add strong typing support 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: bill.fischofer@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.41 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: Bill Fischofer --- platform/linux-generic/include/odp/plat/crypto_types.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/include/odp/plat/crypto_types.h b/platform/linux-generic/include/odp/plat/crypto_types.h index d0c61b0..3c26aa1 100644 --- a/platform/linux-generic/include/odp/plat/crypto_types.h +++ b/platform/linux-generic/include/odp/plat/crypto_types.h @@ -25,7 +25,7 @@ extern "C" { #define ODP_CRYPTO_SESSION_INVALID (0xffffffffffffffffULL) typedef uint64_t odp_crypto_session_t; -typedef odp_packet_t odp_crypto_compl_t; +typedef odp_handle_t odp_crypto_compl_t; enum odp_crypto_op_mode { ODP_CRYPTO_SYNC, @@ -68,6 +68,17 @@ enum crypto_hw_err { ODP_CRYPTO_HW_ERR_BP_DEPLETED, }; +/** Get printable format of odp_crypto_session_t */ +static inline uint64_t odp_crypto_session_to_u64(odp_crypto_session_t hdl) +{ + return (uint64_t)hdl; +} + +/** Get printable format of odp_crypto_compl_t_t */ +static inline uint64_t odp_crypto_compl_to_u64(odp_crypto_compl_t hdl) +{ + return _odp_pri(hdl); +} /** * @}