mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-02 17:16:45 +00:00
cxgb4/cxgb4vf: Use fl capacity to check if fl needs to be replenished
Use freelist capacity instead of freelist size while checking, if freelist needs to be refilled Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d93e4093fb
commit
da08e4259f
@ -2226,7 +2226,7 @@ static int process_responses(struct sge_rspq *q, int budget)
|
||||
budget_left--;
|
||||
}
|
||||
|
||||
if (q->offset >= 0 && rxq->fl.size - rxq->fl.avail >= 16)
|
||||
if (q->offset >= 0 && fl_cap(&rxq->fl) - rxq->fl.avail >= 16)
|
||||
__refill_fl(q->adap, &rxq->fl);
|
||||
return budget - budget_left;
|
||||
}
|
||||
|
@ -1864,7 +1864,7 @@ static int process_responses(struct sge_rspq *rspq, int budget)
|
||||
* for new buffer pointers, refill the Free List.
|
||||
*/
|
||||
if (rspq->offset >= 0 &&
|
||||
rxq->fl.size - rxq->fl.avail >= 2*FL_PER_EQ_UNIT)
|
||||
fl_cap(&rxq->fl) - rxq->fl.avail >= 2*FL_PER_EQ_UNIT)
|
||||
__refill_fl(rspq->adapter, &rxq->fl);
|
||||
return budget - budget_left;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user