Lines Matching defs:fl

215  *	@fl: the FL
221 static inline unsigned int fl_cap(const struct sge_fl *fl)
223 return fl->size - 8; /* 1 descriptor = 8 buffers */
229 * @fl: the Free List
236 const struct sge_fl *fl)
240 return fl->avail - fl->pend_cred <= s->fl_starve_thres;
632 static inline void __refill_fl(struct adapter *adap, struct sge_fl *fl)
634 refill_fl(adap, fl, min(MAX_RX_REFILL, fl_cap(fl) - fl->avail),
3902 free_rx_bufs(q->adap, &rxq->fl, 1);
3911 rsd = &rxq->fl.sdesc[rxq->fl.cidx];
3919 unmap_rx_buf(q->adap, &rxq->fl);
3941 restore_rx_bufs(&si, &rxq->fl, frags);
3958 if (q->offset >= 0 && fl_cap(&rxq->fl) - rxq->fl.avail >= 16)
3959 __refill_fl(q->adap, &rxq->fl);
4243 struct sge_fl *fl = s->egr_map[id];
4248 if (fl_starving(adap, fl)) {
4249 rxq = container_of(fl, struct sge_eth_rxq, fl);
4251 fl->starving++;
4361 struct sge_fl *fl, rspq_handler_t hnd,
4402 if (fl) {
4413 if (fl->size < s->fl_starve_thres - 1 + 2 * 8)
4414 fl->size = s->fl_starve_thres - 1 + 2 * 8;
4415 fl->size = roundup(fl->size, 8);
4416 fl->desc = alloc_ring(adap->pdev_dev, fl->size, sizeof(__be64),
4417 sizeof(struct rx_sw_desc), &fl->addr,
4418 &fl->sdesc, s->stat_len,
4420 if (!fl->desc)
4423 flsz = fl->size / 8 + s->stat_len / sizeof(struct tx_desc);
4449 c.fl0addr = cpu_to_be64(fl->addr);
4476 iq->offset = fl ? 0 : -1;
4480 if (fl) {
4481 fl->cntxt_id = ntohs(c.fl0id);
4482 fl->avail = fl->pend_cred = 0;
4483 fl->pidx = fl->cidx = 0;
4484 fl->alloc_failed = fl->large_alloc_failed = fl->starving = 0;
4485 adap->sge.egr_map[fl->cntxt_id - adap->sge.egr_start] = fl;
4490 fl->bar2_addr = bar2_address(adap,
4491 fl->cntxt_id,
4493 &fl->bar2_qid);
4494 refill_fl(adap, fl, fl_cap(fl), GFP_KERNEL);
4542 if (fl && fl->desc) {
4543 kfree(fl->sdesc);
4544 fl->sdesc = NULL;
4546 fl->desc, fl->addr);
4547 fl->desc = NULL;
4851 struct sge_fl *fl)
4854 unsigned int fl_id = fl ? fl->cntxt_id : 0xffff;
4866 if (fl) {
4867 free_rx_bufs(adap, fl, fl->avail);
4868 dma_free_coherent(adap->pdev_dev, fl->size * 8 + s->stat_len,
4869 fl->desc, fl->addr);
4870 kfree(fl->sdesc);
4871 fl->sdesc = NULL;
4872 fl->cntxt_id = 0;
4873 fl->desc = NULL;
4890 q->fl.size ? &q->fl : NULL);
4923 eq->fl.size ? eq->fl.cntxt_id : 0xffff,
4932 eq->fl.size ? &eq->fl : NULL);