summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cavium/liquidio/request_manager.c
diff options
context:
space:
mode:
authorPrasad Kanneganti2018-03-08 07:23:32 +0100
committerDavid S. Miller2018-03-09 03:46:12 +0100
commitcecd8d81ac5a7551d70c331b7f4ef7eb2609f336 (patch)
treed4560584165e1a6b616475c5524183928e6f2af6 /drivers/net/ethernet/cavium/liquidio/request_manager.c
parentliquidio: Resolved mbox read issue while reading more than one 64bit data (diff)
downloadkernel-qcow2-linux-cecd8d81ac5a7551d70c331b7f4ef7eb2609f336.tar.gz
kernel-qcow2-linux-cecd8d81ac5a7551d70c331b7f4ef7eb2609f336.tar.xz
kernel-qcow2-linux-cecd8d81ac5a7551d70c331b7f4ef7eb2609f336.zip
liquidio: avoid doing useless work
Avoid doing useless work by making sure that the response_list is not empty before scheduling work to process it. Signed-off-by: Prasad Kanneganti <prasad.kanneganti@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium/liquidio/request_manager.c')
-rw-r--r--drivers/net/ethernet/cavium/liquidio/request_manager.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/request_manager.c b/drivers/net/ethernet/cavium/liquidio/request_manager.c
index e07d2093b971..2766af05b89e 100644
--- a/drivers/net/ethernet/cavium/liquidio/request_manager.c
+++ b/drivers/net/ethernet/cavium/liquidio/request_manager.c
@@ -366,6 +366,7 @@ int
lio_process_iq_request_list(struct octeon_device *oct,
struct octeon_instr_queue *iq, u32 napi_budget)
{
+ struct cavium_wq *cwq = &oct->dma_comp_wq;
int reqtype;
void *buf;
u32 old = iq->flush_index;
@@ -450,6 +451,10 @@ lio_process_iq_request_list(struct octeon_device *oct,
bytes_compl);
iq->flush_index = old;
+ if (atomic_read(&oct->response_list
+ [OCTEON_ORDERED_SC_LIST].pending_req_count))
+ queue_delayed_work(cwq->wq, &cwq->wk.work, msecs_to_jiffies(1));
+
return inst_count;
}