Skip to contentSkip to conversation

liquidio: simplify octeon_flush_iq()

PATCH Applied Felix Manlunas 2 participants 2 messages Jan 7, 2017 – Jan 8, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 liquidio: simplify octeon_flush_iq()

From: Derek Chickles <[email protected]>

Because every call to octeon_flush_iq() has a hardcoded 1 for the pending_thresh argument, simplify that function by removing that argument. This avoids one atomic read as well.

---
 drivers/net/ethernet/cavium/liquidio/lio_main.c    |  2 +-
 drivers/net/ethernet/cavium/liquidio/lio_vf_main.c |  2 +-
 drivers/net/ethernet/cavium/liquidio/octeon_iq.h   |  2 +-
 .../net/ethernet/cavium/liquidio/request_manager.c | 49 +++++++++++-----------
 4 files changed, 27 insertions(+), 28 deletions(-)
drivers/net/ethernet/cavium/liquidio/lio_main.c +1 -1
index 6443bc1..13f67a3 100644
@@ -2441,7 +2441,7 @@ static int liquidio_napi_poll(struct napi_struct *napi, int budget)
 	iq = oct->instr_queue[iq_no];
 	if (iq) {
 		/* Process iq buffers with in the budget limits */
-		tx_done = octeon_flush_iq(oct, iq, 1, budget);
+		tx_done = octeon_flush_iq(oct, iq, budget);
 		/* Update iq read-index rather than waiting for next interrupt.
 		 * Return back if tx_done is false.
 		 */
drivers/net/ethernet/cavium/liquidio/lio_vf_main.c +1 -1
index 70d96c1..55846f2 100644
@@ -1627,7 +1627,7 @@ static int liquidio_napi_poll(struct napi_struct *napi, int budget)
 	iq = oct->instr_queue[iq_no];
 	if (iq) {
 		/* Process iq buffers with in the budget limits */
-		tx_done = octeon_flush_iq(oct, iq, 1, budget);
+		tx_done = octeon_flush_iq(oct, iq, budget);
 		/* Update iq read-index rather than waiting for next interrupt.
 		 * Return back if tx_done is false.
 		 */
drivers/net/ethernet/cavium/liquidio/octeon_iq.h +1 -1
index e04ca8f..4608a5a 100644
@@ -369,5 +369,5 @@ int octeon_setup_iq(struct octeon_device *oct, int ifidx,
 		    void *app_ctx);
 int
 octeon_flush_iq(struct octeon_device *oct, struct octeon_instr_queue *iq,
-		u32 pending_thresh, u32 napi_budget);
+		u32 napi_budget);
 #endif				/* __OCTEON_IQ_H__ */
drivers/net/ethernet/cavium/liquidio/request_manager.c +24 -25

71 lines not on this page · raw message

maintainer Applied
#1 lore raw

From: Felix Manlunas <[email protected]>
Date: Fri, 6 Jan 2017 17:16:12 -0800

Quoted 9 lines

From: Derek Chickles <[email protected]>

Because every call to octeon_flush_iq() has a hardcoded 1 for the pending_thresh argument, simplify that function by removing that argument. This avoids one atomic read as well.

Applied.