From patchwork Mon Nov 13 02:00:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 118695 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1264896qgn; Sun, 12 Nov 2017 18:01:13 -0800 (PST) X-Google-Smtp-Source: AGs4zMbrncmh7fx8nno0njZkev07dxIaH3mp1URgff82LIyPGmFwhmNTbr2hDIzHPPErwwD77KSi X-Received: by 10.200.48.241 with SMTP id w46mr11982478qta.172.1510538473914; Sun, 12 Nov 2017 18:01:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510538473; cv=none; d=google.com; s=arc-20160816; b=bRbvAmBse8kF4ZF++nRHRW6rfsYSo9q1bETLegdjQSUgfqt2lvPX8lbM82XqgQ7YQB WV4E5FkmJTE/zOp3C0OPPNyyG/ztrKhUhTPYGAGQ159txCSDX/AP7jKfGWMSxqPw3uHW UjaIno+ZMrI2uqqcHTArVLq2wmu8YM2DQtBY0wg1PMMnxuq65lkTs+yxtHI2pJ1sh2bG Yv3EqMujfIkenJj3jgJXQT6SpBsNmuFrydCKnF6O2oLIzWCbi8ozTWqyHsL2MqlRy3wh CXExiNPAsd7OiYMWqdV1gITuIdL9sKpodfl318PMHbR97vrcGEeWbipilL5MmkDNBk0m 3Vng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=7mq47KFoVBhfPW5jkAAeO/99GYm+jMV2EmZaQg+S1Zs=; b=MF9Jlx1J08roRu4Zz0aflZaRqlCgvFyh19+NVH11wcmCaG40FEfnJ6hGVSnNY3KkaK 73JsWi/9QlkaaVMHRJ57Adc1WAGusx/bhmpgvXoVr/WV8lAMkXQxww5HHGShMzUHaL51 ++m9sByHWnSTtKkgDK80ytlirkSiGWR0q/6tiBV8jfmqtmrCE/pyUu8LeY++OrS5MFPK EWZoJ54lcFmsI2dnxHzKusgzfkbQKdleFgw5XZpNqKyk2qxSukgn9a6g8cu2GJwWOlxg dWSKqLJjzeQAszvhmeyYS0oCzwD4gmtBosjg2b4qFcQ07QIfX0Pq/2UPDVtN3jeq6I4j H8Lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id e185si3746352qkd.469.2017.11.12.18.01.13; Sun, 12 Nov 2017 18:01:13 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id A1E4F60C8B; Mon, 13 Nov 2017 02:01:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id E96C860386; Mon, 13 Nov 2017 02:00:18 +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 6251A60B5E; Mon, 13 Nov 2017 02:00:11 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id B6BF860B18 for ; Mon, 13 Nov 2017 02:00:09 +0000 (UTC) Received: from mxback1j.mail.yandex.net (mxback1j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10a]) by forward100o.mail.yandex.net (Yandex) with ESMTP id B03E62A2E068 for ; Mon, 13 Nov 2017 05:00:07 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback1j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id bnPNoDlO6Y-07cuZAAM; Mon, 13 Nov 2017 05:00:07 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id a2ZnPB2cy1-078GbBSL; Mon, 13 Nov 2017 05:00:07 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Mon, 13 Nov 2017 05:00:03 +0300 Message-Id: <1510538405-474-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510538405-474-1-git-send-email-odpbot@yandex.ru> References: <1510538405-474-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 294 Subject: [lng-odp] [PATCH API-NEXT v2 1/3] linux-gen: crypto: drop extra memcpy on result return 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" From: Dmitry Eremin-Solenikov There is no need to fill local struct and then copy it to packet. Just fill packet data directly, saving one memcpy call. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 294 (lumag:crypto-err-flag) ** https://github.com/Linaro/odp/pull/294 ** Patch: https://github.com/Linaro/odp/pull/294.patch ** Base sha: a908a4dead95321e84d6a8a23de060051dcd8969 ** Merge commit sha: d4ef7e80916d7a2c5f5fb1032bed9e07488cbe69 **/ platform/linux-generic/odp_crypto.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index f34863bf2..79be510d4 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -1158,7 +1158,6 @@ int odp_crypto_int(odp_packet_t pkt_in, odp_crypto_alg_err_t rc_cipher = ODP_CRYPTO_ALG_ERR_NONE; odp_crypto_alg_err_t rc_auth = ODP_CRYPTO_ALG_ERR_NONE; odp_crypto_generic_session_t *session; - odp_crypto_packet_result_t local_result; odp_bool_t allocated = false; odp_packet_t out_pkt = *pkt_out; odp_crypto_packet_result_t *op_result; @@ -1204,18 +1203,16 @@ int odp_crypto_int(odp_packet_t pkt_in, } /* Fill in result */ - local_result.cipher_status.alg_err = rc_cipher; - local_result.cipher_status.hw_err = ODP_CRYPTO_HW_ERR_NONE; - local_result.auth_status.alg_err = rc_auth; - local_result.auth_status.hw_err = ODP_CRYPTO_HW_ERR_NONE; - local_result.ok = - (rc_cipher == ODP_CRYPTO_ALG_ERR_NONE) && - (rc_auth == ODP_CRYPTO_ALG_ERR_NONE); - _odp_buffer_event_subtype_set(packet_to_buffer(out_pkt), ODP_EVENT_PACKET_CRYPTO); op_result = get_op_result_from_packet(out_pkt); - *op_result = local_result; + op_result->cipher_status.alg_err = rc_cipher; + op_result->cipher_status.hw_err = ODP_CRYPTO_HW_ERR_NONE; + op_result->auth_status.alg_err = rc_auth; + op_result->auth_status.hw_err = ODP_CRYPTO_HW_ERR_NONE; + op_result->ok = + (rc_cipher == ODP_CRYPTO_ALG_ERR_NONE) && + (rc_auth == ODP_CRYPTO_ALG_ERR_NONE); /* Synchronous, simply return results */ *pkt_out = out_pkt; From patchwork Mon Nov 13 02:00:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 118694 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1264510qgn; Sun, 12 Nov 2017 18:00:46 -0800 (PST) X-Google-Smtp-Source: AGs4zMZUXOGgHT2OpV38b9+9nwPQt775yHmspAbEuoI7tEgVSvpRiD1iQvg+p3v453s1YIjnv6aw X-Received: by 10.55.33.13 with SMTP id h13mr11922487qkh.176.1510538446508; Sun, 12 Nov 2017 18:00:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510538446; cv=none; d=google.com; s=arc-20160816; b=PWSJbGx9eE9IGOrdybQa3MqJtbFX4/fPR+YimWZpao6/8917oLmgTs78MyGsqKiKRy 6RKwuhC3e0WGHCcXmC+aYa36MBXy3SStcF9sq4Gu1TnQ7a/5I6oRzAzqBT2t0qTzDGaw zapx4iYbHMQtT3h7/KUSzyh9GRHMB7yOB8rj26zJT5omH5iGTvTNxi4leKSNFPcXInah 3kSlZkYpkhGTeXviQPohlnKQdUOBXpN6bQrxwTsKw9itkUoSa43JzTQAyGU6R053wxEn dH1kAcf48/W6Q4OhWeOiq0C4x3s6o/nxPpu2mz6sGSqMceVyt1upNW7Kh75AXeA5gI0/ e2nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=n3tS+wHGh7HC5sNXzcGibAq+EL1pM/LCmWLiVOkMSsw=; b=lhVs/KnvVkKlZ2mMLxJVF4z6X8VXBIIENF6q7xJbkHqcvLcSEEzDuU/33IRPtYWy2X k/vRb3JbWNUgGPPA9RL3ns3UPS5TKGyMaTQDLSDHXTCo/oW1HFBFYSxAm4MMYcPWXh3D hS8lZ/SsxXOx/5HDXcnlM9daTKWL7bQJ8aCk0gDkoCfqGwzq9gO4zQ41D/y3i+5gahzS UR62pMUGssntfhEG9uID9RdfTjDkxYyKl8/N7capfl7cT6llp64BpYy+cWkacwcuKM3r pHGnnn+duOjqKPTQT5Mrf135tDYKlH9G9nZxEh4w5FgMHsgJn9zZHnYfRzSwei4goohA 3vPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id 88si5459973qky.46.2017.11.12.18.00.46; Sun, 12 Nov 2017 18:00:46 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 2691B60C88; Mon, 13 Nov 2017 02:00:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 7CA1560BDF; Mon, 13 Nov 2017 02:00:15 +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 52B0260BDF; Mon, 13 Nov 2017 02:00:11 +0000 (UTC) Received: from forward100p.mail.yandex.net (forward100p.mail.yandex.net [77.88.28.100]) by lists.linaro.org (Postfix) with ESMTPS id C397B60B5E for ; Mon, 13 Nov 2017 02:00:09 +0000 (UTC) Received: from mxback7j.mail.yandex.net (mxback7j.mail.yandex.net [IPv6:2a02:6b8:0:1619::110]) by forward100p.mail.yandex.net (Yandex) with ESMTP id 4C5C9510CF85 for ; Mon, 13 Nov 2017 05:00:08 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback7j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 8DzhTYurJf-08JunSvc; Mon, 13 Nov 2017 05:00:08 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id a2ZnPB2cy1-078CL5Iu; Mon, 13 Nov 2017 05:00:07 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Mon, 13 Nov 2017 05:00:04 +0300 Message-Id: <1510538405-474-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510538405-474-1-git-send-email-odpbot@yandex.ru> References: <1510538405-474-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 294 Subject: [lng-odp] [PATCH API-NEXT v2 2/3] linux-gen: crypto: set packet error flag depending on crypto result operation 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" From: Dmitry Eremin-Solenikov To speed up fast path of crypto packet operations, set error flag depending on the crypto result operation. This allows applications to fast-forward packets w/o errors and inspect crypto result only for erroneous packets. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 294 (lumag:crypto-err-flag) ** https://github.com/Linaro/odp/pull/294 ** Patch: https://github.com/Linaro/odp/pull/294.patch ** Base sha: a908a4dead95321e84d6a8a23de060051dcd8969 ** Merge commit sha: d4ef7e80916d7a2c5f5fb1032bed9e07488cbe69 **/ platform/linux-generic/include/odp_packet_internal.h | 1 + platform/linux-generic/odp_crypto.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h index fc10d61c8..6473a1aae 100644 --- a/platform/linux-generic/include/odp_packet_internal.h +++ b/platform/linux-generic/include/odp_packet_internal.h @@ -55,6 +55,7 @@ typedef union { uint32_t tcp_err:1; /**< TCP error, checks TBD */ uint32_t udp_err:1; /**< UDP error, checks TBD */ uint32_t l4_chksum:1; /**< L4 checksum error */ + uint32_t crypto_err:1; /**< Crypto packet operation error */ }; } error_flags_t; diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c index 79be510d4..ea49e9807 100644 --- a/platform/linux-generic/odp_crypto.c +++ b/platform/linux-generic/odp_crypto.c @@ -1161,6 +1161,7 @@ int odp_crypto_int(odp_packet_t pkt_in, odp_bool_t allocated = false; odp_packet_t out_pkt = *pkt_out; odp_crypto_packet_result_t *op_result; + odp_packet_hdr_t *pkt_hdr; session = (odp_crypto_generic_session_t *)(intptr_t)param->session; @@ -1214,6 +1215,9 @@ int odp_crypto_int(odp_packet_t pkt_in, (rc_cipher == ODP_CRYPTO_ALG_ERR_NONE) && (rc_auth == ODP_CRYPTO_ALG_ERR_NONE); + pkt_hdr = odp_packet_hdr(out_pkt); + pkt_hdr->p.error_flags.crypto_err = !op_result->ok; + /* Synchronous, simply return results */ *pkt_out = out_pkt; From patchwork Mon Nov 13 02:00:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 118696 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp1265336qgn; Sun, 12 Nov 2017 18:01:49 -0800 (PST) X-Google-Smtp-Source: AGs4zMZ9+3/QPvYSC203xX/iPqDEdH8xwlD/F3hDI5iaTgL30FRsduXd7u+CQpvZlByRLIoQVOoR X-Received: by 10.200.57.116 with SMTP id t49mr3045356qtb.235.1510538509298; Sun, 12 Nov 2017 18:01:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510538509; cv=none; d=google.com; s=arc-20160816; b=O3lUpDwnyHh8jsuXc6284udbH3Z4AuDHajRxBsEehNJEqPMcBVzzre5rHJQHfLbSt1 pH8VhkkqPAAbaJFeXiaq8MDGgTHEQ6xU3ZGA1vqv+gy9uxcgPNceFZQwLYCKLcjf34k3 XkY9RPdHU54nbo1X9gT+7HpFDO5oRQ5MCBsMp5NwKrNbtUD/Zqv9wq9em9b2iW9d6DWp hY3EfMUuoQwh8BEh/DTV8Za5NtiIEvoU+2BwDYAV5Ac0eIZGBiVneevocphWTd/QuefN atSAoQ4Ir8wnJ9JceXe+TkTsHurnXNFCJtHK2Dkicf44/LVFC52NazxR2kYPCUXk9N3o kT5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=teMhjdYKOIwnYx5OwV75oaZAD9khhYuC322mL+mFb+E=; b=tSqika4WlLCPjd7fg1Py8kwK0e3fkDXJbhj7TVf1Zl5JSDRU6pdmvCcwtOl2sTVMIX adluHmJ69vdIDZf6VJ4P2XAj86oR0w4f/hdFGD1MRXayliTGZwl60OF60fYLqBfMJfCg l8NaNJ3Bk5lWN7ZZju6kcsTi3srPcMcqTLeidlRPifAWcQx8rmJMN4NuTZN/REWtaR68 OgT8S14VFD1EV2HHQBXsHMk8KA8yE+PMOK1FlpkNKGx8X/rl24YdHuGJ9oBdq5xoEaS2 C5H0kv2d3WrjvS4nB8qenUZfY0OpY3YDks+XyniynSbX/74RDytquNbQ0732RunV1o7L xxdA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id d15si2180349qtd.442.2017.11.12.18.01.49; Sun, 12 Nov 2017 18:01:49 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 06AFA60D3C; Mon, 13 Nov 2017 02:01:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 4260760C1A; Mon, 13 Nov 2017 02:00:23 +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 749E360976; Mon, 13 Nov 2017 02:00:13 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id F3F9960BD7 for ; Mon, 13 Nov 2017 02:00:09 +0000 (UTC) Received: from mxback19j.mail.yandex.net (mxback19j.mail.yandex.net [IPv6:2a02:6b8:0:1619::95]) by forward100o.mail.yandex.net (Yandex) with ESMTP id E63BE2A2E062 for ; Mon, 13 Nov 2017 05:00:08 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback19j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id yAAU4obNML-08Z464aj; Mon, 13 Nov 2017 05:00:08 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id a2ZnPB2cy1-088efbBW; Mon, 13 Nov 2017 05:00:08 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Mon, 13 Nov 2017 05:00:05 +0300 Message-Id: <1510538405-474-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510538405-474-1-git-send-email-odpbot@yandex.ru> References: <1510538405-474-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 294 Subject: [lng-odp] [PATCH API-NEXT v2 3/3] validation: crypto: check error flag being set 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" From: Dmitry Eremin-Solenikov Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 294 (lumag:crypto-err-flag) ** https://github.com/Linaro/odp/pull/294 ** Patch: https://github.com/Linaro/odp/pull/294.patch ** Base sha: a908a4dead95321e84d6a8a23de060051dcd8969 ** Merge commit sha: d4ef7e80916d7a2c5f5fb1032bed9e07488cbe69 **/ test/validation/api/crypto/odp_crypto_test_inp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/validation/api/crypto/odp_crypto_test_inp.c b/test/validation/api/crypto/odp_crypto_test_inp.c index 1f7523de2..94f2dcf51 100644 --- a/test/validation/api/crypto/odp_crypto_test_inp.c +++ b/test/validation/api/crypto/odp_crypto_test_inp.c @@ -201,6 +201,9 @@ static int alg_packet_op(odp_packet_t pkt, return rc; } + if (!result.ok) + CU_ASSERT(odp_packet_has_error(pkt)); + *ok = result.ok; return 0; @@ -270,6 +273,8 @@ static int alg_packet_op_enq(odp_packet_t pkt, return rc; } + CU_ASSERT((!odp_packet_has_error(pkt)) == result.ok); + *ok = result.ok; return 0;