[v5,4/7] app/bbdev: define wait for offload

Message ID 1603496581-35966-5-git-send-email-nicolas.chautru@intel.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series BBDEV test updates |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Chautru, Nicolas Oct. 23, 2020, 11:42 p.m. UTC
  Replacing magic number for default wait time for hw
offload.

Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
Acked-by: Liu Tianjiao <tianjiao.liu@intel.com>
---
 app/test-bbdev/test_bbdev_perf.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
  

Comments

Tom Rix Oct. 26, 2020, 1:33 p.m. UTC | #1
On 10/23/20 4:42 PM, Nicolas Chautru wrote:
> Replacing magic number for default wait time for hw
> offload.
>
> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> Acked-by: Liu Tianjiao <tianjiao.liu@intel.com>
> ---
>  app/test-bbdev/test_bbdev_perf.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
> index f30cbdb..39f06db 100644
> --- a/app/test-bbdev/test_bbdev_perf.c
> +++ b/app/test-bbdev/test_bbdev_perf.c
> @@ -25,6 +25,7 @@
>  
>  #define MAX_QUEUES RTE_MAX_LCORE
>  #define TEST_REPETITIONS 1000
> +#define WAIT_OFFLOAD_US 1000

Why wasn't 200 used ?

Tom

>  
>  #ifdef RTE_LIBRTE_PMD_BBDEV_FPGA_LTE_FEC
>  #include <fpga_lte_fec.h>
> @@ -4451,7 +4452,7 @@ typedef int (test_case_function)(struct active_device *ad,
>  		time_st->enq_acc_total_time += stats.acc_offload_cycles;
>  
>  		/* give time for device to process ops */
> -		rte_delay_us(200);
> +		rte_delay_us(WAIT_OFFLOAD_US);
>  
>  		/* Start time meas for dequeue function offload latency */
>  		deq_start_time = rte_rdtsc_precise();
> @@ -4542,7 +4543,7 @@ typedef int (test_case_function)(struct active_device *ad,
>  		time_st->enq_acc_total_time += stats.acc_offload_cycles;
>  
>  		/* give time for device to process ops */
> -		rte_delay_us(200);
> +		rte_delay_us(WAIT_OFFLOAD_US);
>  
>  		/* Start time meas for dequeue function offload latency */
>  		deq_start_time = rte_rdtsc_precise();
> @@ -4630,7 +4631,7 @@ typedef int (test_case_function)(struct active_device *ad,
>  		time_st->enq_acc_total_time += stats.acc_offload_cycles;
>  
>  		/* give time for device to process ops */
> -		rte_delay_us(200);
> +		rte_delay_us(WAIT_OFFLOAD_US);
>  
>  		/* Start time meas for dequeue function offload latency */
>  		deq_start_time = rte_rdtsc_precise();
> @@ -4713,7 +4714,7 @@ typedef int (test_case_function)(struct active_device *ad,
>  		time_st->enq_acc_total_time += stats.acc_offload_cycles;
>  
>  		/* give time for device to process ops */
> -		rte_delay_us(200);
> +		rte_delay_us(WAIT_OFFLOAD_US);
>  
>  		/* Start time meas for dequeue function offload latency */
>  		deq_start_time = rte_rdtsc_precise();
  
Chautru, Nicolas Oct. 26, 2020, 4:04 p.m. UTC | #2
> From: Tom Rix <trix@redhat.com>
> Sent: Monday, October 26, 2020 6:33 AM
> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org;
> akhil.goyal@nxp.com
> Cc: david.marchand@redhat.com
> Subject: Re: [PATCH v5 4/7] app/bbdev: define wait for offload
> 
> 
> On 10/23/20 4:42 PM, Nicolas Chautru wrote:
> > Replacing magic number for default wait time for hw offload.
> >
> > Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> > Acked-by: Liu Tianjiao <tianjiao.liu@intel.com>
> > ---
> >  app/test-bbdev/test_bbdev_perf.c | 9 +++++----
> >  1 file changed, 5 insertions(+), 4 deletions(-)
> >
> > diff --git a/app/test-bbdev/test_bbdev_perf.c
> > b/app/test-bbdev/test_bbdev_perf.c
> > index f30cbdb..39f06db 100644
> > --- a/app/test-bbdev/test_bbdev_perf.c
> > +++ b/app/test-bbdev/test_bbdev_perf.c
> > @@ -25,6 +25,7 @@
> >
> >  #define MAX_QUEUES RTE_MAX_LCORE
> >  #define TEST_REPETITIONS 1000
> > +#define WAIT_OFFLOAD_US 1000
> 
> Why wasn't 200 used ?
> 
> Tom

1ms is a more typical expectation for workload (TTI in numerology 0 for 5GNR and LTE). 


> 
> >
> >  #ifdef RTE_LIBRTE_PMD_BBDEV_FPGA_LTE_FEC  #include
> <fpga_lte_fec.h>
> > @@ -4451,7 +4452,7 @@ typedef int (test_case_function)(struct
> active_device *ad,
> >  		time_st->enq_acc_total_time += stats.acc_offload_cycles;
> >
> >  		/* give time for device to process ops */
> > -		rte_delay_us(200);
> > +		rte_delay_us(WAIT_OFFLOAD_US);
> >
> >  		/* Start time meas for dequeue function offload latency */
> >  		deq_start_time = rte_rdtsc_precise(); @@ -4542,7 +4543,7
> @@ typedef
> > int (test_case_function)(struct active_device *ad,
> >  		time_st->enq_acc_total_time += stats.acc_offload_cycles;
> >
> >  		/* give time for device to process ops */
> > -		rte_delay_us(200);
> > +		rte_delay_us(WAIT_OFFLOAD_US);
> >
> >  		/* Start time meas for dequeue function offload latency */
> >  		deq_start_time = rte_rdtsc_precise(); @@ -4630,7 +4631,7
> @@ typedef
> > int (test_case_function)(struct active_device *ad,
> >  		time_st->enq_acc_total_time += stats.acc_offload_cycles;
> >
> >  		/* give time for device to process ops */
> > -		rte_delay_us(200);
> > +		rte_delay_us(WAIT_OFFLOAD_US);
> >
> >  		/* Start time meas for dequeue function offload latency */
> >  		deq_start_time = rte_rdtsc_precise(); @@ -4713,7 +4714,7
> @@ typedef
> > int (test_case_function)(struct active_device *ad,
> >  		time_st->enq_acc_total_time += stats.acc_offload_cycles;
> >
> >  		/* give time for device to process ops */
> > -		rte_delay_us(200);
> > +		rte_delay_us(WAIT_OFFLOAD_US);
> >
> >  		/* Start time meas for dequeue function offload latency */
> >  		deq_start_time = rte_rdtsc_precise();
  
Tom Rix Oct. 28, 2020, 8:24 p.m. UTC | #3
On 10/26/20 9:04 AM, Chautru, Nicolas wrote:
>> From: Tom Rix <trix@redhat.com>
>> Sent: Monday, October 26, 2020 6:33 AM
>> To: Chautru, Nicolas <nicolas.chautru@intel.com>; dev@dpdk.org;
>> akhil.goyal@nxp.com
>> Cc: david.marchand@redhat.com
>> Subject: Re: [PATCH v5 4/7] app/bbdev: define wait for offload
>>
>>
>> On 10/23/20 4:42 PM, Nicolas Chautru wrote:
>>> Replacing magic number for default wait time for hw offload.
>>>
>>> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
>>> Acked-by: Liu Tianjiao <tianjiao.liu@intel.com>
>>> ---
>>>  app/test-bbdev/test_bbdev_perf.c | 9 +++++----
>>>  1 file changed, 5 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/app/test-bbdev/test_bbdev_perf.c
>>> b/app/test-bbdev/test_bbdev_perf.c
>>> index f30cbdb..39f06db 100644
>>> --- a/app/test-bbdev/test_bbdev_perf.c
>>> +++ b/app/test-bbdev/test_bbdev_perf.c
>>> @@ -25,6 +25,7 @@
>>>
>>>  #define MAX_QUEUES RTE_MAX_LCORE
>>>  #define TEST_REPETITIONS 1000
>>> +#define WAIT_OFFLOAD_US 1000
>> Why wasn't 200 used ?
>>
>> Tom
> 1ms is a more typical expectation for workload (TTI in numerology 0 for 5GNR and LTE). 

That's fine, i was only commenting because it changed.

Tom

>
>
>>>  #ifdef RTE_LIBRTE_PMD_BBDEV_FPGA_LTE_FEC  #include
>> <fpga_lte_fec.h>
>>> @@ -4451,7 +4452,7 @@ typedef int (test_case_function)(struct
>> active_device *ad,
>>>  		time_st->enq_acc_total_time += stats.acc_offload_cycles;
>>>
>>>  		/* give time for device to process ops */
>>> -		rte_delay_us(200);
>>> +		rte_delay_us(WAIT_OFFLOAD_US);
>>>
>>>  		/* Start time meas for dequeue function offload latency */
>>>  		deq_start_time = rte_rdtsc_precise(); @@ -4542,7 +4543,7
>> @@ typedef
>>> int (test_case_function)(struct active_device *ad,
>>>  		time_st->enq_acc_total_time += stats.acc_offload_cycles;
>>>
>>>  		/* give time for device to process ops */
>>> -		rte_delay_us(200);
>>> +		rte_delay_us(WAIT_OFFLOAD_US);
>>>
>>>  		/* Start time meas for dequeue function offload latency */
>>>  		deq_start_time = rte_rdtsc_precise(); @@ -4630,7 +4631,7
>> @@ typedef
>>> int (test_case_function)(struct active_device *ad,
>>>  		time_st->enq_acc_total_time += stats.acc_offload_cycles;
>>>
>>>  		/* give time for device to process ops */
>>> -		rte_delay_us(200);
>>> +		rte_delay_us(WAIT_OFFLOAD_US);
>>>
>>>  		/* Start time meas for dequeue function offload latency */
>>>  		deq_start_time = rte_rdtsc_precise(); @@ -4713,7 +4714,7
>> @@ typedef
>>> int (test_case_function)(struct active_device *ad,
>>>  		time_st->enq_acc_total_time += stats.acc_offload_cycles;
>>>
>>>  		/* give time for device to process ops */
>>> -		rte_delay_us(200);
>>> +		rte_delay_us(WAIT_OFFLOAD_US);
>>>
>>>  		/* Start time meas for dequeue function offload latency */
>>>  		deq_start_time = rte_rdtsc_precise();
  

Patch

diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c
index f30cbdb..39f06db 100644
--- a/app/test-bbdev/test_bbdev_perf.c
+++ b/app/test-bbdev/test_bbdev_perf.c
@@ -25,6 +25,7 @@ 
 
 #define MAX_QUEUES RTE_MAX_LCORE
 #define TEST_REPETITIONS 1000
+#define WAIT_OFFLOAD_US 1000
 
 #ifdef RTE_LIBRTE_PMD_BBDEV_FPGA_LTE_FEC
 #include <fpga_lte_fec.h>
@@ -4451,7 +4452,7 @@  typedef int (test_case_function)(struct active_device *ad,
 		time_st->enq_acc_total_time += stats.acc_offload_cycles;
 
 		/* give time for device to process ops */
-		rte_delay_us(200);
+		rte_delay_us(WAIT_OFFLOAD_US);
 
 		/* Start time meas for dequeue function offload latency */
 		deq_start_time = rte_rdtsc_precise();
@@ -4542,7 +4543,7 @@  typedef int (test_case_function)(struct active_device *ad,
 		time_st->enq_acc_total_time += stats.acc_offload_cycles;
 
 		/* give time for device to process ops */
-		rte_delay_us(200);
+		rte_delay_us(WAIT_OFFLOAD_US);
 
 		/* Start time meas for dequeue function offload latency */
 		deq_start_time = rte_rdtsc_precise();
@@ -4630,7 +4631,7 @@  typedef int (test_case_function)(struct active_device *ad,
 		time_st->enq_acc_total_time += stats.acc_offload_cycles;
 
 		/* give time for device to process ops */
-		rte_delay_us(200);
+		rte_delay_us(WAIT_OFFLOAD_US);
 
 		/* Start time meas for dequeue function offload latency */
 		deq_start_time = rte_rdtsc_precise();
@@ -4713,7 +4714,7 @@  typedef int (test_case_function)(struct active_device *ad,
 		time_st->enq_acc_total_time += stats.acc_offload_cycles;
 
 		/* give time for device to process ops */
-		rte_delay_us(200);
+		rte_delay_us(WAIT_OFFLOAD_US);
 
 		/* Start time meas for dequeue function offload latency */
 		deq_start_time = rte_rdtsc_precise();