Lines Matching refs:rx_queue
464 efx_farch_build_rx_desc(struct efx_rx_queue *rx_queue, unsigned index) in efx_farch_build_rx_desc() argument
469 rxd = efx_rx_desc(rx_queue, index); in efx_farch_build_rx_desc()
470 rx_buf = efx_rx_buffer(rx_queue, index); in efx_farch_build_rx_desc()
474 rx_queue->efx->type->rx_buffer_padding, in efx_farch_build_rx_desc()
482 void efx_farch_rx_write(struct efx_rx_queue *rx_queue) in efx_farch_rx_write() argument
484 struct efx_nic *efx = rx_queue->efx; in efx_farch_rx_write()
488 while (rx_queue->notified_count != rx_queue->added_count) { in efx_farch_rx_write()
490 rx_queue, in efx_farch_rx_write()
491 rx_queue->notified_count & rx_queue->ptr_mask); in efx_farch_rx_write()
492 ++rx_queue->notified_count; in efx_farch_rx_write()
496 write_ptr = rx_queue->added_count & rx_queue->ptr_mask; in efx_farch_rx_write()
499 efx_rx_queue_index(rx_queue)); in efx_farch_rx_write()
502 int efx_farch_rx_probe(struct efx_rx_queue *rx_queue) in efx_farch_rx_probe() argument
504 struct efx_nic *efx = rx_queue->efx; in efx_farch_rx_probe()
507 entries = rx_queue->ptr_mask + 1; in efx_farch_rx_probe()
508 return efx_alloc_special_buffer(efx, &rx_queue->rxd, in efx_farch_rx_probe()
512 void efx_farch_rx_init(struct efx_rx_queue *rx_queue) in efx_farch_rx_init() argument
515 struct efx_nic *efx = rx_queue->efx; in efx_farch_rx_init()
523 efx_rx_queue_index(rx_queue), rx_queue->rxd.index, in efx_farch_rx_init()
524 rx_queue->rxd.index + rx_queue->rxd.entries - 1); in efx_farch_rx_init()
526 rx_queue->scatter_n = 0; in efx_farch_rx_init()
529 efx_init_special_buffer(efx, &rx_queue->rxd); in efx_farch_rx_init()
535 FRF_AZ_RX_DESCQ_BUF_BASE_ID, rx_queue->rxd.index, in efx_farch_rx_init()
537 efx_rx_queue_channel(rx_queue)->channel, in efx_farch_rx_init()
540 efx_rx_queue_index(rx_queue), in efx_farch_rx_init()
542 __ffs(rx_queue->rxd.entries), in efx_farch_rx_init()
547 efx_rx_queue_index(rx_queue)); in efx_farch_rx_init()
550 static void efx_farch_flush_rx_queue(struct efx_rx_queue *rx_queue) in efx_farch_flush_rx_queue() argument
552 struct efx_nic *efx = rx_queue->efx; in efx_farch_flush_rx_queue()
558 efx_rx_queue_index(rx_queue)); in efx_farch_flush_rx_queue()
562 void efx_farch_rx_fini(struct efx_rx_queue *rx_queue) in efx_farch_rx_fini() argument
565 struct efx_nic *efx = rx_queue->efx; in efx_farch_rx_fini()
570 efx_rx_queue_index(rx_queue)); in efx_farch_rx_fini()
573 efx_fini_special_buffer(efx, &rx_queue->rxd); in efx_farch_rx_fini()
577 void efx_farch_rx_remove(struct efx_rx_queue *rx_queue) in efx_farch_rx_remove() argument
579 efx_free_special_buffer(rx_queue->efx, &rx_queue->rxd); in efx_farch_rx_remove()
649 struct efx_rx_queue *rx_queue; in efx_farch_do_flush() local
657 efx_for_each_channel_rx_queue(rx_queue, channel) { in efx_farch_do_flush()
658 rx_queue->flush_pending = true; in efx_farch_do_flush()
679 efx_for_each_channel_rx_queue(rx_queue, channel) { in efx_farch_do_flush()
684 if (rx_queue->flush_pending) { in efx_farch_do_flush()
685 rx_queue->flush_pending = false; in efx_farch_do_flush()
688 efx_farch_flush_rx_queue(rx_queue); in efx_farch_do_flush()
719 struct efx_rx_queue *rx_queue; in efx_farch_fini_dmaq() local
732 efx_for_each_channel_rx_queue(rx_queue, channel) in efx_farch_fini_dmaq()
733 efx_farch_rx_fini(rx_queue); in efx_farch_fini_dmaq()
861 static u16 efx_farch_handle_rx_not_ok(struct efx_rx_queue *rx_queue, in efx_farch_handle_rx_not_ok() argument
864 struct efx_channel *channel = efx_rx_queue_channel(rx_queue); in efx_farch_handle_rx_not_ok()
865 struct efx_nic *efx = rx_queue->efx; in efx_farch_handle_rx_not_ok()
909 efx_rx_queue_index(rx_queue), EFX_QWORD_VAL(*event), in efx_farch_handle_rx_not_ok()
939 efx_farch_handle_rx_bad_index(struct efx_rx_queue *rx_queue, unsigned index) in efx_farch_handle_rx_bad_index() argument
941 struct efx_channel *channel = efx_rx_queue_channel(rx_queue); in efx_farch_handle_rx_bad_index()
942 struct efx_nic *efx = rx_queue->efx; in efx_farch_handle_rx_bad_index()
945 if (rx_queue->scatter_n && in efx_farch_handle_rx_bad_index()
946 index == ((rx_queue->removed_count + rx_queue->scatter_n - 1) & in efx_farch_handle_rx_bad_index()
947 rx_queue->ptr_mask)) { in efx_farch_handle_rx_bad_index()
952 expected = rx_queue->removed_count & rx_queue->ptr_mask; in efx_farch_handle_rx_bad_index()
953 dropped = (index - expected) & rx_queue->ptr_mask; in efx_farch_handle_rx_bad_index()
977 struct efx_rx_queue *rx_queue; in efx_farch_handle_rx_event() local
988 rx_queue = efx_channel_get_rx_queue(channel); in efx_farch_handle_rx_event()
991 expected_ptr = ((rx_queue->removed_count + rx_queue->scatter_n) & in efx_farch_handle_rx_event()
992 rx_queue->ptr_mask); in efx_farch_handle_rx_event()
996 unlikely(rx_ev_sop != (rx_queue->scatter_n == 0))) { in efx_farch_handle_rx_event()
998 !efx_farch_handle_rx_bad_index(rx_queue, rx_ev_desc_ptr)) in efx_farch_handle_rx_event()
1002 if (rx_queue->scatter_n) { in efx_farch_handle_rx_event()
1004 rx_queue, in efx_farch_handle_rx_event()
1005 rx_queue->removed_count & rx_queue->ptr_mask, in efx_farch_handle_rx_event()
1006 rx_queue->scatter_n, 0, EFX_RX_PKT_DISCARD); in efx_farch_handle_rx_event()
1007 rx_queue->removed_count += rx_queue->scatter_n; in efx_farch_handle_rx_event()
1008 rx_queue->scatter_n = 0; in efx_farch_handle_rx_event()
1018 rx_queue, in efx_farch_handle_rx_event()
1019 rx_queue->removed_count & rx_queue->ptr_mask, in efx_farch_handle_rx_event()
1021 ++rx_queue->removed_count; in efx_farch_handle_rx_event()
1026 ++rx_queue->scatter_n; in efx_farch_handle_rx_event()
1051 flags = efx_farch_handle_rx_not_ok(rx_queue, event); in efx_farch_handle_rx_event()
1069 efx_rx_packet(rx_queue, in efx_farch_handle_rx_event()
1070 rx_queue->removed_count & rx_queue->ptr_mask, in efx_farch_handle_rx_event()
1071 rx_queue->scatter_n, rx_ev_byte_cnt, flags); in efx_farch_handle_rx_event()
1072 rx_queue->removed_count += rx_queue->scatter_n; in efx_farch_handle_rx_event()
1073 rx_queue->scatter_n = 0; in efx_farch_handle_rx_event()
1105 struct efx_rx_queue *rx_queue; in efx_farch_handle_rx_flush_done() local
1116 rx_queue = efx_channel_get_rx_queue(channel); in efx_farch_handle_rx_flush_done()
1121 rx_queue->flush_pending = true; in efx_farch_handle_rx_flush_done()
1124 efx_farch_magic_event(efx_rx_queue_channel(rx_queue), in efx_farch_handle_rx_flush_done()
1125 EFX_CHANNEL_MAGIC_RX_DRAIN(rx_queue)); in efx_farch_handle_rx_flush_done()
1147 struct efx_rx_queue *rx_queue = in efx_farch_handle_generated_event() local
1157 } else if (rx_queue && magic == EFX_CHANNEL_MAGIC_FILL(rx_queue)) { in efx_farch_handle_generated_event()
1161 efx_fast_push_rx_descriptors(rx_queue, true); in efx_farch_handle_generated_event()
1162 } else if (rx_queue && magic == EFX_CHANNEL_MAGIC_RX_DRAIN(rx_queue)) { in efx_farch_handle_generated_event()
1405 void efx_farch_rx_defer_refill(struct efx_rx_queue *rx_queue) in efx_farch_rx_defer_refill() argument
1407 efx_farch_magic_event(efx_rx_queue_channel(rx_queue), in efx_farch_rx_defer_refill()
1408 EFX_CHANNEL_MAGIC_FILL(rx_queue)); in efx_farch_rx_defer_refill()