Lines Matching refs:ntc
964 u32 ntc, ntu; in hns3_tx_spare_space() local
969 ntc = smp_load_acquire(&tx_spare->last_to_clean); in hns3_tx_spare_space()
972 if (ntc > ntu) in hns3_tx_spare_space()
973 return ntc - ntu - 1; in hns3_tx_spare_space()
978 return max(ntc, tx_spare->len - ntu) - 1; in hns3_tx_spare_space()
1131 u32 ntc = tx_spare->next_to_clean; in hns3_tx_spare_reclaim_cb() local
1140 ntc = 0; in hns3_tx_spare_reclaim_cb()
1151 dma_addr_t dma = tx_spare->dma + ntc; in hns3_tx_spare_reclaim_cb()
1156 struct sg_table *sgt = tx_spare->buf + ntc; in hns3_tx_spare_reclaim_cb()
3570 int ntc = ring->next_to_clean; in hns3_nic_reclaim_desc() local
3575 while (ltu != ntc) { in hns3_nic_reclaim_desc()
3576 desc = &ring->desc[ntc]; in hns3_nic_reclaim_desc()
3582 desc_cb = &ring->desc_cb[ntc]; in hns3_nic_reclaim_desc()
3592 hns3_free_buffer_detach(ring, ntc, budget); in hns3_nic_reclaim_desc()
3594 if (++ntc == ring->desc_num) in hns3_nic_reclaim_desc()
3595 ntc = 0; in hns3_nic_reclaim_desc()
3598 prefetch(&ring->desc_cb[ntc]); in hns3_nic_reclaim_desc()
3608 smp_store_release(&ring->next_to_clean, ntc); in hns3_nic_reclaim_desc()
3655 int ntc = ring->next_to_clean; in hns3_desc_unused() local
3658 if (unlikely(ntc == ntu && !ring->desc_cb[ntc].refill)) in hns3_desc_unused()
3661 return ((ntc >= ntu) ? 0 : ring->desc_num) + ntc - ntu; in hns3_desc_unused()