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

Function reset_rx_queue

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

Source from the content-addressed store, hash-verified

357}
358
359static inline void
360reset_rx_queue(struct ice_rx_queue *rxq)
361{
362 uint16_t len;
363 uint32_t i;
364
365 if (!rxq)
366 return;
367
368 len = rxq->nb_rx_desc + ICE_RX_MAX_BURST;
369
370 for (i = 0; i < len * sizeof(union ice_rx_flex_desc); i++)
371 ((volatile char *)rxq->rx_ring)[i] = 0;
372
373 memset(&rxq->fake_mbuf, 0x0, sizeof(rxq->fake_mbuf));
374
375 for (i = 0; i < ICE_RX_MAX_BURST; i++)
376 rxq->sw_ring[rxq->nb_rx_desc + i].mbuf = &rxq->fake_mbuf;
377
378 /* for rx bulk */
379 rxq->rx_nb_avail = 0;
380 rxq->rx_next_avail = 0;
381 rxq->rx_free_trigger = (uint16_t)(rxq->rx_free_thresh - 1);
382
383 rxq->rx_tail = 0;
384 rxq->nb_rx_hold = 0;
385 rxq->pkt_first_seg = NULL;
386 rxq->pkt_last_seg = NULL;
387}
388
389static inline void
390reset_tx_queue(struct ice_tx_queue *txq)

Callers 2

ice_dcf_rx_queue_stopFunction · 0.70
ice_dcf_stop_queuesFunction · 0.70

Calls 1

memsetFunction · 0.85

Tested by

no test coverage detected