From patchwork Thu Aug 24 03: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: 110865 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp5028661qge; Wed, 23 Aug 2017 20:00:31 -0700 (PDT) X-Received: by 10.55.107.69 with SMTP id g66mr6197979qkc.188.1503543631717; Wed, 23 Aug 2017 20:00:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503543631; cv=none; d=google.com; s=arc-20160816; b=L/zjyGeW+LabZZo1zpPVJCxVHO5BoX2I9DSp3EoeM9p6ptbaVHz0zjUkjeI7HzhowU zQ7ctcDmWHxplH1FdcK0HpSn5tEq8xybNJ75B2cOBmScCx18GHYlc3a86QEzyJUV18Un eyUtezh4xAvLpxQN9OzG3R6DlCHU4FypuCN6F8mY3hT7a/EqZokCKkkbRGUY+aFkYyyI 4+iGYeu7pkc7N3FY6sPlqo/EOLnNyOKaIftf5FT99XKt/2nX06nmFIXFgnTaecjlXb8W awoVfz4XmFDlrZM8zYR4I8o4FAWcMgzYaFC71AypS2d5DvfMQnzYvIK5pg8bKckpVK5Z vdfw== 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=6EeNK6LotV4LK/2NV4cyuPqrSVjpV4rK+cyThXlbDPE=; b=0J2LAXWSxCC1xadaB2/mdV4OOI29Zm/zcA6Q9tw5uCXiqbfrtWAKr+uphet8qyKcVj uW8x8rxjsulQksZwN7aYB1mJoER8Z/6Nioc01Ln4vsWkHVyluQuPfxGsYgbd+LXhfKrI 9Q61pP1rPVZNQgAaZBiG1HtVgNSyCFzlGPdXte/595xrFYffRrCRvQclQE3lwvdoJuMm rMD5a/jWAI8pwd2Oa0dZgSwK9GQzL/FYgOXmKWZIboJy7SOoOCPjVhlWES6D4t3Ge8gE Y0KuQIza8Be3OWpbd3UX7RFvcwn6TTkbppZKZ4GhKaybO1p9xK2X9FOZrlXL/rJ7d/76 3EsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id r144si675568qke.417.2017.08.23.20.00.30; Wed, 23 Aug 2017 20:00:31 -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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 BE232635F8; Thu, 24 Aug 2017 03:00:30 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 18DC660932; Thu, 24 Aug 2017 03:00:24 +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 D0D1860D6F; Thu, 24 Aug 2017 03:00:20 +0000 (UTC) Received: from forward101j.mail.yandex.net (forward101j.mail.yandex.net [5.45.198.241]) by lists.linaro.org (Postfix) with ESMTPS id 7841460920 for ; Thu, 24 Aug 2017 03:00:19 +0000 (UTC) Received: from mxback2g.mail.yandex.net (mxback2g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:163]) by forward101j.mail.yandex.net (Yandex) with ESMTP id 2537012457A6 for ; Thu, 24 Aug 2017 06:00:18 +0300 (MSK) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [2a02:6b8:0:1402::15:6]) by mxback2g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id UpwGLC2Xkf-0IgWU1xA; Thu, 24 Aug 2017 06:00:18 +0300 Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id JdpMAKWrOb-0HtW302S; Thu, 24 Aug 2017 06:00:17 +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: Thu, 24 Aug 2017 06:00:04 +0300 Message-Id: <1503543605-9923-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503543605-9923-1-git-send-email-odpbot@yandex.ru> References: <1503543605-9923-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 143 Subject: [lng-odp] [PATCH API-NEXT v1 1/2] test: performance: crypto: fix packet freeing 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 With new packet reference code, ODP has become stricter on packet double free errors, highlighting several bugs in packet handling code in crypto performance test. Fix packet double-free errors. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 143 (lumag:fix-crypto-perf) ** https://github.com/Linaro/odp/pull/143 ** Patch: https://github.com/Linaro/odp/pull/143.patch ** Base sha: 859293ad9b3c862264bb0fbfe8e7037b5e04d084 ** Merge commit sha: f0e88d2b61da20ba130f3e8a895643a37db524b0 **/ test/common_plat/performance/odp_crypto.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test/common_plat/performance/odp_crypto.c b/test/common_plat/performance/odp_crypto.c index 7a25ffdc..8449f1fc 100644 --- a/test/common_plat/performance/odp_crypto.c +++ b/test/common_plat/performance/odp_crypto.c @@ -560,6 +560,8 @@ run_measure_one(crypto_args_t *cargs, if (rc <= 0) { app_err("failed odp_crypto_packet_op_enq: rc = %d\n", rc); + if (!cargs->reuse_packet) + odp_packet_free(pkt); break; } packets_sent += rc; @@ -569,6 +571,8 @@ run_measure_one(crypto_args_t *cargs, if (rc <= 0) { app_err("failed odp_crypto_packet_op: rc = %d\n", rc); + if (!cargs->reuse_packet) + odp_packet_free(pkt); break; } packets_sent += rc; @@ -582,16 +586,14 @@ run_measure_one(crypto_args_t *cargs, config->session. auth_digest_len); } - if (!cargs->in_place) { - if (cargs->reuse_packet) - pkt = out_pkt; - else - odp_packet_free(out_pkt); - } + if (cargs->reuse_packet) + pkt = out_pkt; + else + odp_packet_free(out_pkt); } } - if (out_queue != ODP_QUEUE_INVALID) { + if (cargs->schedule || cargs->poll) { odp_event_t ev; odp_crypto_packet_result_t result; odp_packet_t out_pkt; @@ -646,7 +648,7 @@ run_measure_one(crypto_args_t *cargs, cargs->iteration_count; } - if (ODP_PACKET_INVALID != pkt) + if (cargs->reuse_packet) odp_packet_free(pkt); return rc < 0 ? rc : 0; From patchwork Thu Aug 24 03: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: 110866 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp5029688qge; Wed, 23 Aug 2017 20:01:21 -0700 (PDT) X-Received: by 10.233.221.197 with SMTP id r188mr6707702qkf.153.1503543680968; Wed, 23 Aug 2017 20:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503543680; cv=none; d=google.com; s=arc-20160816; b=NFXCowKQsTArCBN0HLI0/7wL4WNL1kyiLWXhZljJ8gxsrO8TrL3E9Ni49KhERxHmDW t4u1fvpmiFbS71R2fjGfShiISVqFyuZ5g/813bBpAnPJgj2ygqTVH0WC5rCiZCh8fhC/ mYP/WKuqScJeIBqb6fsYUC3IjXCtveMOEZzL6caNSuYvZXwVyUi44sIoDLZKA0LM2gd3 qHgrSuAjIuL/KOxuYEuCanepreW7oWAbIyh8kXZcEeLgqJa7xlWsZw0wgQmqQ15A6Gpq jTuwpPzqZOpCYtk/QlzuNRHQmT18GO94C85gVBAwLc6NWZXz0P4pDB03fEjk8FfIOH5T L28w== 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=iBVoRbz1d42HMtBIRhZEAt12vf5IJxbF9Wdq3jwLhYE=; b=xiTKTlWpGv1iNsFuHQ3dLOVbN4agCe7jXzbuJUqIXXHRtwpNr61TkccaoYH8pl2oZY L/6ew3hLPW9MBF9/TWeWDCeros9j7tuOMazEaPeJkFPOSbNzV9NvwBCaqixPhtHmZfuh zp5A+87i0UoZhd3ZighHne5QMv5sqzFxQbDgghjQgwhJh6SZVEkhvSOGSG7jVvi79fdU 40XVKUquMno50dw6OPeYgWkcASm1OiQIhOj93rDTc6xBWnbLSk6aJ1oPa5rgngTwBtnp Eq5n/wU9DE50VdMmWGadFNF9tzIy6v5H325EDqhmgzRgyHtIO7yXyzgkJoOV1xG1v0dK CQTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id b10si2863874qti.462.2017.08.23.20.01.20; Wed, 23 Aug 2017 20:01:20 -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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 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 A1632609CF; Thu, 24 Aug 2017 03:01:20 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, 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 2131862AE4; Thu, 24 Aug 2017 03:00:27 +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 CCE9160932; Thu, 24 Aug 2017 03:00:21 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id EC52A609CF for ; Thu, 24 Aug 2017 03:00:19 +0000 (UTC) Received: from mxback9g.mail.yandex.net (mxback9g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:170]) by forward105p.mail.yandex.net (Yandex) with ESMTP id 869FA408355C for ; Thu, 24 Aug 2017 06:00:18 +0300 (MSK) Received: from smtp4p.mail.yandex.net (smtp4p.mail.yandex.net [2a02:6b8:0:1402::15:6]) by mxback9g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id oZps5qPlcj-0IFuKIMF; Thu, 24 Aug 2017 06:00:18 +0300 Received: by smtp4p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id JdpMAKWrOb-0ItGCimk; Thu, 24 Aug 2017 06:00:18 +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: Thu, 24 Aug 2017 06:00:05 +0300 Message-Id: <1503543605-9923-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503543605-9923-1-git-send-email-odpbot@yandex.ru> References: <1503543605-9923-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 143 Subject: [lng-odp] [PATCH API-NEXT v1 2/2] test: performance: crypto: free crypto-out queue 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 Free crypto-out queue if it was created. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 143 (lumag:fix-crypto-perf) ** https://github.com/Linaro/odp/pull/143 ** Patch: https://github.com/Linaro/odp/pull/143.patch ** Base sha: 859293ad9b3c862264bb0fbfe8e7037b5e04d084 ** Merge commit sha: f0e88d2b61da20ba130f3e8a895643a37db524b0 **/ test/common_plat/performance/odp_crypto.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/common_plat/performance/odp_crypto.c b/test/common_plat/performance/odp_crypto.c index 8449f1fc..9fc13400 100644 --- a/test/common_plat/performance/odp_crypto.c +++ b/test/common_plat/performance/odp_crypto.c @@ -835,6 +835,8 @@ int main(int argc, char *argv[]) } } + if (cargs.schedule || cargs.poll) + odp_queue_destroy(out_queue); if (odp_pool_destroy(pool)) { app_err("Error: pool destroy\n"); exit(EXIT_FAILURE);