| 801 | } |
| 802 | |
| 803 | static int |
| 804 | perf_producer_wrapper(void *arg) |
| 805 | { |
| 806 | struct rte_event_dev_info dev_info; |
| 807 | struct prod_data *p = arg; |
| 808 | struct test_perf *t = p->t; |
| 809 | |
| 810 | rte_event_dev_info_get(p->dev_id, &dev_info); |
| 811 | if (!t->opt->prod_enq_burst_sz) { |
| 812 | t->opt->prod_enq_burst_sz = MAX_PROD_ENQ_BURST_SIZE; |
| 813 | if (dev_info.max_event_port_enqueue_depth > 0 && |
| 814 | (uint32_t)dev_info.max_event_port_enqueue_depth < |
| 815 | t->opt->prod_enq_burst_sz) |
| 816 | t->opt->prod_enq_burst_sz = |
| 817 | dev_info.max_event_port_enqueue_depth; |
| 818 | } |
| 819 | |
| 820 | /* In case of synthetic producer, launch perf_producer or |
| 821 | * perf_producer_burst depending on producer enqueue burst size |
| 822 | */ |
| 823 | if (t->opt->prod_type == EVT_PROD_TYPE_SYNT && |
| 824 | t->opt->prod_enq_burst_sz == 1) |
| 825 | return perf_producer(arg); |
| 826 | else if (t->opt->prod_type == EVT_PROD_TYPE_SYNT && |
| 827 | t->opt->prod_enq_burst_sz > 1) { |
| 828 | if (dev_info.max_event_port_enqueue_depth == 1) |
| 829 | evt_err("This event device does not support burst mode"); |
| 830 | else |
| 831 | return perf_producer_burst(arg); |
| 832 | } |
| 833 | else if (t->opt->prod_type == EVT_PROD_TYPE_EVENT_TIMER_ADPTR && |
| 834 | !t->opt->timdev_use_burst) |
| 835 | return perf_event_timer_producer(arg); |
| 836 | else if (t->opt->prod_type == EVT_PROD_TYPE_EVENT_TIMER_ADPTR && |
| 837 | t->opt->timdev_use_burst) |
| 838 | return perf_event_timer_producer_burst(arg); |
| 839 | else if (t->opt->prod_type == EVT_PROD_TYPE_EVENT_CRYPTO_ADPTR) { |
| 840 | if (t->opt->prod_enq_burst_sz > 1) |
| 841 | return perf_event_crypto_producer_burst(arg); |
| 842 | else |
| 843 | return perf_event_crypto_producer(arg); |
| 844 | } |
| 845 | return 0; |
| 846 | } |
| 847 | |
| 848 | static inline uint64_t |
| 849 | processed_pkts(struct test_perf *t) |
nothing calls this directly
no test coverage detected