* DPDK callback to release the receive queue. * * @param dev * Pointer to Ethernet device structure. * @param qid * Receive queue index. */
| 2063 | * Receive queue index. |
| 2064 | */ |
| 2065 | static void |
| 2066 | mrvl_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. |
nothing calls this directly
no test coverage detected