• Home
  • Raw
  • Download

Lines Matching refs:tx_queue

779 	struct efx_tx_queue *tx_queue;  in efx_ef10_link_piobufs()  local
816 efx_for_each_channel_tx_queue(tx_queue, channel) { in efx_ef10_link_piobufs()
822 tx_queue->channel->channel - 1) * in efx_ef10_link_piobufs()
832 if (tx_queue->queue == nic_data->pio_write_vi_base) { in efx_ef10_link_piobufs()
841 tx_queue->queue); in efx_ef10_link_piobufs()
853 tx_queue->queue, index, rc); in efx_ef10_link_piobufs()
854 tx_queue->piobuf = NULL; in efx_ef10_link_piobufs()
856 tx_queue->piobuf = in efx_ef10_link_piobufs()
859 tx_queue->piobuf_offset = offset; in efx_ef10_link_piobufs()
862 tx_queue->queue, index, in efx_ef10_link_piobufs()
863 tx_queue->piobuf_offset, in efx_ef10_link_piobufs()
864 tx_queue->piobuf); in efx_ef10_link_piobufs()
889 struct efx_tx_queue *tx_queue; in efx_ef10_forget_old_piobufs() local
893 efx_for_each_channel_tx_queue(tx_queue, channel) in efx_ef10_forget_old_piobufs()
894 tx_queue->piobuf = NULL; in efx_ef10_forget_old_piobufs()
2207 static int efx_ef10_tx_probe(struct efx_tx_queue *tx_queue) in efx_ef10_tx_probe() argument
2211 tx_queue->type = tx_queue->label & 3; in efx_ef10_tx_probe()
2212 return efx_nic_alloc_buffer(tx_queue->efx, &tx_queue->txd.buf, in efx_ef10_tx_probe()
2213 (tx_queue->ptr_mask + 1) * in efx_ef10_tx_probe()
2219 static inline void efx_ef10_push_tx_desc(struct efx_tx_queue *tx_queue, in efx_ef10_push_tx_desc() argument
2225 write_ptr = tx_queue->write_count & tx_queue->ptr_mask; in efx_ef10_push_tx_desc()
2228 efx_writeo_page(tx_queue->efx, &reg, in efx_ef10_push_tx_desc()
2229 ER_DZ_TX_DESC_UPD, tx_queue->queue); in efx_ef10_push_tx_desc()
2234 int efx_ef10_tx_tso_desc(struct efx_tx_queue *tx_queue, struct sk_buff *skb, in efx_ef10_tx_tso_desc() argument
2246 EFX_WARN_ON_ONCE_PARANOID(tx_queue->tso_version != 2); in efx_ef10_tx_tso_desc()
2256 if (!tx_queue->tso_encap) in efx_ef10_tx_tso_desc()
2294 buffer = efx_tx_queue_get_insert_buffer(tx_queue); in efx_ef10_tx_tso_desc()
2307 ++tx_queue->insert_count; in efx_ef10_tx_tso_desc()
2309 buffer = efx_tx_queue_get_insert_buffer(tx_queue); in efx_ef10_tx_tso_desc()
2322 ++tx_queue->insert_count; in efx_ef10_tx_tso_desc()
2341 static void efx_ef10_tx_init(struct efx_tx_queue *tx_queue) in efx_ef10_tx_init() argument
2343 bool csum_offload = tx_queue->type & EFX_TXQ_TYPE_OUTER_CSUM; in efx_ef10_tx_init()
2344 bool inner_csum = tx_queue->type & EFX_TXQ_TYPE_INNER_CSUM; in efx_ef10_tx_init()
2345 struct efx_channel *channel = tx_queue->channel; in efx_ef10_tx_init()
2346 struct efx_nic *efx = tx_queue->efx; in efx_ef10_tx_init()
2358 tx_queue->timestamping = false; in efx_ef10_tx_init()
2372 !tx_queue->timestamping && !tx_queue->xdp_tx) { in efx_ef10_tx_init()
2373 tx_queue->tso_version = 2; in efx_ef10_tx_init()
2378 tx_queue->tso_version = 1; in efx_ef10_tx_init()
2381 rc = efx_mcdi_tx_init(tx_queue); in efx_ef10_tx_init()
2391 tx_queue->buffer[0].flags = EFX_TX_BUF_OPTION; in efx_ef10_tx_init()
2392 tx_queue->insert_count = 1; in efx_ef10_tx_init()
2393 txd = efx_tx_desc(tx_queue, 0); in efx_ef10_tx_init()
2399 ESF_DZ_TX_OPTION_IP_CSUM, csum_offload && tx_queue->tso_version != 2, in efx_ef10_tx_init()
2401 ESF_DZ_TX_OPTION_INNER_IP_CSUM, inner_csum && tx_queue->tso_version != 2, in efx_ef10_tx_init()
2402 ESF_DZ_TX_TIMESTAMP, tx_queue->timestamping); in efx_ef10_tx_init()
2403 tx_queue->write_count = 1; in efx_ef10_tx_init()
2405 if (tx_queue->tso_version == 2 && efx_has_cap(efx, TX_TSO_V2_ENCAP)) in efx_ef10_tx_init()
2406 tx_queue->tso_encap = true; in efx_ef10_tx_init()
2409 efx_ef10_push_tx_desc(tx_queue, txd); in efx_ef10_tx_init()
2415 tx_queue->queue); in efx_ef10_tx_init()
2419 static inline void efx_ef10_notify_tx_desc(struct efx_tx_queue *tx_queue) in efx_ef10_notify_tx_desc() argument
2424 write_ptr = tx_queue->write_count & tx_queue->ptr_mask; in efx_ef10_notify_tx_desc()
2426 efx_writed_page(tx_queue->efx, &reg, in efx_ef10_notify_tx_desc()
2427 ER_DZ_TX_DESC_UPD_DWORD, tx_queue->queue); in efx_ef10_notify_tx_desc()
2432 static unsigned int efx_ef10_tx_limit_len(struct efx_tx_queue *tx_queue, in efx_ef10_tx_limit_len() argument
2449 static void efx_ef10_tx_write(struct efx_tx_queue *tx_queue) in efx_ef10_tx_write() argument
2451 unsigned int old_write_count = tx_queue->write_count; in efx_ef10_tx_write()
2456 tx_queue->xmit_pending = false; in efx_ef10_tx_write()
2457 if (unlikely(tx_queue->write_count == tx_queue->insert_count)) in efx_ef10_tx_write()
2461 write_ptr = tx_queue->write_count & tx_queue->ptr_mask; in efx_ef10_tx_write()
2462 buffer = &tx_queue->buffer[write_ptr]; in efx_ef10_tx_write()
2463 txd = efx_tx_desc(tx_queue, write_ptr); in efx_ef10_tx_write()
2464 ++tx_queue->write_count; in efx_ef10_tx_write()
2471 tx_queue->packet_write_count = tx_queue->write_count; in efx_ef10_tx_write()
2473 tx_queue->packet_write_count = tx_queue->write_count; in efx_ef10_tx_write()
2482 } while (tx_queue->write_count != tx_queue->insert_count); in efx_ef10_tx_write()
2486 if (efx_nic_may_push_tx_desc(tx_queue, old_write_count)) { in efx_ef10_tx_write()
2487 txd = efx_tx_desc(tx_queue, in efx_ef10_tx_write()
2488 old_write_count & tx_queue->ptr_mask); in efx_ef10_tx_write()
2489 efx_ef10_push_tx_desc(tx_queue, txd); in efx_ef10_tx_write()
2490 ++tx_queue->pushes; in efx_ef10_tx_write()
2492 efx_ef10_notify_tx_desc(tx_queue); in efx_ef10_tx_write()
2954 struct efx_tx_queue *tx_queue; in efx_ef10_handle_tx_event() local
2968 tx_queue = channel->tx_queue + (tx_ev_q_label % EFX_MAX_TXQ_PER_CHANNEL); in efx_ef10_handle_tx_event()
2970 if (!tx_queue->timestamping) { in efx_ef10_handle_tx_event()
2973 efx_xmit_done(tx_queue, tx_ev_desc_ptr & tx_queue->ptr_mask); in efx_ef10_handle_tx_event()
3008 tx_queue->completed_timestamp_minor = ts_part; in efx_ef10_handle_tx_event()
3013 tx_queue->completed_timestamp_major = ts_part; in efx_ef10_handle_tx_event()
3015 efx_xmit_done_single(tx_queue); in efx_ef10_handle_tx_event()