Lines Matching refs:fl
193 static inline unsigned int fl_cap(const struct sge_fl *fl) in fl_cap() argument
195 return fl->size - 8; /* 1 descriptor = 8 buffers */ in fl_cap()
198 static inline bool fl_starving(const struct sge_fl *fl) in fl_starving() argument
200 return fl->avail - fl->pend_cred <= FL_STARVE_THRES; in fl_starving()
567 static inline void __refill_fl(struct adapter *adap, struct sge_fl *fl) in __refill_fl() argument
569 refill_fl(adap, fl, min(MAX_RX_REFILL, fl_cap(fl) - fl->avail), in __refill_fl()
1709 free_rx_bufs(q->adap, &rxq->fl, 1); in process_responses()
1718 rsd = &rxq->fl.sdesc[rxq->fl.cidx]; in process_responses()
1726 unmap_rx_buf(q->adap, &rxq->fl); in process_responses()
1746 restore_rx_bufs(&si, &rxq->fl, frags); in process_responses()
1763 if (q->offset >= 0 && rxq->fl.size - rxq->fl.avail >= 16) in process_responses()
1764 __refill_fl(q->adap, &rxq->fl); in process_responses()
1896 struct sge_fl *fl = s->egr_map[id]; in sge_rx_timer_cb() local
1901 if (fl_starving(fl)) { in sge_rx_timer_cb()
1902 rxq = container_of(fl, struct sge_eth_rxq, fl); in sge_rx_timer_cb()
1904 fl->starving++; in sge_rx_timer_cb()
1976 struct sge_fl *fl, rspq_handler_t hnd) in t4_sge_alloc_rxq() argument
2008 if (fl) { in t4_sge_alloc_rxq()
2009 fl->size = roundup(fl->size, 8); in t4_sge_alloc_rxq()
2010 fl->desc = alloc_ring(adap->pdev_dev, fl->size, sizeof(__be64), in t4_sge_alloc_rxq()
2011 sizeof(struct rx_sw_desc), &fl->addr, in t4_sge_alloc_rxq()
2012 &fl->sdesc, STAT_LEN, NUMA_NO_NODE); in t4_sge_alloc_rxq()
2013 if (!fl->desc) in t4_sge_alloc_rxq()
2016 flsz = fl->size / 8 + STAT_LEN / sizeof(struct tx_desc); in t4_sge_alloc_rxq()
2024 c.fl0addr = cpu_to_be64(fl->addr); in t4_sge_alloc_rxq()
2044 iq->offset = fl ? 0 : -1; in t4_sge_alloc_rxq()
2048 if (fl) { in t4_sge_alloc_rxq()
2049 fl->cntxt_id = ntohs(c.fl0id); in t4_sge_alloc_rxq()
2050 fl->avail = fl->pend_cred = 0; in t4_sge_alloc_rxq()
2051 fl->pidx = fl->cidx = 0; in t4_sge_alloc_rxq()
2052 fl->alloc_failed = fl->large_alloc_failed = fl->starving = 0; in t4_sge_alloc_rxq()
2053 adap->sge.egr_map[fl->cntxt_id - adap->sge.egr_start] = fl; in t4_sge_alloc_rxq()
2054 refill_fl(adap, fl, fl_cap(fl), GFP_KERNEL); in t4_sge_alloc_rxq()
2066 if (fl && fl->desc) { in t4_sge_alloc_rxq()
2067 kfree(fl->sdesc); in t4_sge_alloc_rxq()
2068 fl->sdesc = NULL; in t4_sge_alloc_rxq()
2070 fl->desc, fl->addr); in t4_sge_alloc_rxq()
2071 fl->desc = NULL; in t4_sge_alloc_rxq()
2256 struct sge_fl *fl) in free_rspq_fl() argument
2258 unsigned int fl_id = fl ? fl->cntxt_id : 0xffff; in free_rspq_fl()
2270 if (fl) { in free_rspq_fl()
2271 free_rx_bufs(adap, fl, fl->avail); in free_rspq_fl()
2272 dma_free_coherent(adap->pdev_dev, fl->size * 8 + STAT_LEN, in free_rspq_fl()
2273 fl->desc, fl->addr); in free_rspq_fl()
2274 kfree(fl->sdesc); in free_rspq_fl()
2275 fl->sdesc = NULL; in free_rspq_fl()
2276 fl->cntxt_id = 0; in free_rspq_fl()
2277 fl->desc = NULL; in free_rspq_fl()
2297 free_rspq_fl(adap, &eq->rspq, &eq->fl); in t4_free_sge_resources()
2310 free_rspq_fl(adap, &oq->rspq, &oq->fl); in t4_free_sge_resources()
2314 free_rspq_fl(adap, &oq->rspq, &oq->fl); in t4_free_sge_resources()