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 <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> Acked-by: Kevin Traynor <ktraynor@redhat.com>
This commit is contained in:
parent
41c59e1180
commit
ab1488a32e
@ -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) *
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user