Lines Matching refs:ring
218 static u64 ixgbevf_get_tx_completed(struct ixgbevf_ring *ring) in ixgbevf_get_tx_completed() argument
220 return ring->stats.packets; in ixgbevf_get_tx_completed()
223 static u32 ixgbevf_get_tx_pending(struct ixgbevf_ring *ring) in ixgbevf_get_tx_pending() argument
225 struct ixgbevf_adapter *adapter = netdev_priv(ring->netdev); in ixgbevf_get_tx_pending()
228 u32 head = IXGBE_READ_REG(hw, IXGBE_VFTDH(ring->reg_idx)); in ixgbevf_get_tx_pending()
229 u32 tail = IXGBE_READ_REG(hw, IXGBE_VFTDT(ring->reg_idx)); in ixgbevf_get_tx_pending()
233 tail - head : (tail + ring->count - head); in ixgbevf_get_tx_pending()
466 static inline void ixgbevf_rx_checksum(struct ixgbevf_ring *ring, in ixgbevf_rx_checksum() argument
473 if (!(ring->netdev->features & NETIF_F_RXCSUM)) in ixgbevf_rx_checksum()
479 ring->rx_stats.csum_err++; in ixgbevf_rx_checksum()
487 ring->rx_stats.csum_err++; in ixgbevf_rx_checksum()
1011 struct ixgbevf_ring *ring; in ixgbevf_poll() local
1015 ixgbevf_for_each_ring(ring, q_vector->tx) in ixgbevf_poll()
1016 clean_complete &= ixgbevf_clean_tx_irq(q_vector, ring); in ixgbevf_poll()
1031 ixgbevf_for_each_ring(ring, q_vector->rx) in ixgbevf_poll()
1032 clean_complete &= (ixgbevf_clean_rx_irq(q_vector, ring, in ixgbevf_poll()
1081 struct ixgbevf_ring *ring; in ixgbevf_busy_poll_recv() local
1090 ixgbevf_for_each_ring(ring, q_vector->rx) { in ixgbevf_busy_poll_recv()
1091 found = ixgbevf_clean_rx_irq(q_vector, ring, 4); in ixgbevf_busy_poll_recv()
1094 ring->stats.cleaned += found; in ixgbevf_busy_poll_recv()
1096 ring->stats.misses++; in ixgbevf_busy_poll_recv()
1127 struct ixgbevf_ring *ring; in ixgbevf_configure_msix() local
1131 ixgbevf_for_each_ring(ring, q_vector->rx) in ixgbevf_configure_msix()
1132 ixgbevf_set_ivar(adapter, 0, ring->reg_idx, v_idx); in ixgbevf_configure_msix()
1134 ixgbevf_for_each_ring(ring, q_vector->tx) in ixgbevf_configure_msix()
1135 ixgbevf_set_ivar(adapter, 1, ring->reg_idx, v_idx); in ixgbevf_configure_msix()
1137 if (q_vector->tx.ring && !q_vector->rx.ring) { in ixgbevf_configure_msix()
1289 if (q_vector->rx.ring || q_vector->tx.ring) in ixgbevf_msix_clean_rings()
1300 a->rx_ring[r_idx]->next = q_vector->rx.ring; in map_vector_to_rxq()
1301 q_vector->rx.ring = a->rx_ring[r_idx]; in map_vector_to_rxq()
1310 a->tx_ring[t_idx]->next = q_vector->tx.ring; in map_vector_to_txq()
1311 q_vector->tx.ring = a->tx_ring[t_idx]; in map_vector_to_txq()
1394 if (q_vector->tx.ring && q_vector->rx.ring) { in ixgbevf_request_msix_irqs()
1398 } else if (q_vector->rx.ring) { in ixgbevf_request_msix_irqs()
1401 } else if (q_vector->tx.ring) { in ixgbevf_request_msix_irqs()
1455 q_vector->rx.ring = NULL; in ixgbevf_reset_q_vectors()
1456 q_vector->tx.ring = NULL; in ixgbevf_reset_q_vectors()
1493 if (!adapter->q_vector[i]->rx.ring && in ixgbevf_free_irq()
1494 !adapter->q_vector[i]->tx.ring) in ixgbevf_free_irq()
1544 struct ixgbevf_ring *ring) in ixgbevf_configure_tx_ring() argument
1547 u64 tdba = ring->dma; in ixgbevf_configure_tx_ring()
1550 u8 reg_idx = ring->reg_idx; in ixgbevf_configure_tx_ring()
1559 ring->count * sizeof(union ixgbe_adv_tx_desc)); in ixgbevf_configure_tx_ring()
1573 ring->tail = adapter->io_addr + IXGBE_VFTDT(reg_idx); in ixgbevf_configure_tx_ring()
1576 ring->next_to_clean = 0; in ixgbevf_configure_tx_ring()
1577 ring->next_to_use = 0; in ixgbevf_configure_tx_ring()
1589 clear_bit(__IXGBEVF_HANG_CHECK_ARMED, &ring->state); in ixgbevf_configure_tx_ring()
1650 struct ixgbevf_ring *ring) in ixgbevf_disable_rx_queue() argument
1655 u8 reg_idx = ring->reg_idx; in ixgbevf_disable_rx_queue()
1677 struct ixgbevf_ring *ring) in ixgbevf_rx_desc_queue_enable() argument
1682 u8 reg_idx = ring->reg_idx; in ixgbevf_rx_desc_queue_enable()
1730 struct ixgbevf_ring *ring) in ixgbevf_configure_rx_ring() argument
1733 u64 rdba = ring->dma; in ixgbevf_configure_rx_ring()
1735 u8 reg_idx = ring->reg_idx; in ixgbevf_configure_rx_ring()
1739 ixgbevf_disable_rx_queue(adapter, ring); in ixgbevf_configure_rx_ring()
1744 ring->count * sizeof(union ixgbe_adv_rx_desc)); in ixgbevf_configure_rx_ring()
1753 ring->tail = adapter->io_addr + IXGBE_VFRDT(reg_idx); in ixgbevf_configure_rx_ring()
1756 ring->next_to_clean = 0; in ixgbevf_configure_rx_ring()
1757 ring->next_to_use = 0; in ixgbevf_configure_rx_ring()
1758 ring->next_to_alloc = 0; in ixgbevf_configure_rx_ring()
1768 ixgbevf_rx_desc_queue_enable(adapter, ring); in ixgbevf_configure_rx_ring()
1769 ixgbevf_alloc_rx_buffers(ring, ixgbevf_desc_unused(ring)); in ixgbevf_configure_rx_ring()
2355 struct ixgbevf_ring *ring; in ixgbevf_alloc_queues() local
2359 ring = kzalloc(sizeof(*ring), GFP_KERNEL); in ixgbevf_alloc_queues()
2360 if (!ring) in ixgbevf_alloc_queues()
2363 ring->dev = &adapter->pdev->dev; in ixgbevf_alloc_queues()
2364 ring->netdev = adapter->netdev; in ixgbevf_alloc_queues()
2365 ring->count = adapter->tx_ring_count; in ixgbevf_alloc_queues()
2366 ring->queue_index = tx; in ixgbevf_alloc_queues()
2367 ring->reg_idx = tx; in ixgbevf_alloc_queues()
2369 adapter->tx_ring[tx] = ring; in ixgbevf_alloc_queues()
2373 ring = kzalloc(sizeof(*ring), GFP_KERNEL); in ixgbevf_alloc_queues()
2374 if (!ring) in ixgbevf_alloc_queues()
2377 ring->dev = &adapter->pdev->dev; in ixgbevf_alloc_queues()
2378 ring->netdev = adapter->netdev; in ixgbevf_alloc_queues()
2380 ring->count = adapter->rx_ring_count; in ixgbevf_alloc_queues()
2381 ring->queue_index = rx; in ixgbevf_alloc_queues()
2382 ring->reg_idx = rx; in ixgbevf_alloc_queues()
2384 adapter->rx_ring[rx] = ring; in ixgbevf_alloc_queues()
2793 if (qv->rx.ring || qv->tx.ring) in ixgbevf_check_hang_subtask()
3847 const struct ixgbevf_ring *ring; in ixgbevf_get_stats() local
3855 ring = adapter->rx_ring[i]; in ixgbevf_get_stats()
3857 start = u64_stats_fetch_begin_irq(&ring->syncp); in ixgbevf_get_stats()
3858 bytes = ring->stats.bytes; in ixgbevf_get_stats()
3859 packets = ring->stats.packets; in ixgbevf_get_stats()
3860 } while (u64_stats_fetch_retry_irq(&ring->syncp, start)); in ixgbevf_get_stats()
3866 ring = adapter->tx_ring[i]; in ixgbevf_get_stats()
3868 start = u64_stats_fetch_begin_irq(&ring->syncp); in ixgbevf_get_stats()
3869 bytes = ring->stats.bytes; in ixgbevf_get_stats()
3870 packets = ring->stats.packets; in ixgbevf_get_stats()
3871 } while (u64_stats_fetch_retry_irq(&ring->syncp, start)); in ixgbevf_get_stats()