[dpdk-dev] [PATCH / RFC ] ethdev: Allow rte_eth_dev_configure with zero RX/TX queues

Pattan, Reshma reshma.pattan at intel.com
Mon May 16 14:43:46 CEST 2016



> -----Original Message-----
> From: Simon Kågström [mailto:simon.kagstrom at netinsight.net]
> Sent: Monday, May 16, 2016 11:33 AM
> To: Pattan, Reshma <reshma.pattan at intel.com>; dev at dpdk.org;
> thomas.monjalon at 6wind.com
> Subject: Re: [PATCH / RFC ] ethdev: Allow rte_eth_dev_configure with zero
> RX/TX queues
> 
> On 2016-05-16 12:24, Pattan, Reshma wrote:
> >> diff --git a/lib/librte_ether/rte_ethdev.c
> >> b/lib/librte_ether/rte_ethdev.c index
> >> a31018e..5481d45 100644
> >> --- a/lib/librte_ether/rte_ethdev.c
> >> +++ b/lib/librte_ether/rte_ethdev.c
> >> @@ -944,11 +944,6 @@ rte_eth_dev_configure(uint8_t port_id, uint16_t
> >> nb_rx_q, uint16_t nb_tx_q,
> >>  	 */
> >>  	(*dev->dev_ops->dev_infos_get)(dev, &dev_info);
> >>
> >> -	if (nb_rx_q == 0 && nb_tx_q == 0) {
> >> -		RTE_PMD_DEBUG_TRACE("ethdev port_id=%d both rx and tx
> >> queue cannot be 0\n", port_id);
> >> -		return -EINVAL;
> >> -	}
> >
> > This was added to allow devices,  at least with one direction (RX/TX)
> supported. As, devices with both directions disabled doesn't make  sense right?
> 
> Well, not for running them, no. But this is a part of the shutdown procedure
> between tests (I should have been more clear I guess).
> 

Yes I understood this. But I am not sure if you can use rte_eth_dev_configure(port, 0, 0) to free the resources.
Can you check if you can use rte_eth_dev_rx_queue_stop/ rte_eth_dev_tx_queue_stop to achieve the same, because they do take care of
releasing mbufs, but doesn't free the queue's sw-ring and queue.

Thanks,
Reshma


More information about the dev mailing list