Thread (68 messages) read the whole thread 68 messages, 6 authors, 2022-02-01

Re: [PATCH v2 06/16] net/dpaa2: support multiple txqs en-queue for ordered

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2021-12-27 18:01:59

On Mon, 27 Dec 2021 21:46:35 +0530
nipun.gupta@nxp.com wrote:
quoted hunk ↗ jump to hunk
@@ -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];
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help