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_hash(struct ixgbevf_ring *ring, in ixgbevf_rx_hash() argument
472 if (!(ring->netdev->features & NETIF_F_RXHASH)) in ixgbevf_rx_hash()
492 static inline void ixgbevf_rx_checksum(struct ixgbevf_ring *ring, in ixgbevf_rx_checksum() argument
499 if (!(ring->netdev->features & NETIF_F_RXCSUM)) in ixgbevf_rx_checksum()
505 ring->rx_stats.csum_err++; in ixgbevf_rx_checksum()
513 ring->rx_stats.csum_err++; in ixgbevf_rx_checksum()
1010 struct ixgbevf_ring *ring; in ixgbevf_poll() local
1014 ixgbevf_for_each_ring(ring, q_vector->tx) in ixgbevf_poll()
1015 clean_complete &= ixgbevf_clean_tx_irq(q_vector, ring); in ixgbevf_poll()
1030 ixgbevf_for_each_ring(ring, q_vector->rx) { in ixgbevf_poll()
1031 int cleaned = ixgbevf_clean_rx_irq(q_vector, ring, in ixgbevf_poll()
1082 struct ixgbevf_ring *ring; in ixgbevf_busy_poll_recv() local
1091 ixgbevf_for_each_ring(ring, q_vector->rx) { in ixgbevf_busy_poll_recv()
1092 found = ixgbevf_clean_rx_irq(q_vector, ring, 4); in ixgbevf_busy_poll_recv()
1095 ring->stats.cleaned += found; in ixgbevf_busy_poll_recv()
1097 ring->stats.misses++; in ixgbevf_busy_poll_recv()
1128 struct ixgbevf_ring *ring; in ixgbevf_configure_msix() local
1132 ixgbevf_for_each_ring(ring, q_vector->rx) in ixgbevf_configure_msix()
1133 ixgbevf_set_ivar(adapter, 0, ring->reg_idx, v_idx); in ixgbevf_configure_msix()
1135 ixgbevf_for_each_ring(ring, q_vector->tx) in ixgbevf_configure_msix()
1136 ixgbevf_set_ivar(adapter, 1, ring->reg_idx, v_idx); in ixgbevf_configure_msix()
1138 if (q_vector->tx.ring && !q_vector->rx.ring) { in ixgbevf_configure_msix()
1290 if (q_vector->rx.ring || q_vector->tx.ring) in ixgbevf_msix_clean_rings()
1301 a->rx_ring[r_idx]->next = q_vector->rx.ring; in map_vector_to_rxq()
1302 q_vector->rx.ring = a->rx_ring[r_idx]; in map_vector_to_rxq()
1311 a->tx_ring[t_idx]->next = q_vector->tx.ring; in map_vector_to_txq()
1312 q_vector->tx.ring = a->tx_ring[t_idx]; in map_vector_to_txq()
1395 if (q_vector->tx.ring && q_vector->rx.ring) { in ixgbevf_request_msix_irqs()
1399 } else if (q_vector->rx.ring) { in ixgbevf_request_msix_irqs()
1402 } else if (q_vector->tx.ring) { in ixgbevf_request_msix_irqs()
1456 q_vector->rx.ring = NULL; in ixgbevf_reset_q_vectors()
1457 q_vector->tx.ring = NULL; in ixgbevf_reset_q_vectors()
1494 if (!adapter->q_vector[i]->rx.ring && in ixgbevf_free_irq()
1495 !adapter->q_vector[i]->tx.ring) in ixgbevf_free_irq()
1545 struct ixgbevf_ring *ring) in ixgbevf_configure_tx_ring() argument
1548 u64 tdba = ring->dma; in ixgbevf_configure_tx_ring()
1551 u8 reg_idx = ring->reg_idx; in ixgbevf_configure_tx_ring()
1560 ring->count * sizeof(union ixgbe_adv_tx_desc)); in ixgbevf_configure_tx_ring()
1574 ring->tail = adapter->io_addr + IXGBE_VFTDT(reg_idx); in ixgbevf_configure_tx_ring()
1577 ring->next_to_clean = 0; in ixgbevf_configure_tx_ring()
1578 ring->next_to_use = 0; in ixgbevf_configure_tx_ring()
1590 clear_bit(__IXGBEVF_HANG_CHECK_ARMED, &ring->state); in ixgbevf_configure_tx_ring()
1651 struct ixgbevf_ring *ring) in ixgbevf_disable_rx_queue() argument
1656 u8 reg_idx = ring->reg_idx; in ixgbevf_disable_rx_queue()
1678 struct ixgbevf_ring *ring) in ixgbevf_rx_desc_queue_enable() argument
1683 u8 reg_idx = ring->reg_idx; in ixgbevf_rx_desc_queue_enable()
1734 struct ixgbevf_ring *ring) in ixgbevf_configure_rx_ring() argument
1737 u64 rdba = ring->dma; in ixgbevf_configure_rx_ring()
1739 u8 reg_idx = ring->reg_idx; in ixgbevf_configure_rx_ring()
1743 ixgbevf_disable_rx_queue(adapter, ring); in ixgbevf_configure_rx_ring()
1748 ring->count * sizeof(union ixgbe_adv_rx_desc)); in ixgbevf_configure_rx_ring()
1757 ring->tail = adapter->io_addr + IXGBE_VFRDT(reg_idx); in ixgbevf_configure_rx_ring()
1760 ring->next_to_clean = 0; in ixgbevf_configure_rx_ring()
1761 ring->next_to_use = 0; in ixgbevf_configure_rx_ring()
1762 ring->next_to_alloc = 0; in ixgbevf_configure_rx_ring()
1772 ixgbevf_rx_desc_queue_enable(adapter, ring); in ixgbevf_configure_rx_ring()
1773 ixgbevf_alloc_rx_buffers(ring, ixgbevf_desc_unused(ring)); in ixgbevf_configure_rx_ring()
2367 struct ixgbevf_ring *ring; in ixgbevf_alloc_queues() local
2371 ring = kzalloc(sizeof(*ring), GFP_KERNEL); in ixgbevf_alloc_queues()
2372 if (!ring) in ixgbevf_alloc_queues()
2375 ring->dev = &adapter->pdev->dev; in ixgbevf_alloc_queues()
2376 ring->netdev = adapter->netdev; in ixgbevf_alloc_queues()
2377 ring->count = adapter->tx_ring_count; in ixgbevf_alloc_queues()
2378 ring->queue_index = tx; in ixgbevf_alloc_queues()
2379 ring->reg_idx = tx; in ixgbevf_alloc_queues()
2381 adapter->tx_ring[tx] = ring; in ixgbevf_alloc_queues()
2385 ring = kzalloc(sizeof(*ring), GFP_KERNEL); in ixgbevf_alloc_queues()
2386 if (!ring) in ixgbevf_alloc_queues()
2389 ring->dev = &adapter->pdev->dev; in ixgbevf_alloc_queues()
2390 ring->netdev = adapter->netdev; in ixgbevf_alloc_queues()
2392 ring->count = adapter->rx_ring_count; in ixgbevf_alloc_queues()
2393 ring->queue_index = rx; in ixgbevf_alloc_queues()
2394 ring->reg_idx = rx; in ixgbevf_alloc_queues()
2396 adapter->rx_ring[rx] = ring; in ixgbevf_alloc_queues()
2805 if (qv->rx.ring || qv->tx.ring) in ixgbevf_check_hang_subtask()
3859 const struct ixgbevf_ring *ring; in ixgbevf_get_stats() local
3867 ring = adapter->rx_ring[i]; in ixgbevf_get_stats()
3869 start = u64_stats_fetch_begin_irq(&ring->syncp); in ixgbevf_get_stats()
3870 bytes = ring->stats.bytes; in ixgbevf_get_stats()
3871 packets = ring->stats.packets; in ixgbevf_get_stats()
3872 } while (u64_stats_fetch_retry_irq(&ring->syncp, start)); in ixgbevf_get_stats()
3878 ring = adapter->tx_ring[i]; in ixgbevf_get_stats()
3880 start = u64_stats_fetch_begin_irq(&ring->syncp); in ixgbevf_get_stats()
3881 bytes = ring->stats.bytes; in ixgbevf_get_stats()
3882 packets = ring->stats.packets; in ixgbevf_get_stats()
3883 } while (u64_stats_fetch_retry_irq(&ring->syncp, start)); in ixgbevf_get_stats()