liquidio: simplify octeon_flush_iq()
Subsystems (3)
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.
Signed-off-by Derek Chickles <[email protected]>
Signed-off-by Felix Manlunas <[email protected]>
Signed-off-by Satanand Burla <[email protected]>
--- 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
@@ -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
@@ -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
@@ -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
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 thepending_threshargument, simplify that function by removing that argument. This avoids one atomic read as well.Signed-off-by Derek Chickles <[email protected]>Signed-off-by Felix Manlunas <[email protected]>Signed-off-by Satanand Burla <[email protected]>
Applied.