Lines Matching refs:rx_ring

15 static struct xdp_buff **ice_xdp_buf(struct ice_rx_ring *rx_ring, u32 idx)  in ice_xdp_buf()  argument
17 return &rx_ring->xdp_buf[idx]; in ice_xdp_buf()
75 ice_qvec_dis_irq(struct ice_vsi *vsi, struct ice_rx_ring *rx_ring, in ice_qvec_dis_irq() argument
87 reg = rx_ring->reg_idx; in ice_qvec_dis_irq()
113 struct ice_rx_ring *rx_ring; in ice_qvec_cfg_msix() local
121 ice_for_each_rx_ring(rx_ring, q_vector->rx) in ice_qvec_cfg_msix()
122 ice_cfg_rxq_interrupt(vsi, rx_ring->reg_idx, reg_idx, in ice_qvec_cfg_msix()
155 struct ice_rx_ring *rx_ring; in ice_qp_dis() local
163 rx_ring = vsi->rx_rings[q_idx]; in ice_qp_dis()
164 q_vector = rx_ring->q_vector; in ice_qp_dis()
174 ice_qvec_dis_irq(vsi, rx_ring, q_vector); in ice_qp_dis()
213 struct ice_rx_ring *rx_ring; in ice_qp_ena() local
228 rx_ring = vsi->rx_rings[q_idx]; in ice_qp_ena()
229 q_vector = rx_ring->q_vector; in ice_qp_ena()
247 err = ice_vsi_cfg_rxq(rx_ring); in ice_qp_ena()
371 bool ice_alloc_rx_bufs_zc(struct ice_rx_ring *rx_ring, u16 count) in ice_alloc_rx_bufs_zc() argument
374 u16 ntu = rx_ring->next_to_use; in ice_alloc_rx_bufs_zc()
379 rx_desc = ICE_RX_DESC(rx_ring, ntu); in ice_alloc_rx_bufs_zc()
380 xdp = ice_xdp_buf(rx_ring, ntu); in ice_alloc_rx_bufs_zc()
382 nb_buffs = min_t(u16, count, rx_ring->count - ntu); in ice_alloc_rx_bufs_zc()
383 nb_buffs = xsk_buff_alloc_batch(rx_ring->xsk_pool, xdp, nb_buffs); in ice_alloc_rx_bufs_zc()
398 if (ntu == rx_ring->count) in ice_alloc_rx_bufs_zc()
401 ice_release_rx_desc(rx_ring, ntu); in ice_alloc_rx_bufs_zc()
410 static void ice_bump_ntc(struct ice_rx_ring *rx_ring) in ice_bump_ntc() argument
412 int ntc = rx_ring->next_to_clean + 1; in ice_bump_ntc()
414 ntc = (ntc < rx_ring->count) ? ntc : 0; in ice_bump_ntc()
415 rx_ring->next_to_clean = ntc; in ice_bump_ntc()
416 prefetch(ICE_RX_DESC(rx_ring, ntc)); in ice_bump_ntc()
429 ice_construct_skb_zc(struct ice_rx_ring *rx_ring, struct xdp_buff *xdp) in ice_construct_skb_zc() argument
436 skb = __napi_alloc_skb(&rx_ring->q_vector->napi, datasize_hard, in ice_construct_skb_zc()
460 ice_run_xdp_zc(struct ice_rx_ring *rx_ring, struct xdp_buff *xdp, in ice_run_xdp_zc() argument
469 err = xdp_do_redirect(rx_ring->netdev, xdp, xdp_prog); in ice_run_xdp_zc()
488 trace_xdp_exception(rx_ring->netdev, xdp_prog, act); in ice_run_xdp_zc()
505 int ice_clean_rx_irq_zc(struct ice_rx_ring *rx_ring, int budget) in ice_clean_rx_irq_zc() argument
516 xdp_prog = READ_ONCE(rx_ring->xdp_prog); in ice_clean_rx_irq_zc()
517 xdp_ring = rx_ring->xdp_ring; in ice_clean_rx_irq_zc()
528 rx_desc = ICE_RX_DESC(rx_ring, rx_ring->next_to_clean); in ice_clean_rx_irq_zc()
540 xdp = *ice_xdp_buf(rx_ring, rx_ring->next_to_clean); in ice_clean_rx_irq_zc()
553 xsk_buff_dma_sync_for_cpu(xdp, rx_ring->xsk_pool); in ice_clean_rx_irq_zc()
555 xdp_res = ice_run_xdp_zc(rx_ring, xdp, xdp_prog, xdp_ring); in ice_clean_rx_irq_zc()
565 ice_bump_ntc(rx_ring); in ice_clean_rx_irq_zc()
570 skb = ice_construct_skb_zc(rx_ring, xdp); in ice_clean_rx_irq_zc()
572 rx_ring->rx_stats.alloc_buf_failed++; in ice_clean_rx_irq_zc()
576 ice_bump_ntc(rx_ring); in ice_clean_rx_irq_zc()
593 ice_process_skb_fields(rx_ring, rx_desc, skb, rx_ptype); in ice_clean_rx_irq_zc()
594 ice_receive_skb(rx_ring, skb, vlan_tag); in ice_clean_rx_irq_zc()
597 failure = !ice_alloc_rx_bufs_zc(rx_ring, ICE_DESC_UNUSED(rx_ring)); in ice_clean_rx_irq_zc()
600 ice_update_rx_ring_stats(rx_ring, total_rx_packets, total_rx_bytes); in ice_clean_rx_irq_zc()
602 if (xsk_uses_need_wakeup(rx_ring->xsk_pool)) { in ice_clean_rx_irq_zc()
603 if (failure || rx_ring->next_to_clean == rx_ring->next_to_use) in ice_clean_rx_irq_zc()
604 xsk_set_rx_need_wakeup(rx_ring->xsk_pool); in ice_clean_rx_irq_zc()
606 xsk_clear_rx_need_wakeup(rx_ring->xsk_pool); in ice_clean_rx_irq_zc()
811 void ice_xsk_clean_rx_ring(struct ice_rx_ring *rx_ring) in ice_xsk_clean_rx_ring() argument
813 u16 count_mask = rx_ring->count - 1; in ice_xsk_clean_rx_ring()
814 u16 ntc = rx_ring->next_to_clean; in ice_xsk_clean_rx_ring()
815 u16 ntu = rx_ring->next_to_use; in ice_xsk_clean_rx_ring()
818 struct xdp_buff *xdp = *ice_xdp_buf(rx_ring, ntc); in ice_xsk_clean_rx_ring()