DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Qi Zhang <qi.z.zhang@intel.com>, <thomas@monjalon.net>
Cc: <dev@dpdk.org>, <jinging.wu@intel.com>, <konstantin.ananyev@intel.com>
Subject: Re: [dpdk-dev] [RFC] ether: support deferred queue setup
Date: Mon, 15 Jan 2018 10:25:17 +0300	[thread overview]
Message-ID: <328737a6-89d9-7285-81ec-8a9bd2dfe693@solarflare.com> (raw)
In-Reply-To: <20180115015729.10181-1-qi.z.zhang@intel.com>

On 01/15/2018 04:57 AM, Qi Zhang wrote:
> According to exist implementation, rte_eth_[rx|tx]_queue_setup will
> always return fail if device is already started(rte_eth_dev_start).
>
> This can't satisfied the usage when application want to deferred setup
> part of the queues while keep traffic running on those queues already
> be setup.
>
> example:
> rte_eth_dev_config(nb_rxq = 2, nb_txq =2)
> rte_eth_rx_queue_setup(idx = 0 ...)
> rte_eth_rx_queue_setup(idx = 0 ...)
> rte_eth_dev_start(...) /* [rx|tx]_burst is ready to start on queue 0 */
> rte_eth_rx_queue_setup(idx=1 ...) /* fail*/
>
> Basically this is not a general hardware limitation, because for NIC like
> i40e, ixgbe, it is not necessary to stop the whole device before configure
> a fresh queue or reconfigure an exist queue with traffic on it.
>
> The patch add new eth_dev_ops: [rx|tx]_queue_hot_[setup|release] and
> internal logic of rte_eth_[rx|tx]_queue_setup is changed, so application
> is allowed to setup queue after device start if the driver is implemented
> properly.

I see no point to introduce a new eth_dev_ops. It is possible to simply
allow setup/release operations when the device is started.
If it is desirable to make it controllable and have checks in generic code,
it is possible to have capability bits in dev_info to say that device
supports hot setup/release of Tx/Rx queues.

> The typical implementation of [rx|tx]_queue_hot_setup could be:
> 1. do the same thing in [rx|tx]_queue_setup.
> 2. perform per queue start logic from [rx|tx]_queue_start.
>
> The typical implementation of [rx|tx]_queue_hot_release could be:
> 1. perform per queue stop logic from [rx|tx]_queue_stop.
> 2. do the same thing in [rx|tx]_queue_release.
>
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
> ---
>   lib/librte_ether/rte_ethdev.c | 54 ++++++++++++++++++++++++-------------------
>   lib/librte_ether/rte_ethdev.h |  8 +++++++
>   2 files changed, 38 insertions(+), 24 deletions(-)

<...>

      reply	other threads:[~2018-01-15  7:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15  1:57 Qi Zhang
2018-01-15  7:25 ` Andrew Rybchenko [this message]

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=328737a6-89d9-7285-81ec-8a9bd2dfe693@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=jinging.wu@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=thomas@monjalon.net \
    /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).