Re: [dpdk-dev] [PATCH v5 1/4] app/eventdev: add event timer adapter as a producer

2018-04-17 Thread Maxime Coquelin



On 04/17/2018 10:22 AM, Pavan Nikhilesh wrote:



It seems your patch introduce build regression on RHEL 7.5:
$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)

$ make -j32 install T=x86_64-native-linuxapp-gcc DESTDIR=legacy_destdir

== Build app/test-eventdev
   CC test_perf_common.o
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c: In function
‘perf_event_timer_producer’:
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c:99:3: error: missing
initializer for field ‘priority’ of ‘struct ’
[-Werror=missing-field-initializers]
.ev.sched_type = t->opt->sched_type_list[0],
^
In file included from
/tmp/dpdk_build/app/test-eventdev/test_perf_common.h:14:0,
  from
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c:5:
/tmp/dpdk_build/x86_64-native-linuxapp-gcc/include/rte_eventdev.h:1049:12:
note: ‘priority’ declared here
 uint8_t priority;
 ^
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c:100:3: error: missing
initializer for field ‘priority’ of ‘struct ’
[-Werror=missing-field-initializers]
.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
^
In file included from
/tmp/dpdk_build/app/test-eventdev/test_perf_common.h:14:0,
  from
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c:5:
/tmp/dpdk_build/x86_64-native-linuxapp-gcc/include/rte_eventdev.h:1049:12:
note: ‘priority’ declared here
 uint8_t priority;
 ^
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c:101:3: error: missing
initializer for field ‘impl_opaque’ of ‘struct ’
[-Werror=missing-field-initializers]
.ev.event_type =  RTE_EVENT_TYPE_TIMER,
^
In file included from
/tmp/dpdk_build/app/test-eventdev/test_perf_common.h:14:0,
  from
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c:5:
/tmp/dpdk_build/x86_64-native-linuxapp-gcc/include/rte_eventdev.h:1059:12:
note: ‘impl_opaque’ declared here
 uint8_t impl_opaque;
 ^
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c:102:3: error: missing
initializer for field ‘impl_opaque’ of ‘struct ’
[-Werror=missing-field-initializers]
.state = RTE_EVENT_TIMER_NOT_ARMED,
^
In file included from
/tmp/dpdk_build/app/test-eventdev/test_perf_common.h:14:0,
  from
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c:5:
/tmp/dpdk_build/x86_64-native-linuxapp-gcc/include/rte_eventdev.h:1059:12:
note: ‘impl_opaque’ declared here
 uint8_t impl_opaque;
 ^
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c: In function
‘perf_event_timer_producer_burst’:
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c:161:3: error: missing
initializer for field ‘priority’ of ‘struct ’
[-Werror=missing-field-initializers]
.ev.sched_type = t->opt->sched_type_list[0],
^
In file included from
/tmp/dpdk_build/app/test-eventdev/test_perf_common.h:14:0,
  from
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c:5:
/tmp/dpdk_build/x86_64-native-linuxapp-gcc/include/rte_eventdev.h:1049:12:
note: ‘priority’ declared here
 uint8_t priority;
 ^
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c:162:3: error: missing
initializer for field ‘priority’ of ‘struct ’
[-Werror=missing-field-initializers]
.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
^
In file included from
/tmp/dpdk_build/app/test-eventdev/test_perf_common.h:14:0,
  from
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c:5:
/tmp/dpdk_build/x86_64-native-linuxapp-gcc/include/rte_eventdev.h:1049:12:
note: ‘priority’ declared here
 uint8_t priority;
 ^
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c:163:3: error: missing
initializer for field ‘impl_opaque’ of ‘struct ’
[-Werror=missing-field-initializers]
.ev.event_type =  RTE_EVENT_TYPE_TIMER,
^
In file included from
/tmp/dpdk_build/app/test-eventdev/test_perf_common.h:14:0,
  from
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c:5:
/tmp/dpdk_build/x86_64-native-linuxapp-gcc/include/rte_eventdev.h:1059:12:
note: ‘impl_opaque’ declared here
 uint8_t impl_opaque;
 ^
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c:164:3: error: missing
initializer for field ‘impl_opaque’ of ‘struct ’
[-Werror=missing-field-initializers]
.state = RTE_EVENT_TIMER_NOT_ARMED,
^
In file included from
/tmp/dpdk_build/app/test-eventdev/test_perf_common.h:14:0,
  from
