dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Marko Kovacevic <marko.kovacevic@intel.com>,
	Ori Kam <orika@mellanox.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Radu Nicolau <radu.nicolau@intel.com>,
	Akhil Goyal <akhil.goyal@nxp.com>,
	Tomasz Kantecki <tomasz.kantecki@intel.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Pavan Nikhilesh <pbhagavatula@marvell.com>
Subject: [dpdk-dev] [PATCH] examples/l2fwd-event: fix build on RHEL 7.6
Date: Fri,  8 Nov 2019 11:04:42 +0100	[thread overview]
Message-ID: <1573207482-32642-1-git-send-email-david.marchand@redhat.com> (raw)

  CC l2fwd_event_generic.o
.../l2fwd_event_generic.c: In function
  ‘l2fwd_rx_tx_adapter_setup_generic’:
.../l2fwd_event_generic.c:203:3: error: missing initializer for field
  ‘impl_opaque’ of ‘struct <anonymous>’
  [-Werror=missing-field-initializers]
   }
   ^
In file included from .../l2fwd_event_generic.c:10:0:
.../include/rte_eventdev.h:1057:12: note: ‘impl_opaque’ declared here
    uint8_t impl_opaque;
            ^

  CC l2fwd_event_internal_port.o
.../l2fwd_event_internal_port.c: In function
  ‘l2fwd_rx_tx_adapter_setup_internal_port’:
.../l2fwd_event_internal_port.c:201:3: error: missing initializer for
  field ‘impl_opaque’ of ‘struct <anonymous>’
  [-Werror=missing-field-initializers]
   }
   ^
In file included from .../l2fwd_event_internal_port.c:10:0:
.../include/rte_eventdev.h:1057:12: note: ‘impl_opaque’ declared here
    uint8_t impl_opaque;
            ^

Fixes: 50f05aa6ed9a ("examples/l2fwd-event: setup Rx/Tx adapter")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 examples/l2fwd-event/l2fwd_event_generic.c       | 11 ++++-------
 examples/l2fwd-event/l2fwd_event_internal_port.c | 11 ++++-------
 2 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/examples/l2fwd-event/l2fwd_event_generic.c b/examples/l2fwd-event/l2fwd_event_generic.c
index f996081..b7e467c 100644
--- a/examples/l2fwd-event/l2fwd_event_generic.c
+++ b/examples/l2fwd-event/l2fwd_event_generic.c
@@ -195,13 +195,7 @@ static void
 l2fwd_rx_tx_adapter_setup_generic(struct l2fwd_resources *rsrc)
 {
 	struct l2fwd_event_resources *evt_rsrc = rsrc->evt_rsrc;
-	struct rte_event_eth_rx_adapter_queue_conf eth_q_conf = {
-		.rx_queue_flags = 0,
-		.ev = {
-			.queue_id = 0,
-			.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
-		}
-	};
+	struct rte_event_eth_rx_adapter_queue_conf eth_q_conf;
 	uint8_t event_d_id = evt_rsrc->event_d_id;
 	uint8_t rx_adptr_id = 0;
 	uint8_t tx_adptr_id = 0;
@@ -210,6 +204,9 @@ l2fwd_rx_tx_adapter_setup_generic(struct l2fwd_resources *rsrc)
 	uint32_t service_id;
 	int32_t ret, i = 0;
 
+	memset(&eth_q_conf, 0, sizeof(eth_q_conf));
+	eth_q_conf.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL;
+
 	/* Rx adapter setup */
 	evt_rsrc->rx_adptr.nb_rx_adptr = 1;
 	evt_rsrc->rx_adptr.rx_adptr = (uint8_t *)malloc(sizeof(uint8_t) *
diff --git a/examples/l2fwd-event/l2fwd_event_internal_port.c b/examples/l2fwd-event/l2fwd_event_internal_port.c
index bed9475..b382763 100644
--- a/examples/l2fwd-event/l2fwd_event_internal_port.c
+++ b/examples/l2fwd-event/l2fwd_event_internal_port.c
@@ -193,13 +193,7 @@ static void
 l2fwd_rx_tx_adapter_setup_internal_port(struct l2fwd_resources *rsrc)
 {
 	struct l2fwd_event_resources *evt_rsrc = rsrc->evt_rsrc;
-	struct rte_event_eth_rx_adapter_queue_conf eth_q_conf = {
-		.rx_queue_flags = 0,
-		.ev = {
-			.queue_id = 0,
-			.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
-		}
-	};
+	struct rte_event_eth_rx_adapter_queue_conf eth_q_conf;
 	uint8_t event_d_id = evt_rsrc->event_d_id;
 	uint16_t adapter_id = 0;
 	uint16_t nb_adapter = 0;
@@ -207,6 +201,9 @@ l2fwd_rx_tx_adapter_setup_internal_port(struct l2fwd_resources *rsrc)
 	uint8_t q_id = 0;
 	int ret;
 
+	memset(&eth_q_conf, 0, sizeof(eth_q_conf));
+	eth_q_conf.ev.priority = RTE_EVENT_DEV_PRIORITY_NORMAL;
+
 	RTE_ETH_FOREACH_DEV(port_id) {
 		if ((rsrc->enabled_port_mask & (1 << port_id)) == 0)
 			continue;
-- 
1.8.3.1


             reply	other threads:[~2019-11-08 10:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08 10:04 David Marchand [this message]
2019-11-08 14:21 ` [dpdk-dev] [PATCH] examples/l2fwd-event: fix build on RHEL 7.6 Kevin Traynor
2019-11-08 14:31   ` David Marchand

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=1573207482-32642-1-git-send-email-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=akhil.goyal@nxp.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=marko.kovacevic@intel.com \
    --cc=orika@mellanox.com \
    --cc=pbhagavatula@marvell.com \
    --cc=radu.nicolau@intel.com \
    --cc=skori@marvell.com \
    --cc=tomasz.kantecki@intel.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).