[dpdk-dev] [PATCH v4 08/10] examples/l2fwd-event: add eventdev main loop
Pavan Nikhilesh Bhagavatula
pbhagavatula at marvell.com
Fri Sep 27 16:35:22 CEST 2019
>>
>> From: Pavan Nikhilesh <pbhagavatula at marvell.com>
>>
>> Add event dev main loop based on enabled l2fwd options and
>eventdev
>> capabilities.
>>
>> Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
>> ---
>
><snip>
>
>> + if (flags & L2FWD_EVENT_TX_DIRECT) {
>> + rte_event_eth_tx_adapter_txq_set(mbuf, 0);
>> + while
>> (!rte_event_eth_tx_adapter_enqueue(event_d_id,
>> + port_id,
>> + &ev, 1)
>&&
>> + !*done)
>> + ;
>> + }
>
>In the TX direct mode we can send packets directly to the ethernet
>device using ethdev
>API's. This will save unnecessary indirections and event unfolds within
>the driver.
How would we guarantee atomicity of access to Tx queues? Between cores as we can only use one Tx queue.
Also, if SCHED_TYPE is ORDERED how would we guarantee flow ordering?
The capability of MT_LOCKFREE and flow ordering is abstracted through ` rte_event_eth_tx_adapter_enqueue `.
@see examples/eventdev_pipeline and app/test-eventdev/test_pipeline_*.
>
>> +
>> + if (timer_period > 0)
>> + __atomic_fetch_add(&eventdev_rsrc-
>>stats[mbuf-
>> >port].tx,
>> + 1, __ATOMIC_RELAXED);
>> + }
>> +}
More information about the dev
mailing list