diff mbox series

[17/35] net/ionic: use a helper variable in packet Tx function

Message ID 20221007174336.54354-18-andrew.boyer@amd.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series net/ionic: updates for 22.11 release | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Boyer, Andrew Oct. 7, 2022, 5:43 p.m. UTC
This improves readability.

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
---
 drivers/net/ionic/ionic_rxtx.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/ionic/ionic_rxtx.c b/drivers/net/ionic/ionic_rxtx.c
index 0f251eca13..0c1cc842cf 100644
--- a/drivers/net/ionic/ionic_rxtx.c
+++ b/drivers/net/ionic/ionic_rxtx.c
@@ -560,6 +560,7 @@  ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 	struct ionic_tx_qcq *txq = tx_queue;
 	struct ionic_queue *q = &txq->qcq.q;
 	struct ionic_tx_stats *stats = &txq->stats;
+	struct rte_mbuf *mbuf;
 	uint32_t next_q_head_idx;
 	uint32_t bytes_tx = 0;
 	uint16_t nb_avail, nb_tx = 0;
@@ -582,16 +583,18 @@  ionic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			rte_prefetch0(&q->info[next_q_head_idx]);
 		}
 
-		if (tx_pkts[nb_tx]->ol_flags & RTE_MBUF_F_TX_TCP_SEG)
-			err = ionic_tx_tso(txq, tx_pkts[nb_tx]);
+		mbuf = tx_pkts[nb_tx];
+
+		if (mbuf->ol_flags & RTE_MBUF_F_TX_TCP_SEG)
+			err = ionic_tx_tso(txq, mbuf);
 		else
-			err = ionic_tx(txq, tx_pkts[nb_tx]);
+			err = ionic_tx(txq, mbuf);
 		if (err) {
 			stats->drop += nb_pkts - nb_tx;
 			break;
 		}
 
-		bytes_tx += tx_pkts[nb_tx]->pkt_len;
+		bytes_tx += mbuf->pkt_len;
 		nb_tx++;
 	}