From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 20895A00C3; Wed, 7 Dec 2022 09:40:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C098410FB; Wed, 7 Dec 2022 09:40:41 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 89CF0410D7 for ; Wed, 7 Dec 2022 09:40:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670402439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nwZl4CpvstlArzbFliZKu5djLDkgXyFl+lPtMbigOqU=; b=LN8NsUs9YLpMjG/I9fuD3M7Nfqn2ojJgEur/QkSE4s7B1CpghRA2GkdNAky0Fl5/giejQt kzbk00T9JLGfr6Jhc1jr2OXK22cwhMezbDOw5pu1m/Jukqb4zoNLo+miqyiW2OJ7FZG8hZ DYTxXbEcGjicSJSuIQBsSP+ZrAaTNzM= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-115-MaiQtVdKM06tHRiBXpH9sA-1; Wed, 07 Dec 2022 03:40:34 -0500 X-MC-Unique: MaiQtVdKM06tHRiBXpH9sA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8F4BA2833B1D; Wed, 7 Dec 2022 08:40:33 +0000 (UTC) Received: from [10.39.208.28] (unknown [10.39.208.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AA9D1492B04; Wed, 7 Dec 2022 08:40:32 +0000 (UTC) Message-ID: <2bdb6439-4fbd-9643-2f16-4eb750e7bf14@redhat.com> Date: Wed, 7 Dec 2022 09:40:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v2 3/3] test/bbdev: explicit check for allocation failure To: Nicolas Chautru , dev@dpdk.org Cc: hernan.vargas@intel.com, Vipin.Varghese@amd.com References: <20221206191441.12428-1-nicolas.chautru@intel.com> <20221206191441.12428-4-nicolas.chautru@intel.com> From: Maxime Coquelin In-Reply-To: <20221206191441.12428-4-nicolas.chautru@intel.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 12/6/22 20:14, Nicolas Chautru wrote: > 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, You need to add Fixes tag and cc stable. Maxime