[dpdk-dev] Ethernet API - multiple post-RX-burst callbacks' run-order is opposite to their add-order

Sanford, Robert rsanford at akamai.com
Thu Jul 2 23:04:48 CEST 2015


When one adds multiple post-RX-burst callbacks to a queue, their execution order is the opposite of the order in which they are added. For example, we add callback A( ), and then we add callback B( ). When we call rte_eth_rx_burst, after invoking the device's rx_pkt_burst function, it will invoke B( ), and then A( ). The same goes for pre-TX-burst callbacks, too.

This is counter-intuitive. Shouldn't we either execute the callbacks in the same order that we add them (by changing the internals of the add-APIs), or change the add-APIs to allow one to specify whether a callback is added to the head or tail of the callback list? At the least, we could document the expected behavior.
Any thoughts on this?

--
Regards,
Robert



More information about the dev mailing list