MCPcopy Create free account
hub / github.com/F-Stack/f-stack / reset_tx_queue

Function reset_tx_queue

dpdk/drivers/net/ice/ice_dcf_ethdev.c:389–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387}
388
389static inline void
390reset_tx_queue(struct ice_tx_queue *txq)
391{
392 struct ice_tx_entry *txe;
393 uint32_t i, size;
394 uint16_t prev;
395
396 if (!txq) {
397 PMD_DRV_LOG(DEBUG, "Pointer to txq is NULL");
398 return;
399 }
400
401 txe = txq->sw_ring;
402 size = sizeof(struct ice_tx_desc) * txq->nb_tx_desc;
403 for (i = 0; i < size; i++)
404 ((volatile char *)txq->tx_ring)[i] = 0;
405
406 prev = (uint16_t)(txq->nb_tx_desc - 1);
407 for (i = 0; i < txq->nb_tx_desc; i++) {
408 txq->tx_ring[i].cmd_type_offset_bsz =
409 rte_cpu_to_le_64(IAVF_TX_DESC_DTYPE_DESC_DONE);
410 txe[i].mbuf = NULL;
411 txe[i].last_id = i;
412 txe[prev].next_id = i;
413 prev = i;
414 }
415
416 txq->tx_tail = 0;
417 txq->nb_tx_used = 0;
418
419 txq->last_desc_cleaned = txq->nb_tx_desc - 1;
420 txq->nb_tx_free = txq->nb_tx_desc - 1;
421
422 txq->tx_next_dd = txq->tx_rs_thresh - 1;
423 txq->tx_next_rs = txq->tx_rs_thresh - 1;
424}
425
426static int
427ice_dcf_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)

Callers 2

ice_dcf_tx_queue_stopFunction · 0.70
ice_dcf_stop_queuesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected