From patchwork Tue Dec 6 19:14:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chautru, Nicolas" X-Patchwork-Id: 120505 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4AF1FA034C; Tue, 6 Dec 2022 20:15:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E0DF140151; Tue, 6 Dec 2022 20:14:51 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 20A4D40395 for ; Tue, 6 Dec 2022 20:14:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670354088; x=1701890088; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FvbmDZHrwroaS8v4LuYuQqdUFqNyGIhryNSp9b8hfFk=; b=K1TBYNV24VLw3/l7s0ITRIH1ZJeokrc8C7vKUjtbMi5mMVL6KUDcFs+5 4edY0okaW3Tu4tL8hHR4LxJ8BrfXJxVNcvZv4AepoUeQmivRxtDQ9Y9NX l53HUdFahtB7+p9eDLtqNKYkb2bVF1U2FfyW+voEnQexUvJdtB6vCrfVg pvFk7xe+b9eR1JxDblAOiVvvZHevFmlxUr1lXW6CiD4WTcKW/0s1URQih kEM0l9UIx2r3YA0A/WM/Mq+jJUTHSuo27OyjYYGk5pPdyESfe7735pi4r 8zayB7zegvQwttUeLylKa6v4Lm431uP5XDPOC1H5um0frWGaN9buHkMb/ Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10553"; a="315418790" X-IronPort-AV: E=Sophos;i="5.96,223,1665471600"; d="scan'208";a="315418790" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2022 11:14:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10553"; a="648443501" X-IronPort-AV: E=Sophos;i="5.96,223,1665471600"; d="scan'208";a="648443501" Received: from unknown (HELO icx-npg-scs1-cp1.localdomain) ([10.233.180.245]) by fmsmga007.fm.intel.com with ESMTP; 06 Dec 2022 11:14:46 -0800 From: Nicolas Chautru To: dev@dpdk.org, maxime.coquelin@redhat.com Cc: hernan.vargas@intel.com, Vipin.Varghese@amd.com, Nicolas Chautru Subject: [PATCH v2 3/3] test/bbdev: explicit check for allocation failure Date: Tue, 6 Dec 2022 11:14:41 -0800 Message-Id: <20221206191441.12428-4-nicolas.chautru@intel.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20221206191441.12428-1-nicolas.chautru@intel.com> References: <20221206191441.12428-1-nicolas.chautru@intel.com> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Adding check for error on return of the rte_bbdev_*_op_alloc_bulk calls in bbdev-test. Signed-off-by: Nicolas Chautru --- app/test-bbdev/test_bbdev_perf.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index b2e536b5e3..a922d69ada 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -4958,7 +4958,8 @@ offload_latency_test_fft(struct rte_mempool *mempool, struct test_buffers *bufs, if (unlikely(num_to_process - dequeued < burst_sz)) burst_sz = num_to_process - dequeued; - rte_bbdev_fft_op_alloc_bulk(mempool, ops_enq, burst_sz); + ret = rte_bbdev_fft_op_alloc_bulk(mempool, ops_enq, burst_sz); + TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", ops_enq); if (test_vector.op_type != RTE_BBDEV_OP_NONE) copy_reference_fft_op(ops_enq, burst_sz, dequeued, bufs->inputs, @@ -5040,7 +5041,8 @@ offload_latency_test_dec(struct rte_mempool *mempool, struct test_buffers *bufs, if (unlikely(num_to_process - dequeued < burst_sz)) burst_sz = num_to_process - dequeued; - rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz); + ret = rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz); + TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", ops_enq); if (test_vector.op_type != RTE_BBDEV_OP_NONE) copy_reference_dec_op(ops_enq, burst_sz, dequeued, bufs->inputs, @@ -5125,7 +5127,8 @@ offload_latency_test_ldpc_dec(struct rte_mempool *mempool, if (unlikely(num_to_process - dequeued < burst_sz)) burst_sz = num_to_process - dequeued; - rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz); + ret = rte_bbdev_dec_op_alloc_bulk(mempool, ops_enq, burst_sz); + TEST_ASSERT_SUCCESS(ret, "Allocation failed for %d ops", ops_enq); if (test_vector.op_type != RTE_BBDEV_OP_NONE) copy_reference_ldpc_dec_op(ops_enq, burst_sz, dequeued, bufs->inputs,