From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F0E65A04B5; Wed, 28 Oct 2020 21:29:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 523024C9B; Wed, 28 Oct 2020 21:28:58 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id E8C0A4C97 for ; Wed, 28 Oct 2020 21:28:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603916934; 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=q04C/xNqvko52oWw7h5HWznAYxhZQ0CFpEegEd/Adt8=; b=g++FAlf2XwImbrR44zqnmPgzzBSf7+quxIkcXRqxbSw1mi+1iNuFpO1P4l85Ounuf0MuKA nbwA49W9pL0LioMEQDGkH68fdgCtgnFmC7CYp4NIHdymb9/AX/W5LHfXVitAfogiWaQA7c ewnuUg1BTw/NcZ4LMWmkvFu12hX74q8= Received: from mail-oi1-f200.google.com (mail-oi1-f200.google.com [209.85.167.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-220-UU2jEa6cPAqKh6C6NR-Iig-1; Wed, 28 Oct 2020 16:28:51 -0400 X-MC-Unique: UU2jEa6cPAqKh6C6NR-Iig-1 Received: by mail-oi1-f200.google.com with SMTP id v145so129103oie.3 for ; Wed, 28 Oct 2020 13:28:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=q04C/xNqvko52oWw7h5HWznAYxhZQ0CFpEegEd/Adt8=; b=nZo2fBZPhwlbDwa7iudvNR7dYT7l+L6vRrPqHDOLPxjtmHyzg/ABTOKSQvqclkEg8a 7NPJygA9SbO7nzJJ4B1BNSLUbupAL6MS/oXGj9u8FFH66u4Q/OZFy1UqwgIXEtBvTApx U4jIfLE9u7JH025tEMGYJArrizoSk9zmEFo7w4fy2iiem1ps4L/kXdWGaOamfpNXvI5L r9uRP6dUXX1bUauddNtk1NwcVru3g6qRamHAciSf0dB9PTx3PRlvtl1T6D/q7NwoHmYV nI63woyJEvDq3U0LD4wQ+UblfN7xw2VmJqxcPQLHo1Zwy8FlCZs9D7dsk4WqxA9uJIPp IUnA== X-Gm-Message-State: AOAM532e6MDrfmEm9TrNOlJKtqEUcHKhXtj4FtS0yklUNyjlShtbbqi6 FsSGXp0SrjdJ9NHXLlIj+7NjuAf4E8Lf/PV3Y00CaV5h/lImrORDfdlde3crSaMbuuLPUSndt7X EM+k= X-Received: by 2002:a9d:6751:: with SMTP id w17mr810747otm.7.1603916930650; Wed, 28 Oct 2020 13:28:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDdvhBEm9S7VChE3qVe6s0mOf+7qETkMlH5Z0TYJF6w4s8Q3TPy76qUkbV2Vfi0mqDaUkogw== X-Received: by 2002:a9d:6751:: with SMTP id w17mr810735otm.7.1603916930440; Wed, 28 Oct 2020 13:28:50 -0700 (PDT) Received: from trix.remote.csb (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id 104sm146451otu.81.2020.10.28.13.28.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Oct 2020 13:28:49 -0700 (PDT) To: "Chautru, Nicolas" , "dev@dpdk.org" , "akhil.goyal@nxp.com" Cc: "david.marchand@redhat.com" References: <1603496581-35966-1-git-send-email-nicolas.chautru@intel.com> <1603496581-35966-8-git-send-email-nicolas.chautru@intel.com> <2740f83e-d995-3b8b-2536-bec618c35d1e@redhat.com> From: Tom Rix Message-ID: <83454a78-8053-bfab-f93a-f1a163ffd392@redhat.com> Date: Wed, 28 Oct 2020 13:28:48 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=trix@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v5 7/7] app/bbdev: update offload test to dequeue full ring X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 10/26/20 9:27 AM, Chautru, Nicolas wrote: >> -----Original Message----- >> From: Tom Rix >> Sent: Monday, October 26, 2020 6:56 AM >> To: Chautru, Nicolas ; dev@dpdk.org; >> akhil.goyal@nxp.com >> Cc: david.marchand@redhat.com >> Subject: Re: [PATCH v5 7/7] app/bbdev: update offload test to dequeue full >> ring >> >> >> On 10/23/20 4:43 PM, Nicolas Chautru wrote: >>> update offload dequeue to retrieve the full ring to be agnostic of >>> implementation. >>> >>> Signed-off-by: Nicolas Chautru >>> Acked-by: Aidan Goddard >>> Acked-by: Dave Burley >>> --- >>> app/test-bbdev/test_bbdev_perf.c | 16 ++++++++-------- >>> 1 file changed, 8 insertions(+), 8 deletions(-) >>> >>> diff --git a/app/test-bbdev/test_bbdev_perf.c >>> b/app/test-bbdev/test_bbdev_perf.c >>> index b5dc536..a6884c5 100644 >>> --- a/app/test-bbdev/test_bbdev_perf.c >>> +++ b/app/test-bbdev/test_bbdev_perf.c >>> @@ -4463,8 +4463,8 @@ typedef int (test_case_function)(struct >> active_device *ad, >>> /* Dequeue one operation */ >> This comment and similar need to change, not doing just 1 anymore > We still just need one operation dequeued to be considered done. > >>> do { >>> deq += rte_bbdev_dequeue_dec_ops(dev_id, >> queue_id, >>> - &ops_deq[deq], 1); >>> - } while (unlikely(deq != 1)); >>> + &ops_deq[deq], enq); >>> + } while (unlikely(deq == 0)); >> This check looks wrong, should likely be (deq != enq) >> >> Similar below > No that is intentional. Not waiting for everything to be done but purely the first dequeue. If not this would be run multiple times. > The rest of ring is dequeued below. So is > 1 an error condition or ok? Maybe add a comment that it is really ok because the call logic is not setup for 1 but for enq Tom > >> Tom >> >>> deq_last_time = rte_rdtsc_precise() - deq_start_time; >>> time_st->deq_max_time = RTE_MAX(time_st- >>> deq_max_time, @@ -4554,8 >>> +4554,8 @@ typedef int (test_case_function)(struct active_device *ad, >>> /* Dequeue one operation */ >>> do { >>> deq += rte_bbdev_dequeue_ldpc_dec_ops(dev_id, >> queue_id, >>> - &ops_deq[deq], 1); >>> - } while (unlikely(deq != 1)); >>> + &ops_deq[deq], enq); >>> + } while (unlikely(deq == 0)); >>> >>> deq_last_time = rte_rdtsc_precise() - deq_start_time; >>> time_st->deq_max_time = RTE_MAX(time_st- >>> deq_max_time, @@ -4642,8 >>> +4642,8 @@ typedef int (test_case_function)(struct active_device *ad, >>> /* Dequeue one operation */ >>> do { >>> deq += rte_bbdev_dequeue_enc_ops(dev_id, >> queue_id, >>> - &ops_deq[deq], 1); >>> - } while (unlikely(deq != 1)); >>> + &ops_deq[deq], enq); >>> + } while (unlikely(deq == 0)); >>> >>> deq_last_time = rte_rdtsc_precise() - deq_start_time; >>> time_st->deq_max_time = RTE_MAX(time_st- >>> deq_max_time, @@ -4725,8 >>> +4725,8 @@ typedef int (test_case_function)(struct active_device *ad, >>> /* Dequeue one operation */ >>> do { >>> deq += rte_bbdev_dequeue_ldpc_enc_ops(dev_id, >> queue_id, >>> - &ops_deq[deq], 1); >>> - } while (unlikely(deq != 1)); >>> + &ops_deq[deq], enq); >>> + } while (unlikely(deq == 0)); >>> >>> deq_last_time = rte_rdtsc_precise() - deq_start_time; >>> time_st->deq_max_time = RTE_MAX(time_st- >>> deq_max_time,