Lines Matching refs:ring_size

206 	if (index + num >= gq->ring_size)  in rswitch_next_queue_index()
207 index = (index + num) % gq->ring_size; in rswitch_next_queue_index()
219 return gq->ring_size - gq->dirty + gq->cur; in rswitch_get_num_cur_queues()
238 index = (i + start_index) % gq->ring_size; in rswitch_gwca_queue_alloc_skb()
251 index = (i + start_index) % gq->ring_size; in rswitch_gwca_queue_alloc_skb()
267 (gq->ring_size + 1), gq->rx_ring, gq->ring_dma); in rswitch_gwca_queue_free()
270 for (i = 0; i < gq->ring_size; i++) in rswitch_gwca_queue_free()
275 (gq->ring_size + 1), gq->tx_ring, gq->ring_dma); in rswitch_gwca_queue_free()
288 sizeof(struct rswitch_ts_desc) * (gq->ring_size + 1), in rswitch_gwca_ts_queue_free()
296 bool dir_tx, int ring_size) in rswitch_gwca_queue_alloc() argument
301 gq->ring_size = ring_size; in rswitch_gwca_queue_alloc()
304 gq->skbs = kcalloc(gq->ring_size, sizeof(*gq->skbs), GFP_KERNEL); in rswitch_gwca_queue_alloc()
309 rswitch_gwca_queue_alloc_skb(gq, 0, gq->ring_size); in rswitch_gwca_queue_alloc()
313 (gq->ring_size + 1), &gq->ring_dma, GFP_KERNEL); in rswitch_gwca_queue_alloc()
317 (gq->ring_size + 1), &gq->ring_dma, GFP_KERNEL); in rswitch_gwca_queue_alloc()
353 int ring_size = sizeof(struct rswitch_ext_desc) * gq->ring_size; in rswitch_gwca_queue_format() local
359 memset(gq->tx_ring, 0, ring_size); in rswitch_gwca_queue_format()
360 for (i = 0, desc = gq->tx_ring; i < gq->ring_size; i++, desc++) { in rswitch_gwca_queue_format()
407 index = (i + start_index) % gq->ring_size; in rswitch_gwca_ts_queue_fill()
423 index = (i + start_index) % gq->ring_size; in rswitch_gwca_queue_ext_ts_fill()
447 index = (i + start_index) % gq->ring_size; in rswitch_gwca_queue_ext_ts_fill()
462 int ring_size = sizeof(struct rswitch_ext_ts_desc) * gq->ring_size; in rswitch_gwca_queue_ext_ts_format() local
467 memset(gq->rx_ring, 0, ring_size); in rswitch_gwca_queue_ext_ts_format()
468 err = rswitch_gwca_queue_ext_ts_fill(ndev, gq, 0, gq->ring_size); in rswitch_gwca_queue_ext_ts_format()
472 desc = &gq->rx_ring[gq->ring_size]; /* Last */ in rswitch_gwca_queue_ext_ts_format()
519 gq->ring_size = TS_RING_SIZE; in rswitch_gwca_ts_queue_alloc()
522 (gq->ring_size + 1), &gq->ring_dma, GFP_KERNEL); in rswitch_gwca_ts_queue_alloc()
528 desc = &gq->ts_ring[gq->ring_size]; in rswitch_gwca_ts_queue_alloc()
709 boguscnt = min_t(int, gq->ring_size, *quota); in rswitch_rx()
1508 if (rswitch_get_num_cur_queues(gq) >= gq->ring_size - 1) { in rswitch_start_xmit()