From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <qi.z.zhang@intel.com>
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by dpdk.org (Postfix) with ESMTP id 2AB0E1B316
 for <dev@dpdk.org>; Mon, 12 Feb 2018 05:53:22 +0100 (CET)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from fmsmga001.fm.intel.com ([10.253.24.23])
 by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 11 Feb 2018 20:53:21 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.46,500,1511856000"; d="scan'208";a="30009458"
Received: from dpdk51.sh.intel.com ([10.67.110.184])
 by fmsmga001.fm.intel.com with ESMTP; 11 Feb 2018 20:53:19 -0800
From: Qi Zhang <qi.z.zhang@intel.com>
To: thomas@monjalon.net
Cc: dev@dpdk.org, jingjing.wu@intel.com, beilei.xing@intel.com,
 arybchenko@solarflare.com, konstantin.ananyev@intel.com,
 Qi Zhang <qi.z.zhang@intel.com>
Date: Mon, 12 Feb 2018 12:53:10 +0800
Message-Id: <20180212045314.171616-1-qi.z.zhang@intel.com>
X-Mailer: git-send-email 2.13.6
Subject: [dpdk-dev] [PATCH 0/4] deferred queue setup
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Feb 2018 04:53:23 -0000

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 no traffic
on it.

The patch let etherdev driver expose the capability flag through
rte_eth_dev_info_get when it support deferred queue configuraiton,
then base on these flag, rte_eth_[rx|tx]_queue_setup could decide
continue to setup the queue or just return fail when device already
started.

Qi Zhang (4):
  ether: support deferred queue setup
  app/testpmd: add parameters for deferred queue setup
  app/testpmd: add command for queue setup
  net/i40e: enable deferred queue setup

 app/test-pmd/cmdline.c                      | 136 ++++++++++++++++++++++++++++
 app/test-pmd/parameters.c                   |  29 ++++++
 app/test-pmd/testpmd.c                      |   8 +-
 app/test-pmd/testpmd.h                      |   2 +
 doc/guides/nics/features.rst                |   8 ++
 doc/guides/testpmd_app_ug/run_app.rst       |  12 +++
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |   7 ++
 drivers/net/i40e/i40e_ethdev.c              |   6 ++
 drivers/net/i40e/i40e_rxtx.c                |  62 ++++++++++++-
 lib/librte_ether/rte_ethdev.c               |  30 +++---
 lib/librte_ether/rte_ethdev.h               |   8 ++
 11 files changed, 292 insertions(+), 16 deletions(-)

-- 
2.13.6