liquidio: avoid doing useless work
[linux.git] / drivers / net / ethernet / cavium / liquidio / request_manager.c
index e07d2093b971326f25ea11af72525af9e9edb778..2766af05b89efcbc903f2b60b94b7ef21ad389f8 100644 (file)
@@ -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;
 }
 
This page took 0.02484 seconds and 4 git commands to generate.