/tmp/dpdk_build/app/test-eventdev/test_perf_common.c:5:
/tmp/dpdk_build/x86_64-native-linuxapp-gcc/include/rte_eventdev.h:1059:12:
note: ‘impl_opaque’ declared here
 uint8_t impl_opaque;
 ^
cc1: all warnings being treated as errors
make[5]: *** [test_perf_common.o] Error 1
make[4]: *** [test-eventdev] Error 2
make[3]: *** [app] Error 2
make[2]: *** [all] Error 2
make[1]: *** [pre_install] Error 2
make: *** [install] Error 2

Hi Maxime,

This is already fixed on the HEAD.
Please refer to
http://dpdk.org/dev/patchwork/patch/38189/


Thanks for t

Re: [dpdk-dev] [PATCH v5 1/4] app/eventdev: add event timer adapter as a producer

2018-04-17 Thread Pavan Nikhilesh

> It seems your patch introduce build regression on RHEL 7.5:
> $ gcc --version
> gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28)
>
> $ make -j32 install T=x86_64-native-linuxapp-gcc DESTDIR=legacy_destdir
>
> == Build app/test-eventdev
>   CC test_perf_common.o
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c: In function
> ‘perf_event_timer_producer’:
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c:99:3: error: missing
> initializer for field ‘priority’ of ‘struct ’
> [-Werror=missing-field-initializers]
>.ev.sched_type = t->opt->sched_type_list[0],
>^
> In file included from
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.h:14:0,
>  from
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c:5:
> /tmp/dpdk_build/x86_64-native-linuxapp-gcc/include/rte_eventdev.h:1049:12:
> note: ‘priority’ declared here
> uint8_t priority;
> ^
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c:100:3: error: missing
> initializer for field ‘priority’ of ‘struct ’
> [-Werror=missing-field-initializers]
>.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
>^
> In file included from
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.h:14:0,
>  from
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c:5:
> /tmp/dpdk_build/x86_64-native-linuxapp-gcc/include/rte_eventdev.h:1049:12:
> note: ‘priority’ declared here
> uint8_t priority;
> ^
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c:101:3: error: missing
> initializer for field ‘impl_opaque’ of ‘struct ’
> [-Werror=missing-field-initializers]
>.ev.event_type =  RTE_EVENT_TYPE_TIMER,
>^
> In file included from
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.h:14:0,
>  from
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c:5:
> /tmp/dpdk_build/x86_64-native-linuxapp-gcc/include/rte_eventdev.h:1059:12:
> note: ‘impl_opaque’ declared here
> uint8_t impl_opaque;
> ^
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c:102:3: error: missing
> initializer for field ‘impl_opaque’ of ‘struct ’
> [-Werror=missing-field-initializers]
>.state = RTE_EVENT_TIMER_NOT_ARMED,
>^
> In file included from
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.h:14:0,
>  from
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c:5:
> /tmp/dpdk_build/x86_64-native-linuxapp-gcc/include/rte_eventdev.h:1059:12:
> note: ‘impl_opaque’ declared here
> uint8_t impl_opaque;
> ^
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c: In function
> ‘perf_event_timer_producer_burst’:
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c:161:3: error: missing
> initializer for field ‘priority’ of ‘struct ’
> [-Werror=missing-field-initializers]
>.ev.sched_type = t->opt->sched_type_list[0],
>^
> In file included from
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.h:14:0,
>  from
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c:5:
> /tmp/dpdk_build/x86_64-native-linuxapp-gcc/include/rte_eventdev.h:1049:12:
> note: ‘priority’ declared here
> uint8_t priority;
> ^
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c:162:3: error: missing
> initializer for field ‘priority’ of ‘struct ’
> [-Werror=missing-field-initializers]
>.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
>^
> In file included from
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.h:14:0,
>  from
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c:5:
> /tmp/dpdk_build/x86_64-native-linuxapp-gcc/include/rte_eventdev.h:1049:12:
> note: ‘priority’ declared here
> uint8_t priority;
> ^
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c:163:3: error: missing
> initializer for field ‘impl_opaque’ of ‘struct ’
> [-Werror=missing-field-initializers]
>.ev.event_type =  RTE_EVENT_TYPE_TIMER,
>^
> In file included from
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.h:14:0,
>  from
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c:5:
> /tmp/dpdk_build/x86_64-native-linuxapp-gcc/include/rte_eventdev.h:1059:12:
> note: ‘impl_opaque’ declared here
> uint8_t impl_opaque;
> ^
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c:164:3: error: missing
> initializer for field ‘impl_opaque’ of ‘struct ’
> [-Werror=missing-field-initializers]
>.state = RTE_EVENT_TIMER_NOT_ARMED,
>^
> In file included from
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.h:14:0,
>  from
> /tmp/dpdk_build/app/test-eventdev/test_perf_common.c:5:
> /tmp/dpdk_build/x86_64-native-linuxapp-gcc/include/rte_eventdev.h:1059:12:
> note: ‘impl_opaque’ declared here
> uint8_t impl_opaque;
> ^
> cc1: all warnings being treated as errors
> make[5]: *** [test_perf_common.o] Error 1
> make[4]: *** [test-eventdev] Error 2
> make[3]: *** [app] Error 2
> make[2]: *** [all] Error 2
> make[1]: *** [pre_install] Error 2

