Hi Pavan, snipped > >> Add event dev main loop based on enabled l2fwd options and > >eventdev > >> capabilities. > >> > >> Signed-off-by: Pavan Nikhilesh <pbhagavat...@marvell.com> > >> --- > >> + if (rsrc->event_mode) { > >> + port_conf.rxmode.mq_mode = ETH_MQ_RX_RSS; > >> + port_conf.rx_adv_conf.rss_conf.rss_key = NULL; > >> + port_conf.rx_adv_conf.rss_conf.rss_hf = ETH_RSS_IP; > >> + } > >Question, is RSS hash configured for generating flow id for Eventdev? > >As my understanding. RSS for single RX port-queue pair does not require > >the same. Thanks for the confirmation.
> >snipped > > In case of SW event device i.e. vdev=event_sw0 the software Rx adapter > requires > mbuf::rss:hash to distribute packets else it has to calculate rss. > > @see lib/librte_eventdev/rte_event_eth_rx_adapter.c +817 ' > rss = do_rss ? > rxa_do_softrss(m, rx_adapter->rss_key_be) : > m->hash.rss; > ' > > >> + if (is_master && timer_period > 0) { > >> + cur_tsc = rte_rdtsc(); > >> + diff_tsc = cur_tsc - prev_tsc; > >> + > >> + /* advance the timer */ > >> + timer_tsc += diff_tsc; > >> + > >> + /* if timer has reached its timeout */ > >> + if (unlikely(timer_tsc >= timer_period)) { > >> + print_stats(rsrc); > >> + /* reset the timer */ > >> + timer_tsc = 0; > >> + } > >> + prev_tsc = cur_tsc; > >> + } > >Is it possible to move the print_stats to service core, as 'CALL_MASTER' > >is enabled in remote_launch making this a potential worker? > > > > Since not every eventdevice requires Service core user might not pass service > core mask. > Instead we could do SKIP_MASTER and prints stats here. Thanks > > >> + > >> + /* Read packet from eventdev */ > >> + if (!rte_event_dequeue_burst(event_d_id, port_id, > >&ev, 1, 0)) > >> + continue; > >Is not this unlikely `nb_burst == 0` > > > > Not necessarily refer > https://mails.dpdk.org/archives/dev/2018-July/108610.html Thanks for the article and links it is helpful. Following the article suggestion, should not the code be enhanced for execute code rather than continue? snipped > >> + /* Read packet from eventdev */ > >> + nb_rx = rte_event_dequeue_burst(event_d_id, > >port_id, ev, > >> + deq_len, 0); > >> + if (nb_rx == 0) > >Can we use `unlikely`? > > Not necessarily refer > https://mails.dpdk.org/archives/dev/2018-July/108610.html Same as above. > > >> + continue; > >> + > >> + for (i = 0; i < nb_rx; i++) { > >> + l2fwd_event_fwd(rsrc, &ev[i], tx_q_id, > >timer_period, > >> + flags); > >> + } > >> + > >> + if (flags & L2FWD_EVENT_TX_ENQ) { > >> + nb_tx = > >rte_event_enqueue_burst(event_d_id, port_id, > >> + ev, nb_rx); > >> + while (nb_tx < nb_rx && !rsrc->force_quit) > >> + nb_tx += > >> rte_event_enqueue_burst(event_d_id, > >> + port_id, ev + nb_tx, > >> + nb_rx - nb_tx); > >Can we use `continue` as we do not transmit from the same worker int > >his case? > > I'm not sure I follow what you meant here. We are trying to transmit the work > present on the worker till we succeed, if we do a continue then we would loose > the untransmitted packets. Maybe I mistook the L2FWD against ETHDEV_EVENT flags. As per my current understanding L2FWD_EVENT_TX_ENQ uses extra queue stage for single-event-enqueue for TX adapter, while L2FWD_EVENT_TX_DIRECT allows the worker to do transmit via port. May be this is wrong expectation. > > @see examples/eventdev_pipeline/pipeline_worker_generic.c +109 I will check the same and get back as required. > > >> + } > >> + > >snipped