DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH] app/eventdev: fix gcc 4.8 compilation errors
@ 2018-04-16 13:13 Pavan Nikhilesh
  2018-04-16 13:51 ` Andrew Rybchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Pavan Nikhilesh @ 2018-04-16 13:13 UTC (permalink / raw)
  To: thomas, jerin.jacob, arybchenko; +Cc: dev, Pavan Nikhilesh

test_perf_common.c: In function ‘perf_event_timer_producer’:
test_perf_common.c:99:3: error: missing initializer for
 field ‘priority’ of ‘struct <anonymous>’
 [-Werror=missing-field-initializers]
   .ev.sched_type = t->opt->sched_type_list[0],

Fixes: d008f20bce23 ("app/eventdev: add event timer adapter as a producer")

Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 app/test-eventdev/test_perf_common.c | 36 ++++++++++++++--------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index a74ab9a9e..f16791861 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -87,21 +87,21 @@ perf_event_timer_producer(void *arg)
 	struct rte_mempool *pool = t->pool;
 	struct perf_elt *m;
 	struct rte_event_timer_adapter **adptr = t->timer_adptr;
+	struct rte_event_timer tim;
 	uint64_t timeout_ticks = opt->expiry_nsec / opt->timer_tick_nsec;
 
+	memset(&tim, 0, sizeof(struct rte_event_timer));
 	timeout_ticks = opt->optm_timer_tick_nsec ?
 			(timeout_ticks * opt->timer_tick_nsec)
 			/ opt->optm_timer_tick_nsec : timeout_ticks;
 	timeout_ticks += timeout_ticks ? 0 : 1;
-	const struct rte_event_timer tim = {
-		.ev.op = RTE_EVENT_OP_NEW,
-		.ev.queue_id = p->queue_id,
-		.ev.sched_type = t->opt->sched_type_list[0],
-		.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
-		.ev.event_type =  RTE_EVENT_TYPE_TIMER,
-		.state = RTE_EVENT_TIMER_NOT_ARMED,
-		.timeout_ticks = timeout_ticks,
-	};
+	tim.ev.event_type =  RTE_EVENT_TYPE_TIMER;
+	tim.ev.op = RTE_EVENT_OP_NEW;
+	tim.ev.sched_type = t->opt->sched_type_list[0];
+	tim.ev.queue_id = p->queue_id;
+	tim.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL;
+	tim.state = RTE_EVENT_TIMER_NOT_ARMED;
+	tim.timeout_ticks = timeout_ticks;
 
 	if (opt->verbose_level > 1)
 		printf("%s(): lcore %d\n", __func__, rte_lcore_id());
@@ -149,21 +149,21 @@ perf_event_timer_producer_burst(void *arg)
 	struct rte_mempool *pool = t->pool;
 	struct perf_elt *m[BURST_SIZE + 1] = {NULL};
 	struct rte_event_timer_adapter **adptr = t->timer_adptr;
+	struct rte_event_timer tim;
 	uint64_t timeout_ticks = opt->expiry_nsec / opt->timer_tick_nsec;
 
+	memset(&tim, 0, sizeof(struct rte_event_timer));
 	timeout_ticks = opt->optm_timer_tick_nsec ?
 			(timeout_ticks * opt->timer_tick_nsec)
 			/ opt->optm_timer_tick_nsec : timeout_ticks;
 	timeout_ticks += timeout_ticks ? 0 : 1;
-	const struct rte_event_timer tim = {
-		.ev.op = RTE_EVENT_OP_NEW,
-		.ev.queue_id = p->queue_id,
-		.ev.sched_type = t->opt->sched_type_list[0],
-		.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
-		.ev.event_type =  RTE_EVENT_TYPE_TIMER,
-		.state = RTE_EVENT_TIMER_NOT_ARMED,
-		.timeout_ticks = timeout_ticks,
-	};
+	tim.ev.event_type =  RTE_EVENT_TYPE_TIMER;
+	tim.ev.op = RTE_EVENT_OP_NEW;
+	tim.ev.sched_type = t->opt->sched_type_list[0];
+	tim.ev.queue_id = p->queue_id;
+	tim.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL;
+	tim.state = RTE_EVENT_TIMER_NOT_ARMED;
+	tim.timeout_ticks = timeout_ticks;
 
 	if (opt->verbose_level > 1)
 		printf("%s(): lcore %d\n", __func__, rte_lcore_id());
-- 
2.17.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] app/eventdev: fix gcc 4.8 compilation errors
  2018-04-16 13:13 [dpdk-dev] [PATCH] app/eventdev: fix gcc 4.8 compilation errors Pavan Nikhilesh
@ 2018-04-16 13:51 ` Andrew Rybchenko
  2018-04-16 15:05   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Rybchenko @ 2018-04-16 13:51 UTC (permalink / raw)
  To: Pavan Nikhilesh, thomas, jerin.jacob; +Cc: dev

On 04/16/2018 04:13 PM, Pavan Nikhilesh wrote:
> test_perf_common.c: In function ‘perf_event_timer_producer’:
> test_perf_common.c:99:3: error: missing initializer for
>   field ‘priority’ of ‘struct <anonymous>’
>   [-Werror=missing-field-initializers]
>     .ev.sched_type = t->opt->sched_type_list[0],
>
> Fixes: d008f20bce23 ("app/eventdev: add event timer adapter as a producer")
>
> Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Thanks for quick fix.

Build on RHEL 7.4:
Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] app/eventdev: fix gcc 4.8 compilation errors
  2018-04-16 13:51 ` Andrew Rybchenko
@ 2018-04-16 15:05   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-04-16 15:05 UTC (permalink / raw)
  To: Pavan Nikhilesh; +Cc: dev, Andrew Rybchenko, jerin.jacob

16/04/2018 15:51, Andrew Rybchenko:
> On 04/16/2018 04:13 PM, Pavan Nikhilesh wrote:
> > test_perf_common.c: In function ‘perf_event_timer_producer’:
> > test_perf_common.c:99:3: error: missing initializer for
> >   field ‘priority’ of ‘struct <anonymous>’
> >   [-Werror=missing-field-initializers]
> >     .ev.sched_type = t->opt->sched_type_list[0],
> >
> > Fixes: d008f20bce23 ("app/eventdev: add event timer adapter as a producer")
> >
> > Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> Thanks for quick fix.
> 
> Build on RHEL 7.4:
> Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-16 15:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-16 13:13 [dpdk-dev] [PATCH] app/eventdev: fix gcc 4.8 compilation errors Pavan Nikhilesh
2018-04-16 13:51 ` Andrew Rybchenko
2018-04-16 15:05   ` Thomas Monjalon

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).