Re: [dpdk-dev] [PATCH v5 1/4] app/eventdev: add event timer adapter as a producer

2018-04-17 Thread Maxime Coquelin



On 04/06/2018 05:13 PM, Pavan Nikhilesh wrote:

Add event timer adapter as producer option that can be selected by
passing --prod_type_timerdev.

Signed-off-by: Pavan Nikhilesh 
Acked-by: Erik Gabriel Carrillo 
Acked-by: Jerin Jacob 
---

  v5 Changes:
  - Resending cause missing Acked-by.

  v4 Changes:
  - reuse struct rte_event_timer's unused data portion to store timestamp
  instead of spilling timestamp into a new cacheline.
  - change bkt_tck_nsec to timer_tick_nsec
  - change nb_bkt_tcks to expiry_nsec

  v3 Changes:
  - Add detailed options dump.
  - Fix few typos.

  v2 Changes:
  - set timer to NOT_ARMED before trying to arm it.
  - prevent edge cases for timeout_ticks being set to 0.

  app/test-eventdev/evt_options.c  |  54 ++---
  app/test-eventdev/evt_options.h  |  24 
  app/test-eventdev/test_perf_atq.c|  10 +-
  app/test-eventdev/test_perf_common.c | 171 +--
  app/test-eventdev/test_perf_common.h |  14 ++-
  app/test-eventdev/test_perf_queue.c  |   7 +-
  6 files changed, 243 insertions(+), 37 deletions(-)

diff --git a/app/test-eventdev/evt_options.c b/app/test-eventdev/evt_options.c
index 9683b2224..47e37bc9b 100644
--- a/app/test-eventdev/evt_options.c
+++ b/app/test-eventdev/evt_options.c
@@ -27,6 +27,11 @@ evt_options_default(struct evt_options *opt)
opt->pool_sz = 16 * 1024;
opt->wkr_deq_dep = 16;
opt->nb_pkts = (1ULL << 26); /* do ~64M packets */
+   opt->nb_timers = 1E8;
+   opt->nb_timer_adptrs = 1;
+   opt->timer_tick_nsec = 1E3; /* 1000ns ~ 1us */
+   opt->max_tmo_nsec = 1E5;  /* 10ns ~100us */
+   opt->expiry_nsec = 1E4;   /* 1ns ~10us */
opt->prod_type = EVT_PROD_TYPE_SYNT;
  }

@@ -86,6 +91,13 @@ evt_parse_eth_prod_type(struct evt_options *opt, const char 
*arg __rte_unused)
return 0;
  }

