qcacmn: Modify refill buff pool enqueue to use max_bufq_len
Currently Refill buffer pool enqueue is using POOL_SIZE macro, but there is possibility of dynamically configuring max pool size less than that. So use max_bufq_len which will be configured dynamically during refill pool init instead of POOL_SIZE macro. Change-Id: I610b5dff71861254aa8b6d30e2c562bd7316e120 CRs-Fixed: 3575599
This commit is contained in:

committed by
Rahul Choudhary

parent
adb0ec3b16
commit
a671ff2ee1
@@ -138,7 +138,7 @@ void dp_rx_refill_buff_pool_enqueue(struct dp_soc *soc)
|
||||
if (tail > head)
|
||||
total_num_refill = (tail - head - 1);
|
||||
else
|
||||
total_num_refill = (DP_RX_REFILL_BUFF_POOL_SIZE - head +
|
||||
total_num_refill = (buff_pool->max_bufq_len - head +
|
||||
tail - 1);
|
||||
|
||||
while (total_num_refill) {
|
||||
@@ -171,7 +171,7 @@ void dp_rx_refill_buff_pool_enqueue(struct dp_soc *soc)
|
||||
rx_desc_pool->buf_size);
|
||||
|
||||
buff_pool->buf_elem[head++] = nbuf;
|
||||
head &= (DP_RX_REFILL_BUFF_POOL_SIZE - 1);
|
||||
head &= (buff_pool->max_bufq_len - 1);
|
||||
count++;
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ static inline qdf_nbuf_t dp_rx_refill_buff_pool_dequeue_nbuf(struct dp_soc *soc)
|
||||
return NULL;
|
||||
|
||||
nbuf = buff_pool->buf_elem[tail++];
|
||||
tail &= (DP_RX_REFILL_BUFF_POOL_SIZE - 1);
|
||||
tail &= (buff_pool->max_bufq_len - 1);
|
||||
buff_pool->tail = tail;
|
||||
|
||||
return nbuf;
|
||||
|
Reference in New Issue
Block a user