Dear Ferruh, You are right, I messed up the brackets.
I already sent v3. Thanks, Mauricio. On 11/02/2016 08:15 AM, Ferruh Yigit wrote: > On 11/2/2016 12:49 PM, Fulvio Risso wrote: >> Dear Ferruh, >> Maybe I'm wrong, but I cannot see your point. >> The code is absolutely the same, only the following line >> >> if (eth_dev->data) { >> >> is actually removed. > Please double check the condition "rx_queues" freed: > > before the patch: > ========== > if (eth_dev->data) { > internals = eth_dev->data->dev_private; > if (internals->action == DEV_CREATE) { > /* > * it is only necessary to delete the rings in rx_queues because > * they are the same used in tx_queues > */ > for (i = 0; i < eth_dev->data->nb_rx_queues; i++) { > r = eth_dev->data->rx_queues[i]; > rte_ring_free(r->rng); > } > } > > rte_free(eth_dev->data->rx_queues); > rte_free(eth_dev->data->tx_queues); > rte_free(eth_dev->data->dev_private); > } > ========== > > > After the patch: > ========== > internals = eth_dev->data->dev_private; > if (internals->action == DEV_CREATE) { > /* > * it is only necessary to delete the rings in rx_queues because > * they are the same used in tx_queues > */ > for (i = 0; i < eth_dev->data->nb_rx_queues; i++) { > r = eth_dev->data->rx_queues[i]; > rte_ring_free(r->rng); > } > > rte_free(eth_dev->data->rx_queues); > rte_free(eth_dev->data->tx_queues); > rte_free(eth_dev->data->dev_private); > } > ========== > > > Thanks, > ferruh >