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

Function mrvl_rx_queue_release

dpdk/drivers/net/mvpp2/mrvl_ethdev.c:2065–2099  ·  view source on GitHub ↗

* DPDK callback to release the receive queue. * * @param dev * Pointer to Ethernet device structure. * @param qid * Receive queue index. */

Source from the content-addressed store, hash-verified

2063 * Receive queue index.
2064 */
2065static void
2066mrvl_rx_queue_release(struct rte_eth_dev *dev, uint16_t qid)
2067{
2068 struct mrvl_rxq *q = dev->data->rx_queues[qid];
2069 struct pp2_ppio_tc_params *tc_params;
2070 int i, num, tc, inq;
2071 struct pp2_hif *hif;
2072 unsigned int core_id = rte_lcore_id();
2073
2074 if (core_id == LCORE_ID_ANY)
2075 core_id = rte_get_main_lcore();
2076
2077 if (!q)
2078 return;
2079
2080 hif = mrvl_get_hif(q->priv, core_id);
2081
2082 if (!hif)
2083 return;
2084
2085 tc = q->priv->rxq_map[q->queue_id].tc;
2086 inq = q->priv->rxq_map[q->queue_id].inq;
2087 tc_params = &q->priv->ppio_params.inqs_params.tcs_params[tc];
2088 num = tc_params->inqs_params[inq].size;
2089 for (i = 0; i < num; i++) {
2090 struct pp2_buff_inf inf;
2091 uint64_t addr;
2092
2093 pp2_bpool_get_buff(hif, q->priv->bpool, &inf);
2094 addr = cookie_addr_high | inf.cookie;
2095 rte_pktmbuf_free((struct rte_mbuf *)addr);
2096 }
2097
2098 rte_free(q);
2099}
2100
2101/**
2102 * DPDK callback to configure the transmit queue.

Callers

nothing calls this directly

Calls 5

rte_lcore_idFunction · 0.85
rte_get_main_lcoreFunction · 0.85
mrvl_get_hifFunction · 0.85
rte_pktmbuf_freeFunction · 0.85
rte_freeFunction · 0.85

Tested by

no test coverage detected