Lines Matching refs:ntc
973 u32 ntc, ntu; in hns3_tx_spare_space() local
978 ntc = smp_load_acquire(&tx_spare->last_to_clean); in hns3_tx_spare_space()
981 if (ntc > ntu) in hns3_tx_spare_space()
982 return ntc - ntu - 1; in hns3_tx_spare_space()
987 return max(ntc, tx_spare->len - ntu) - 1; in hns3_tx_spare_space()
1143 u32 ntc = tx_spare->next_to_clean; in hns3_tx_spare_reclaim_cb() local
1152 ntc = 0; in hns3_tx_spare_reclaim_cb()
1163 dma_addr_t dma = tx_spare->dma + ntc; in hns3_tx_spare_reclaim_cb()
1168 struct sg_table *sgt = tx_spare->buf + ntc; in hns3_tx_spare_reclaim_cb()
3594 int ntc = ring->next_to_clean; in hns3_nic_reclaim_desc() local
3599 while (ltu != ntc) { in hns3_nic_reclaim_desc()
3600 desc = &ring->desc[ntc]; in hns3_nic_reclaim_desc()
3606 desc_cb = &ring->desc_cb[ntc]; in hns3_nic_reclaim_desc()
3616 hns3_free_buffer_detach(ring, ntc, budget); in hns3_nic_reclaim_desc()
3618 if (++ntc == ring->desc_num) in hns3_nic_reclaim_desc()
3619 ntc = 0; in hns3_nic_reclaim_desc()
3622 prefetch(&ring->desc_cb[ntc]); in hns3_nic_reclaim_desc()
3632 smp_store_release(&ring->next_to_clean, ntc); in hns3_nic_reclaim_desc()
3679 int ntc = ring->next_to_clean; in hns3_desc_unused() local
3682 if (unlikely(ntc == ntu && !ring->desc_cb[ntc].refill)) in hns3_desc_unused()
3685 return ((ntc >= ntu) ? 0 : ring->desc_num) + ntc - ntu; in hns3_desc_unused()