[dpdk-dev] [PATCH] net/tap: driver closing tx interface on queue setup
pascal.mazon at 6wind.com
Mon Jan 30 15:38:10 CET 2017
On 01/30/2017 12:00 PM, Ferruh Yigit wrote:> On 1/29/2017 2:12 AM, Keith
>> The tap driver setup both rx and tx file descriptors when the
>> rte_eth_rx_queue_setup() causing the tx to be closed when tx setup
>> was called.
> Can you please describe the problem more.
> Without this patch rx->fd == tx->fd, with this patch rx and tx has
> different file descriptors.
> What was the wrong with rx and tx having same fd?
> As far as I can see, rte_eth_rx_queue_setup() won't close tx->fd, that
> function will do nothing if rx or tx has valid fd.
>> Signed-off-by: Keith Wiles <keith.wiles at intel.com>
The tap PMD recently broke for me because of this patch .
During init (eth_dev_tap_create()), the tap PMD allocates a shared RX/TX
queue through tun_alloc().
The recent patch now releases existing queues in rx_queue_setup(),
before adding new ones.
When rx_queue_setup() is called, it uses close() calls on all shared
queues, effectively deleting the netdevice.
That's the main issue here.
I tested Keith's patch , and it fixes that issue, using separate queues.
There is however a couple of other queues-related issues in the tap PMD,
but I'm not sure how to address them properly:
1. internals->fds gets filled only with RX queues (appart from index 0
that is common to both RX and TX).
It means that RX queues only will be deleted when calling
rte_pmd_tap_remove() or tap_tx_queue_release().
2. tap_dev_stop() is not symmetrical with tap_dev_start(): queues won't
get re-created after a stop.
It may be best to keep the very first fd (created with tun_alloc() in
eth_dev_tap_create() during probe) apart.
And then add separate TX/RX queues in internals->txq and
What do you think?
 d00d7cc88335 ("ethdev: release queue before setting up")
More information about the dev