net/bnxt: fix PF support in SR-IOV mode
[dpdk.git] / examples / l3fwd / l3fwd_event_internal_port.c
index 993e26f..9916a7f 100644 (file)
@@ -99,7 +99,10 @@ l3fwd_event_port_setup_internal_port(void)
        if (!evt_rsrc->evp.event_p_id)
                rte_panic("Failed to allocate memory for Event Ports\n");
 
-       rte_event_port_default_conf_get(event_d_id, 0, &def_p_conf);
+       ret = rte_event_port_default_conf_get(event_d_id, 0, &def_p_conf);
+       if (ret < 0)
+               rte_panic("Error to get default configuration of event port\n");
+
        if (def_p_conf.new_event_threshold < event_p_conf.new_event_threshold)
                event_p_conf.new_event_threshold =
                                                def_p_conf.new_event_threshold;
@@ -110,8 +113,10 @@ l3fwd_event_port_setup_internal_port(void)
        if (def_p_conf.enqueue_depth < event_p_conf.enqueue_depth)
                event_p_conf.enqueue_depth = def_p_conf.enqueue_depth;
 
-       event_p_conf.disable_implicit_release =
-               evt_rsrc->disable_implicit_release;
+       event_p_conf.event_port_cfg = 0;
+       if (evt_rsrc->disable_implicit_release)
+               event_p_conf.event_port_cfg |=
+                       RTE_EVENT_PORT_CFG_DISABLE_IMPL_REL;
 
        for (event_p_id = 0; event_p_id < evt_rsrc->evp.nb_ports;
                                                                event_p_id++) {
@@ -150,7 +155,10 @@ l3fwd_event_queue_setup_internal_port(uint32_t event_queue_cfg)
        uint8_t event_q_id = 0;
        int32_t ret;
 
-       rte_event_queue_default_conf_get(event_d_id, event_q_id, &def_q_conf);
+       ret = rte_event_queue_default_conf_get(event_d_id, event_q_id,
+                                              &def_q_conf);
+       if (ret < 0)
+               rte_panic("Error to get default config of event queue\n");
 
        if (def_q_conf.nb_atomic_flows < event_q_conf.nb_atomic_flows)
                event_q_conf.nb_atomic_flows = def_q_conf.nb_atomic_flows;