DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Wiles, Keith" <keith.wiles@intel.com>
To: Pascal Mazon <pascal.mazon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/tap: driver closing tx interface on queue setup
Date: Mon, 30 Jan 2017 15:04:09 +0000	[thread overview]
Message-ID: <FAF8CACC-62C3-4A62-8C15-9632B3D271C5@intel.com> (raw)
In-Reply-To: <dfe52108-6bb8-73ba-f65d-0aa066882e48@6wind.com>


> On Jan 30, 2017, at 8:38 AM, Pascal Mazon <pascal.mazon@6wind.com> wrote:
> 
> On 01/30/2017 12:00 PM, Ferruh Yigit wrote:> On 1/29/2017 2:12 AM, Keith Wiles wrote:
>>> 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@intel.com>
>> 
>> <...>
>> 
> 
> Hi,
> 
> The tap PMD recently broke for me because of this patch [1].
> 
> 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 [2], 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 internals->rxq[] respectively.
> What do you think?
> 
> [1] d00d7cc88335 ("ethdev: release queue before setting up")
> [2] http://dpdk.org/ml/archives/dev/2017-January/056470.html

Lets keep the current patch just to get over the current problem if everyone agrees. I will address the comments Pascal brings up as a later updated to the TAP PMD or I can try to get the other issues cleaned up.

> 
> 
> -- 
> Pascal Mazon
> www.6wind.com

Regards,
Keith

  reply	other threads:[~2017-01-30 15:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-29  2:12 Keith Wiles
2017-01-30 11:00 ` Ferruh Yigit
2017-01-30 14:34   ` Wiles, Keith
2017-01-30 17:42     ` Ferruh Yigit
2017-01-30 18:20       ` Wiles, Keith
2017-01-30 19:31         ` Ferruh Yigit
2017-01-30 14:38   ` Pascal Mazon
2017-01-30 15:04     ` Wiles, Keith [this message]
2017-01-30 17:19     ` Ferruh Yigit
2017-01-30 20:54 ` [dpdk-dev] [PATCH v2] net/tap: fix invalid queue file descriptor Ferruh Yigit
2017-01-30 20:57   ` Wiles, Keith
2017-01-30 21:23     ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FAF8CACC-62C3-4A62-8C15-9632B3D271C5@intel.com \
    --to=keith.wiles@intel.com \
    --cc=dev@dpdk.org \
    --cc=pascal.mazon@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).