X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Feventdev_pipeline%2Fpipeline_worker_tx.c;h=a0f40c27c6cee27723e00d1db9e1ea383b4a7578;hb=0224b78eff68525a31e6fb9e51ca3fe1121760bb;hp=85eb075fc8714c023868711ccab4540861e62d6b;hpb=085edac2ca38105b629fed34fb82ad280eea129b;p=dpdk.git diff --git a/examples/eventdev_pipeline/pipeline_worker_tx.c b/examples/eventdev_pipeline/pipeline_worker_tx.c index 85eb075fc8..a0f40c27c6 100644 --- a/examples/eventdev_pipeline/pipeline_worker_tx.c +++ b/examples/eventdev_pipeline/pipeline_worker_tx.c @@ -40,7 +40,7 @@ worker_tx_pkt(const uint8_t dev, const uint8_t port, struct rte_event *ev) { exchange_mac(ev->mbuf); rte_event_eth_tx_adapter_txq_set(ev->mbuf, 0); - while (!rte_event_eth_tx_adapter_enqueue(dev, port, ev, 1)) + while (!rte_event_eth_tx_adapter_enqueue(dev, port, ev, 1, 0)) rte_pause(); } @@ -465,6 +465,8 @@ setup_eventdev_worker_tx_enq(struct worker_data *worker_data) ret = rte_event_dev_info_get(dev_id, &dev_info); printf("\tEventdev %d: %s\n", dev_id, dev_info.driver_name); + if (dev_info.max_num_events < config.nb_events_limit) + config.nb_events_limit = dev_info.max_num_events; if (dev_info.max_event_port_dequeue_depth < config.nb_event_port_dequeue_depth) config.nb_event_port_dequeue_depth = @@ -528,6 +530,8 @@ setup_eventdev_worker_tx_enq(struct worker_data *worker_data) } printf("\n"); + if (wkr_p_conf.new_event_threshold > config.nb_events_limit) + wkr_p_conf.new_event_threshold = config.nb_events_limit; if (wkr_p_conf.dequeue_depth > config.nb_event_port_dequeue_depth) wkr_p_conf.dequeue_depth = config.nb_event_port_dequeue_depth; if (wkr_p_conf.enqueue_depth > config.nb_event_port_enqueue_depth) @@ -617,6 +621,8 @@ init_adapters(uint16_t nb_ports) .new_event_threshold = 4096, }; + if (adptr_p_conf.new_event_threshold > dev_info.max_num_events) + adptr_p_conf.new_event_threshold = dev_info.max_num_events; if (adptr_p_conf.dequeue_depth > dev_info.max_event_port_dequeue_depth) adptr_p_conf.dequeue_depth = dev_info.max_event_port_dequeue_depth;