From: David Marchand Date: Fri, 8 Nov 2019 10:04:42 +0000 (+0100) Subject: examples/l2fwd-event: fix build on RHEL 7.6 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ab1488a32e7934682be2c7127a92378823855b3f;p=dpdk.git examples/l2fwd-event: fix build on RHEL 7.6 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 ’ [-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 ’ [-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 Acked-by: Kevin Traynor --- diff --git a/examples/l2fwd-event/l2fwd_event_generic.c b/examples/l2fwd-event/l2fwd_event_generic.c index f996081733..b7e467c1e1 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(ð_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 bed94754f7..b382763dd9 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(ð_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;