[PATCH v2 06/16] net/dpaa2: support multiple txqs en-queue for ordered
Stephen Hemminger
stephen at networkplumber.org
Mon Dec 27 19:01:54 CET 2021
On Mon, 27 Dec 2021 21:46:35 +0530
nipun.gupta at nxp.com wrote:
> @@ -1003,16 +1003,20 @@ dpaa2_eventdev_txa_enqueue(void *port,
> struct rte_event ev[],
> uint16_t nb_events)
> {
> - struct rte_mbuf *m = (struct rte_mbuf *)ev[0].mbuf;
> + void *txq[32];
> + struct rte_mbuf *m[32];
You are assuming nb_events <= 32.
Why not size the array based on nb_events.
> uint8_t qid, i;
>
> RTE_SET_USED(port);
>
> for (i = 0; i < nb_events; i++) {
> - qid = rte_event_eth_tx_adapter_txq_get(m);
> - rte_eth_tx_burst(m->port, qid, &m, 1);
> + m[i] = (struct rte_mbuf *)ev[i].mbuf;
Why the cast? it is already the right type.
> + qid = rte_event_eth_tx_adapter_txq_get(m[i]);
> + txq[i] = rte_eth_devices[m[i]->port].data->tx_queues[qid];
More information about the dev
mailing list