+static int
+evt_parse_timer_prod_type(struct evt_options *opt, const char *arg 
__rte_unused)
+{
+   opt->prod_type = EVT_PROD_TYPE_EVENT_TIMER_ADPTR;
+   return 0;
+}
+
  static int
  evt_parse_test_name(struct evt_options *opt, const char *arg)
  {
@@ -169,7 +181,10 @@ usage(char *program)
"\t--worker_deq_depth : dequeue depth of the worker\n"
"\t--fwd_latency  : perform fwd_latency measurement\n"
"\t--queue_priority   : enable queue priority\n"
-   "\t--prod_type_ethdev : use ethernet device as producer\n."
+   "\t--prod_type_ethdev : use ethernet device as producer.\n"
+   "\t--prod_type_timerdev : use event timer device as producer.\n"
+   "\t expity_nsec would be the timeout\n"
+   "\t in ns.\n"
);
printf("available tests:\n");
evt_test_dump_names();
@@ -217,22 +232,23 @@ evt_parse_sched_type_list(struct evt_options *opt, const 
char *arg)
  }

  static struct option lgopts[] = {
-   { EVT_NB_FLOWS, 1, 0, 0 },
-   { EVT_DEVICE,   1, 0, 0 },
-   { EVT_VERBOSE,  1, 0, 0 },
-   { EVT_TEST, 1, 0, 0 },
-   { EVT_PROD_LCORES,  1, 0, 0 },
-   { EVT_WORK_LCORES,  1, 0, 0 },
-   { EVT_SOCKET_ID,1, 0, 0 },
-   { EVT_POOL_SZ,  1, 0, 0 },
-   { EVT_NB_PKTS,  1, 0, 0 },
-   { EVT_WKR_DEQ_DEP,  1, 0, 0 },
-   { EVT_SCHED_TYPE_LIST,  1, 0, 0 },
-   { EVT_FWD_LATENCY,  0, 0, 0 },
-   { EVT_QUEUE_PRIORITY,   0, 0, 0 },
-   { EVT_PROD_ETHDEV,  0, 0, 0 },
-   { EVT_HELP, 0, 0, 0 },
-   { NULL, 0, 0, 0 }
+   { EVT_NB_FLOWS,1, 0, 0 },
+   { EVT_DEVICE,  1, 0, 0 },
+   { EVT_VERBOSE, 1, 0, 0 },
+   { EVT_TEST,1, 0, 0 },
+   { EVT_PROD_LCORES, 1, 0, 0 },
+   { EVT_WORK_LCORES, 1, 0, 0 },
+   { EVT_SOCKET_ID,   1, 0, 0 },
+   { EVT_POOL_SZ, 1, 0, 0 },
+   { EVT_NB_PKTS, 1, 0, 0 },
+   { EVT_WKR_DEQ_DEP, 1, 0, 0 },
+   { EVT_SCHED_TYPE_LIST, 1, 0, 0 },
+   { EVT_FWD_LATENCY, 0, 0, 0 },
+   { EVT_QUEUE_PRIORITY,  0, 0, 0 },
+   { EVT_PROD_ETHDEV, 0, 0, 0 },
+   { EVT_PROD_TIMERDEV,   0, 0, 0 },
+   { EVT_HELP,0, 0, 0 },
+   { NULL,0, 0, 0 }
  };

  static int
@@ -255,11 +271,12 @@ evt_opts_parse_long(int opt_idx, struct evt_options *opt)
{ EVT_FWD_LATENCY, evt_parse_fwd_latency},
{ EVT_QUEUE_PRIORITY, evt_parse_queue_priority},
{ EVT_PROD_ETHDEV, evt_parse_eth_prod_type},
+   { EVT_PROD_TIMERDEV, evt_parse_timer_prod_type},
};

for (i = 0; i < RTE_DIM(parsermap); i++) {
if (strncmp(lgopts[opt_idx].name, parsermap[i].lgopt_name,
-   strlen(parsermap[i].lgopt_name)) == 0)
+

Re: [dpdk-dev] [PATCH v5 1/4] app/eventdev: add event timer adapter as a producer

2018-04-07 Thread Jerin Jacob
-Original Message-
> Date: Fri,  6 Apr 2018 20:43:21 +0530
> From: Pavan Nikhilesh 
> To: jerin.ja...@caviumnetworks.com, santosh.shu...@caviumnetworks.com,
>  erik.g.carri...@intel.com
> Cc: dev@dpdk.org, Pavan Nikhilesh 
> Subject: [dpdk-dev] [PATCH v5 1/4] app/eventdev: add event timer adapter as
>  a producer
> X-Mailer: git-send-email 2.17.0
> 
> Add event timer adapter as producer option that can be selected by
> passing --prod_type_timerdev.
> 
> Signed-off-by: Pavan Nikhilesh 
> Acked-by: Erik Gabriel Carrillo 
> Acked-by: Jerin Jacob 

Applied this series to dpdk-next-eventdev/master. Thanks.