From patchwork Wed Jun 10 02:50:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 49672 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 47EE421419 for ; Wed, 10 Jun 2015 02:51:04 +0000 (UTC) Received: by lagh7 with SMTP id h7sf9085379lag.2 for ; Tue, 09 Jun 2015 19:51:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id: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=7CgZfsb3DTZ8FyFWTNK1Cdeg80cfpXTTHte1nIAJj48=; b=J9FN4zVyD4haC8vzX6oGtfAllhhbFzDamtThjQ+TMAJ7ra2rtuskUL66oJqk8Oh1oE llg+urIoM+vUTguafw0xB7fXf2UvYpKGD+lXeu14Z/aVpzj71BSdRNw7Ps2+DMlpZX2i GmgVmHP+KPVLbUlga/Mlhel7Xr+otn3fY/Ey9qe2QlO2b08yl+rmkkuwJEorD1xSQXIl xh67oF/4qf30XWV/1NIHz9A6/24Lq3jA9Rzsy8u2ZVBOJ2I795XHA0VQfzF7WvQQyB41 uYGr4Nfv8v9YMzpmxNOU4BxeCexqEYu+uX4VYkspuTdd/WpoAmkGrgXVVsKAk0OGZa27 eVvg== X-Gm-Message-State: ALoCoQnyc8oO09tPlkeqgqKusmkR/kvI6ZWA1TUWWMWx1g1wu6mSPkMt0rgFym/s8YLP0EScRaUT X-Received: by 10.112.122.13 with SMTP id lo13mr815101lbb.5.1433904663275; Tue, 09 Jun 2015 19:51:03 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.10 with SMTP id p10ls166005lag.29.gmail; Tue, 09 Jun 2015 19:51:02 -0700 (PDT) X-Received: by 10.152.27.74 with SMTP id r10mr773761lag.31.1433904662825; Tue, 09 Jun 2015 19:51:02 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id ax10si7387133lbc.94.2015.06.09.19.51.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jun 2015 19:51:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by laew7 with SMTP id w7so23574092lae.1 for ; Tue, 09 Jun 2015 19:51:02 -0700 (PDT) X-Received: by 10.112.219.70 with SMTP id pm6mr746014lbc.41.1433904662715; Tue, 09 Jun 2015 19:51:02 -0700 (PDT) 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.108.230 with SMTP id hn6csp3021412lbb; Tue, 9 Jun 2015 19:51:01 -0700 (PDT) X-Received: by 10.55.50.141 with SMTP id y135mr1475875qky.91.1433904661488; Tue, 09 Jun 2015 19:51:01 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id w53si7283948qge.37.2015.06.09.19.50.59; Tue, 09 Jun 2015 19:51:01 -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; Received: by lists.linaro.org (Postfix, from userid 109) id DE1BD61C9C; Wed, 10 Jun 2015 02:50:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 0941A61B22; Wed, 10 Jun 2015 02:50:56 +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 21B7E61B3B; Wed, 10 Jun 2015 02:50:54 +0000 (UTC) Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by lists.linaro.org (Postfix) with ESMTPS id 63C3C61814 for ; Wed, 10 Jun 2015 02:50:53 +0000 (UTC) Received: by oihd6 with SMTP id d6so23690530oih.2 for ; Tue, 09 Jun 2015 19:50:53 -0700 (PDT) X-Received: by 10.60.35.42 with SMTP id e10mr680766oej.26.1433904652868; Tue, 09 Jun 2015 19:50:52 -0700 (PDT) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by mx.google.com with ESMTPSA id c85sm5749890oig.14.2015.06.09.19.50.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Jun 2015 19:50:52 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Tue, 9 Jun 2015 21:50:47 -0500 Message-Id: <1433904647-7151-1-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.0 X-Topics: crypto patch Subject: [lng-odp] [PATCH] linux-generic: crypto: eliminate buffer type hack for completions X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 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" 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.48 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 odp_crypto_operation() should not change underlying buffer types for completions as these are purely internal and not needed, and doing so is confusing and error-prome. Signed-off-by: Bill Fischofer Signed-off-by: Bill Fischofer --- platform/linux-generic/include/odp_buffer_internal.h | 9 --------- platform/linux-generic/odp_buffer.c | 7 ------- platform/linux-generic/odp_crypto.c | 5 ----- 3 files changed, 21 deletions(-) diff --git a/platform/linux-generic/include/odp_buffer_internal.h b/platform/linux-generic/include/odp_buffer_internal.h index e7b7568..2595b2d 100644 --- a/platform/linux-generic/include/odp_buffer_internal.h +++ b/platform/linux-generic/include/odp_buffer_internal.h @@ -162,15 +162,6 @@ odp_buffer_t buffer_alloc(odp_pool_t pool, size_t size); */ int _odp_buffer_type(odp_buffer_t buf); -/* - * Buffer type set - * - * @param buf Buffer handle - * @param type New type value - * - */ - void _odp_buffer_type_set(odp_buffer_t buf, int type); - #ifdef __cplusplus } #endif diff --git a/platform/linux-generic/odp_buffer.c b/platform/linux-generic/odp_buffer.c index 0803805..19b9dbd 100644 --- a/platform/linux-generic/odp_buffer.c +++ b/platform/linux-generic/odp_buffer.c @@ -47,13 +47,6 @@ int _odp_buffer_type(odp_buffer_t buf) return hdr->type; } -void _odp_buffer_type_set(odp_buffer_t buf, int type) -{ - odp_buffer_hdr_t *hdr = odp_buf_to_hdr(buf); - - hdr->type = type; -} - int odp_buffer_is_valid(odp_buffer_t buf) { diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index b16316c..e103066 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -424,8 +424,6 @@ odp_crypto_operation(odp_crypto_op_params_t *params, /* Linux generic will always use packet for completion event */ completion_event = odp_packet_to_event(params->out_pkt); - _odp_buffer_type_set(odp_buffer_from_event(completion_event), - ODP_EVENT_CRYPTO_COMPL); /* Asynchronous, build result (no HW so no errors) and send it*/ op_result = get_op_result_from_event(completion_event); @@ -510,9 +508,6 @@ odp_random_data(uint8_t *buf, int32_t len, odp_bool_t use_entropy ODP_UNUSED) odp_crypto_compl_t odp_crypto_compl_from_event(odp_event_t ev) { - /* This check not mandated by the API specification */ - if (odp_event_type(ev) != ODP_EVENT_CRYPTO_COMPL) - ODP_ABORT("Event not a crypto completion"); return (odp_crypto_compl_t)ev; }