Lines Matching refs:rspq
1570 struct adapter *adapter = rxq->rspq.adapter; in do_gro()
1576 skb = napi_get_frags(&rxq->rspq.napi); in do_gro()
1588 skb_record_rx_queue(skb, rxq->rspq.idx); in do_gro()
1596 ret = napi_gro_frags(&rxq->rspq.napi); in do_gro()
1614 int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp, in t4vf_ethrx_handler() argument
1620 (rspq->netdev->features & NETIF_F_RXCSUM); in t4vf_ethrx_handler()
1621 struct sge_eth_rxq *rxq = container_of(rspq, struct sge_eth_rxq, rspq); in t4vf_ethrx_handler()
1622 struct adapter *adapter = rspq->adapter; in t4vf_ethrx_handler()
1631 (rspq->netdev->features & NETIF_F_GRO) && csum_ok && in t4vf_ethrx_handler()
1647 skb->protocol = eth_type_trans(skb, rspq->netdev); in t4vf_ethrx_handler()
1648 skb_record_rx_queue(skb, rspq->idx); in t4vf_ethrx_handler()
1686 const struct sge_rspq *rspq) in is_new_response() argument
1688 return ((rc->type_gen >> RSPD_GEN_S) & 0x1) == rspq->gen; in is_new_response()
1734 static inline void rspq_next(struct sge_rspq *rspq) in rspq_next() argument
1736 rspq->cur_desc = (void *)rspq->cur_desc + rspq->iqe_len; in rspq_next()
1737 if (unlikely(++rspq->cidx == rspq->size)) { in rspq_next()
1738 rspq->cidx = 0; in rspq_next()
1739 rspq->gen ^= 1; in rspq_next()
1740 rspq->cur_desc = rspq->desc; in rspq_next()
1757 static int process_responses(struct sge_rspq *rspq, int budget) in process_responses() argument
1759 struct sge_eth_rxq *rxq = container_of(rspq, struct sge_eth_rxq, rspq); in process_responses()
1760 struct adapter *adapter = rspq->adapter; in process_responses()
1768 rc = (void *)rspq->cur_desc + (rspq->iqe_len - sizeof(*rc)); in process_responses()
1769 if (!is_new_response(rc, rspq)) in process_responses()
1795 if (likely(rspq->offset > 0)) { in process_responses()
1796 free_rx_bufs(rspq->adapter, &rxq->fl, in process_responses()
1798 rspq->offset = 0; in process_responses()
1813 fp->offset = rspq->offset; in process_responses()
1818 unmap_rx_buf(rspq->adapter, &rxq->fl); in process_responses()
1827 dma_sync_single_for_cpu(rspq->adapter->pdev_dev, in process_responses()
1838 ret = rspq->handler(rspq, rspq->cur_desc, &gl); in process_responses()
1840 rspq->offset += ALIGN(fp->size, s->fl_align); in process_responses()
1844 ret = rspq->handler(rspq, rspq->cur_desc, NULL); in process_responses()
1857 rspq->next_intr_params = in process_responses()
1862 rspq_next(rspq); in process_responses()
1871 if (rspq->offset >= 0 && in process_responses()
1873 __refill_fl(rspq->adapter, &rxq->fl); in process_responses()
1891 struct sge_rspq *rspq = container_of(napi, struct sge_rspq, napi); in napi_rx_handler() local
1892 int work_done = process_responses(rspq, budget); in napi_rx_handler()
1897 intr_params = rspq->next_intr_params; in napi_rx_handler()
1898 rspq->next_intr_params = rspq->intr_params; in napi_rx_handler()
1903 rspq->unhandled_irqs++; in napi_rx_handler()
1909 if (unlikely(!rspq->bar2_addr)) { in napi_rx_handler()
1910 t4_write_reg(rspq->adapter, in napi_rx_handler()
1912 val | INGRESSQID_V((u32)rspq->cntxt_id)); in napi_rx_handler()
1914 writel(val | INGRESSQID_V(rspq->bar2_qid), in napi_rx_handler()
1915 rspq->bar2_addr + SGE_UDB_GTS); in napi_rx_handler()
1927 struct sge_rspq *rspq = cookie; in t4vf_sge_intr_msix() local
1929 napi_schedule(&rspq->napi); in t4vf_sge_intr_msix()
1948 struct sge_rspq *rspq; in process_intrq() local
1986 rspq = s->ingr_map[iq_idx]; in process_intrq()
1987 if (unlikely(rspq == NULL)) { in process_intrq()
1992 if (unlikely(rspq->abs_id != qid)) { in process_intrq()
1995 qid, rspq->abs_id); in process_intrq()
2004 napi_schedule(&rspq->napi); in process_intrq()
2100 if (napi_reschedule(&rxq->rspq.napi)) in sge_rx_timer_cb()
2204 int t4vf_sge_alloc_rxq(struct adapter *adapter, struct sge_rspq *rspq, in t4vf_sge_alloc_rxq() argument
2223 rspq != &adapter->sge.intrq) { in t4vf_sge_alloc_rxq()
2235 rspq->size = roundup(rspq->size, 16); in t4vf_sge_alloc_rxq()
2236 rspq->desc = alloc_ring(adapter->pdev_dev, rspq->size, rspq->iqe_len, in t4vf_sge_alloc_rxq()
2237 0, &rspq->phys_addr, NULL, 0); in t4vf_sge_alloc_rxq()
2238 if (!rspq->desc) in t4vf_sge_alloc_rxq()
2267 FW_IQ_CMD_IQINTCNTTHRESH_V(rspq->pktcnt_idx) | in t4vf_sge_alloc_rxq()
2268 FW_IQ_CMD_IQESIZE_V(ilog2(rspq->iqe_len) - 4)); in t4vf_sge_alloc_rxq()
2269 cmd.iqsize = cpu_to_be16(rspq->size); in t4vf_sge_alloc_rxq()
2270 cmd.iqaddr = cpu_to_be64(rspq->phys_addr); in t4vf_sge_alloc_rxq()
2342 netif_napi_add(dev, &rspq->napi, napi_rx_handler, 64); in t4vf_sge_alloc_rxq()
2343 rspq->cur_desc = rspq->desc; in t4vf_sge_alloc_rxq()
2344 rspq->cidx = 0; in t4vf_sge_alloc_rxq()
2345 rspq->gen = 1; in t4vf_sge_alloc_rxq()
2346 rspq->next_intr_params = rspq->intr_params; in t4vf_sge_alloc_rxq()
2347 rspq->cntxt_id = be16_to_cpu(rpl.iqid); in t4vf_sge_alloc_rxq()
2348 rspq->bar2_addr = bar2_address(adapter, in t4vf_sge_alloc_rxq()
2349 rspq->cntxt_id, in t4vf_sge_alloc_rxq()
2351 &rspq->bar2_qid); in t4vf_sge_alloc_rxq()
2352 rspq->abs_id = be16_to_cpu(rpl.physiqid); in t4vf_sge_alloc_rxq()
2353 rspq->size--; /* subtract status entry */ in t4vf_sge_alloc_rxq()
2354 rspq->adapter = adapter; in t4vf_sge_alloc_rxq()
2355 rspq->netdev = dev; in t4vf_sge_alloc_rxq()
2356 rspq->handler = hnd; in t4vf_sge_alloc_rxq()
2359 rspq->offset = fl ? 0 : -1; in t4vf_sge_alloc_rxq()
2389 if (rspq->desc) { in t4vf_sge_alloc_rxq()
2390 dma_free_coherent(adapter->pdev_dev, rspq->size * rspq->iqe_len, in t4vf_sge_alloc_rxq()
2391 rspq->desc, rspq->phys_addr); in t4vf_sge_alloc_rxq()
2392 rspq->desc = NULL; in t4vf_sge_alloc_rxq()
2530 static void free_rspq_fl(struct adapter *adapter, struct sge_rspq *rspq, in free_rspq_fl() argument
2537 rspq->cntxt_id, flid, 0xffff); in free_rspq_fl()
2538 dma_free_coherent(adapter->pdev_dev, (rspq->size + 1) * rspq->iqe_len, in free_rspq_fl()
2539 rspq->desc, rspq->phys_addr); in free_rspq_fl()
2540 netif_napi_del(&rspq->napi); in free_rspq_fl()
2541 rspq->netdev = NULL; in free_rspq_fl()
2542 rspq->cntxt_id = 0; in free_rspq_fl()
2543 rspq->abs_id = 0; in free_rspq_fl()
2544 rspq->desc = NULL; in free_rspq_fl()
2574 if (rxq->rspq.desc) in t4vf_free_sge_resources()
2575 free_rspq_fl(adapter, &rxq->rspq, &rxq->fl); in t4vf_free_sge_resources()