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 EDACBA04DC; Mon, 26 Oct 2020 14:05:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 310B12B9E; Mon, 26 Oct 2020 14:05: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 8F092100C for ; Mon, 26 Oct 2020 14:05:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603717555; 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=ArG01f7AXei91HLgrCk8JCLFUJDOfZ2ni3UAa/yDy2c=; b=XgY9APCLSHt0nB0r2LjjUWB5bnHTrSxu/fR3+UamDJR+UlhQLEIyupnuzXZjFXdZo3dUmx oVzsHyNmSLRX11R0jJCATMfWxx1TBLNEGVwI3/n3lgnhQxPHW4p+/TmdeCNcSkxif4+8hx 3hiCBWdM02cTGiM5GzVaI1da1LYEH3o= Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-50-KGFtqqG-OByMqqKxg0yZ2Q-1; Mon, 26 Oct 2020 09:05:53 -0400 X-MC-Unique: KGFtqqG-OByMqqKxg0yZ2Q-1 Received: by mail-ot1-f69.google.com with SMTP id y26so3533213otk.4 for ; Mon, 26 Oct 2020 06:05:53 -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=ArG01f7AXei91HLgrCk8JCLFUJDOfZ2ni3UAa/yDy2c=; b=f+ThBCgdLNkm9Eu8p5+G8Co4hsK568Di2IOU/siownHp09KfQE8Jw6bCEitbTIv32O YUcFABhdtgRM3aaPvJzexg+YUpMIHFB36qDEPemikqJsFhWL6DvzysWktyUt2uVaTKsc 82DYXH6EY492DrmfZPAIN5SUhICAcW6d6cSgFaNIXZdXh0ginXA44BjauJ2asvoc9Q/H RaSQuHabfx4+2Z3QxLXjAdMYTdq56c3fx1jCXjC0sD8ywDyRYk0VOSxv4eJK7Kgz+mX/ ZqUhi+/mmvpj8iTWrcDCDTafAk9scK/qBjKfi4E6wjtjyx8xZXKXmBrAGh6y+4Ukhic/ aueg== X-Gm-Message-State: AOAM5315LwIv8pEr7vJjaL/bs5S5Qqlvj9XP0BkyqlMZHjvoM5svw+fO m1Ztip8Dmin3dkHrKeKQ3fzrEdOXSAS7Dq2EOFrzoToM7I0zj1UY1LT1nwQlEpk0q5fEbpU50cn 4gHc= X-Received: by 2002:a05:6830:1183:: with SMTP id u3mr10954662otq.167.1603717552355; Mon, 26 Oct 2020 06:05:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxV5DhDvZ+XOJdup2Nz2Ql/9IavFBt37EznQPtSi4s1XA404BvZnn1Uo1eWklSN2xudF4cZJg== X-Received: by 2002:a05:6830:1183:: with SMTP id u3mr10954635otq.167.1603717552151; Mon, 26 Oct 2020 06:05:52 -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 j7sm3539573otc.77.2020.10.26.06.05.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Oct 2020 06:05:51 -0700 (PDT) To: Nicolas Chautru , 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-3-git-send-email-nicolas.chautru@intel.com> From: Tom Rix Message-ID: <667e9f79-6461-0d45-a60a-480e452a9277@redhat.com> Date: Mon, 26 Oct 2020 06:05:50 -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: <1603496581-35966-3-git-send-email-nicolas.chautru@intel.com> 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 2/7] app/bbdev: add explicit check for counters 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/23/20 4:42 PM, Nicolas Chautru wrote: > Adding explicit check in ut that the stats counters > have the expect values. Was missing for coverage. missing from coverage ? > > Signed-off-by: Nicolas Chautru > Acked-by: Aidan Goddard > Acked-by: Dave Burley > --- > app/test-bbdev/test_bbdev_perf.c | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) > > diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c > index 3554a77..b62848e 100644 > --- a/app/test-bbdev/test_bbdev_perf.c > +++ b/app/test-bbdev/test_bbdev_perf.c > @@ -4840,6 +4840,23 @@ typedef int (test_case_function)(struct active_device *ad, > (double)(time_st.deq_max_time * 1000000) / > rte_get_tsc_hz()); > > + struct rte_bbdev_stats stats = {0}; Other calls to get_bbdev_queue_stats do not initialize stats and likely should > + get_bbdev_queue_stats(ad->dev_id, queue_id, &stats); Should check the return here. > + if (op_type != RTE_BBDEV_OP_LDPC_DEC) { This logic seems off. Do you mean to check only enc stats with an enc op ? Similar for dec. > + TEST_ASSERT_SUCCESS(stats.enqueued_count != num_to_process, > + "Mismatch in enqueue count %10"PRIu64" %d", > + stats.enqueued_count, num_to_process); > + TEST_ASSERT_SUCCESS(stats.dequeued_count != num_to_process, > + "Mismatch in dequeue count %10"PRIu64" %d", > + stats.dequeued_count, num_to_process); > + } > + TEST_ASSERT_SUCCESS(stats.enqueue_err_count != 0, > + "Enqueue count Error %10"PRIu64"", > + stats.enqueue_err_count); > + TEST_ASSERT_SUCCESS(stats.dequeue_err_count != 0, > + "Dequeue count Error (%10"PRIu64"", > + stats.dequeue_err_count); > + > return TEST_SUCCESS; > #endif > }