DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: "Vargas, Hernan" <hernan.vargas@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"gakhil@marvell.com" <gakhil@marvell.com>,
	"Rix, Tom" <trix@redhat.com>
Cc: "Chautru, Nicolas" <nicolas.chautru@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>
Subject: Re: [PATCH v2 04/16] test/bbdev: add timeout for latency tests
Date: Mon, 27 Feb 2023 10:44:42 +0100	[thread overview]
Message-ID: <64ba8d62-8a4b-5c0b-0a41-246b61452cee@redhat.com> (raw)
In-Reply-To: <DM6PR11MB3660DBFD4EB373070BD7798CEFA89@DM6PR11MB3660.namprd11.prod.outlook.com>



On 2/24/23 17:59, Vargas, Hernan wrote:
> Hi Maxime,
> 
>> -----Original Message-----
>> From: Maxime Coquelin <maxime.coquelin@redhat.com>
>> Sent: Thursday, February 23, 2023 2:32 AM
>> To: Vargas, Hernan <hernan.vargas@intel.com>; dev@dpdk.org;
>> gakhil@marvell.com; Rix, Tom <trix@redhat.com>
>> Cc: Chautru, Nicolas <nicolas.chautru@intel.com>; Zhang, Qi Z
>> <qi.z.zhang@intel.com>
>> Subject: Re: [PATCH v2 04/16] test/bbdev: add timeout for latency tests
>>
>>
>>
>> On 2/22/23 22:13, Vargas, Hernan wrote:
>>> Hi Maxime,
>>>
>>>> -----Original Message-----
>>>> From: Maxime Coquelin <maxime.coquelin@redhat.com>
>>>> Sent: Monday, February 20, 2023 10:33 AM
>>>> To: Vargas, Hernan <hernan.vargas@intel.com>; dev@dpdk.org;
>>>> gakhil@marvell.com; Rix, Tom <trix@redhat.com>
>>>> Cc: Chautru, Nicolas <nicolas.chautru@intel.com>; Zhang, Qi Z
>>>> <qi.z.zhang@intel.com>
>>>> Subject: Re: [PATCH v2 04/16] test/bbdev: add timeout for latency
>>>> tests
>>>>
>>>>
>>>>
>>>> On 2/15/23 18:09, Hernan Vargas wrote:
>>>>> Add a timeout to force exit the latency tests in case dequeue never
>>>>> happens.
>>>>>
>>>>> Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
>>>>> ---
>>>>>     app/test-bbdev/test_bbdev_perf.c | 24 +++++++++++++++++++-----
>>>>>     1 file changed, 19 insertions(+), 5 deletions(-)
>>>>>
>>>>> diff --git a/app/test-bbdev/test_bbdev_perf.c
>>>>> b/app/test-bbdev/test_bbdev_perf.c
>>>>> index 19b9a5b119..dede0f900e 100644
>>>>> --- a/app/test-bbdev/test_bbdev_perf.c
>>>>> +++ b/app/test-bbdev/test_bbdev_perf.c
>>>>> @@ -26,6 +26,7 @@
>>>>>
>>>>>     #define MAX_QUEUES RTE_MAX_LCORE
>>>>>     #define TEST_REPETITIONS 100
>>>>> +#define TIME_OUT_POLL 1e8
>>>>>     #define WAIT_OFFLOAD_US 1000
>>>>>
>>>>>     #ifdef RTE_BASEBAND_FPGA_LTE_FEC
>>>>> @@ -4546,6 +4547,7 @@ latency_test_ldpc_dec(struct rte_mempool
>>>>> *mempool,
>>>>>
>>>>>     	for (i = 0, dequeued = 0; dequeued < num_to_process; ++i) {
>>>>>     		uint16_t enq = 0, deq = 0;
>>>>> +		uint32_t time_out = 0;
>>>>>     		bool first_time = true;
>>>>>     		last_time = 0;
>>>>>
>>>>> @@ -4597,7 +4599,8 @@ latency_test_ldpc_dec(struct rte_mempool
>>>> *mempool,
>>>>>     				last_time = rte_rdtsc_precise() - start_time;
>>>>>     				first_time = false;
>>>>>     			}
>>>>> -		} while (unlikely(burst_sz != deq));
>>>>> +			time_out++;
>>>>> +		} while ((burst_sz != deq) && (time_out < TIME_OUT_POLL));
>>>>>
>>>>>     		*max_time = RTE_MAX(*max_time, last_time);
>>>>>     		*min_time = RTE_MIN(*min_time, last_time); @@ -4606,7
>>>> +4609,12 @@
>>>>> latency_test_ldpc_dec(struct rte_mempool *mempool,
>>>>>     		if (extDdr)
>>>>>     			retrieve_harq_ddr(dev_id, queue_id, ops_enq,
>>>> burst_sz);
>>>>>
>>>>> -		if (test_vector.op_type != RTE_BBDEV_OP_NONE) {
>>>>> +		if (burst_sz != deq) {
>>>>> +			struct rte_bbdev_info info;
>>>>> +			ret = TEST_FAILED;
>>>>> +			rte_bbdev_info_get(dev_id, &info);
>>>>
>>>> What is the point of calling rte_bbdev_info_get() here and below?
>>>> info is not used afterwards.
>>>
>>> The reason for calling this function is to check the device status and if there
>> is something wrong the PMD would display it to standard output.
>>
>> What kind of info exactly, I don't see much meaningful logs in
>> rte_bbdev_info_get() except printing error if dev_info == NULL.
> 
> rte_bbdev_info_get() calls the device's info_get function that is specified in the PMD.
> For example, for ACC100, acc100_dev_info_get() gets called to check the device status.

Ok, I looked at this function and it might be more relevant to mention 
vrb1 than acc100, because acc100 does not support device status:

	/* Check the status of device */
	dev_info->device_status = RTE_BBDEV_DEV_NOT_SUPPORTED;

Also, this dev_info->device_status field is set by all the drivers but
never read (neither by the driver, nor library nor apps).

So if this is the only reason rte_bbdev_info_get() is called, that is
quite useless. Am I missing someting?

Thanks,
Maxime

> Thanks,
> Hernan
>>
>> Regards,
>> Maxime
>>
>>>>
>>>>> +			TEST_ASSERT_SUCCESS(ret, "Dequeue timeout!");
>>>>> +		} else if (test_vector.op_type != RTE_BBDEV_OP_NONE) {
>>>>>     			ret = validate_ldpc_dec_op(ops_deq, burst_sz,
>>>> ref_op,
>>>>>     					vector_mask);
>>>>>     			TEST_ASSERT_SUCCESS(ret, "Validation failed!"); @@
>>>> -4632,6
>>>>> +4640,7 @@ latency_test_enc(struct rte_mempool *mempool,
>>>>>
>>>>>     	for (i = 0, dequeued = 0; dequeued < num_to_process; ++i) {
>>>>>     		uint16_t enq = 0, deq = 0;
>>>>> +		uint32_t time_out = 0;
>>>>>     		bool first_time = true;
>>>>>     		last_time = 0;
>>>>>
>>>>> @@ -4667,13 +4676,18 @@ latency_test_enc(struct rte_mempool
>>>> *mempool,
>>>>>     				last_time += rte_rdtsc_precise() - start_time;
>>>>>     				first_time = false;
>>>>>     			}
>>>>> -		} while (unlikely(burst_sz != deq));
>>>>> +			time_out++;
>>>>> +		} while ((burst_sz != deq) && (time_out < TIME_OUT_POLL));
>>>>>
>>>>>     		*max_time = RTE_MAX(*max_time, last_time);
>>>>>     		*min_time = RTE_MIN(*min_time, last_time);
>>>>>     		*total_time += last_time;
>>>>> -
>>>>> -		if (test_vector.op_type != RTE_BBDEV_OP_NONE) {
>>>>> +		if (burst_sz != deq) {
>>>>> +			struct rte_bbdev_info info;
>>>>> +			ret = TEST_FAILED;
>>>>> +			rte_bbdev_info_get(dev_id, &info);
>>>>
>>>> Same here.
>>>>
>>>>> +			TEST_ASSERT_SUCCESS(ret, "Dequeue timeout!");
>>>>> +		} else if (test_vector.op_type != RTE_BBDEV_OP_NONE) {
>>>>>     			ret = validate_enc_op(ops_deq, burst_sz, ref_op);
>>>>>     			TEST_ASSERT_SUCCESS(ret, "Validation failed!");
>>>>>     		}
>>>
> 


  reply	other threads:[~2023-02-27  9:44 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-15 17:09 [PATCH v2 00/16] test/bbdev: changes for 23.03 Hernan Vargas
2023-02-15 17:09 ` [PATCH v2 01/16] test/bbdev: fix seg fault for non supported HARQ len Hernan Vargas
2023-02-20 16:08   ` Maxime Coquelin
2023-02-15 17:09 ` [PATCH v2 02/16] test/bbdev: extend HARQ tolerance Hernan Vargas
2023-02-20 16:09   ` Maxime Coquelin
2023-02-15 17:09 ` [PATCH v2 03/16] test/bbdev: refactor TB throughput report Hernan Vargas
2023-02-20 16:10   ` Maxime Coquelin
2023-02-15 17:09 ` [PATCH v2 04/16] test/bbdev: add timeout for latency tests Hernan Vargas
2023-02-20 16:32   ` Maxime Coquelin
2023-02-22 21:13     ` Vargas, Hernan
2023-02-23  8:31       ` Maxime Coquelin
2023-02-24 16:59         ` Vargas, Hernan
2023-02-27  9:44           ` Maxime Coquelin [this message]
2023-02-28 22:37             ` Chautru, Nicolas
2023-03-02 10:12               ` Maxime Coquelin
2023-02-15 17:09 ` [PATCH v2 05/16] test/bbdev: enable early termination for validation Hernan Vargas
2023-02-20 20:12   ` Maxime Coquelin
2023-02-15 17:09 ` [PATCH v2 06/16] test/bbdev: report device status in test-bbdev Hernan Vargas
2023-02-20 20:17   ` Maxime Coquelin
2023-02-15 17:09 ` [PATCH v2 07/16] test/bbdev: test start/stop bbdev API Hernan Vargas
2023-02-20 20:21   ` Maxime Coquelin
2023-02-15 17:09 ` [PATCH v2 08/16] test/bbdev: add support for BLER for 4G Hernan Vargas
2023-02-22 10:48   ` Maxime Coquelin
2023-02-15 17:09 ` [PATCH v2 09/16] test/bbdev: extend support for large TB Hernan Vargas
2023-02-22 10:49   ` Maxime Coquelin
2023-02-15 17:09 ` [PATCH v2 10/16] test/bbdev: adjustment for soft output Hernan Vargas
2023-02-22 10:50   ` Maxime Coquelin
2023-02-15 17:09 ` [PATCH v2 11/16] test/bbdev: expose warning counters Hernan Vargas
2023-02-22 10:52   ` Maxime Coquelin
2023-02-15 17:09 ` [PATCH v2 12/16] test/bbdev: remove check for invalid opaque data Hernan Vargas
2023-02-22 10:53   ` Maxime Coquelin
2023-02-15 17:09 ` [PATCH v2 13/16] test/bbdev: remove iteration count check Hernan Vargas
2023-02-22 10:55   ` Maxime Coquelin
2023-02-15 17:09 ` [PATCH v2 14/16] test/bbdev: use mbuf reset function Hernan Vargas
2023-02-22 10:56   ` Maxime Coquelin
2023-02-15 17:09 ` [PATCH v2 15/16] test/bbdev: remove max iteration from vectors Hernan Vargas
2023-02-22 10:58   ` Maxime Coquelin
2023-02-15 17:09 ` [PATCH v2 16/16] test/bbdev: remove iter count from bler test Hernan Vargas
2023-02-22 11:01   ` Maxime Coquelin
2023-02-20 15:31 ` [PATCH v2 00/16] test/bbdev: changes for 23.03 Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=64ba8d62-8a4b-5c0b-0a41-246b61452cee@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=hernan.vargas@intel.com \
    --cc=nicolas.chautru@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=trix@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).