提交 c1550fde 编写于 作者: I Intiyaz Basha 提交者: David S. Miller

liquidio: rx/tx queue cleanup

When deleting a queue, clear its corresponding bit in the qmask, vfree its
memory, clear out the pointer that's pointing to it, and decrement the
queue count.
Signed-off-by: NIntiyaz Basha <intiyaz.basha@cavium.com>
Signed-off-by: NFelix Manlunas <fmanlunas@cavium.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d853d112
......@@ -209,6 +209,10 @@ int octeon_delete_droq(struct octeon_device *oct, u32 q_no)
droq->desc_ring, droq->desc_ring_dma);
memset(droq, 0, OCT_DROQ_SIZE);
oct->io_qmask.oq &= ~(1ULL << q_no);
vfree(oct->droq[q_no]);
oct->droq[q_no] = NULL;
oct->num_oqs--;
return 0;
}
......
......@@ -190,6 +190,10 @@ int octeon_delete_instr_queue(struct octeon_device *oct, u32 iq_no)
q_size = iq->max_count * desc_size;
lio_dma_free(oct, (u32)q_size, iq->base_addr,
iq->base_addr_dma);
oct->io_qmask.iq &= ~(1ULL << iq_no);
vfree(oct->instr_queue[iq_no]);
oct->instr_queue[iq_no] = NULL;
oct->num_iqs--;
return 0;
}
return 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册