get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/34954/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 34954,
    "url": "http://patches.dpdk.org/api/patches/34954/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180205103610.228721-1-qi.z.zhang@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20180205103610.228721-1-qi.z.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180205103610.228721-1-qi.z.zhang@intel.com",
    "date": "2018-02-05T10:36:10",
    "name": "[dpdk-dev,RFC,v2] ether: support deferred queue setup",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "d652764b88dd03d3a14829968871e560da021f00",
    "submitter": {
        "id": 504,
        "url": "http://patches.dpdk.org/api/people/504/?format=api",
        "name": "Qi Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180205103610.228721-1-qi.z.zhang@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/34954/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/34954/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0FF341B2BF;\n\tMon,  5 Feb 2018 11:36:22 +0100 (CET)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 15B3A1B2BA\n\tfor <dev@dpdk.org>; Mon,  5 Feb 2018 11:36:20 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t05 Feb 2018 02:36:20 -0800",
            "from dpdk51.sh.intel.com ([10.67.110.184])\n\tby fmsmga001.fm.intel.com with ESMTP; 05 Feb 2018 02:36:18 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.46,464,1511856000\"; d=\"scan'208\";a=\"28119158\"",
        "From": "Qi Zhang <qi.z.zhang@intel.com>",
        "To": "thomas@monjalon.net",
        "Cc": "dev@dpdk.org, jingjing.wu@intel.com, konstantin.ananyev@intel.com,\n\tarybchenko@solarflare.com, Qi Zhang <qi.z.zhang@intel.com>",
        "Date": "Mon,  5 Feb 2018 18:36:10 +0800",
        "Message-Id": "<20180205103610.228721-1-qi.z.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "Subject": "[dpdk-dev] [RFC v2] ether: support 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>,\n\t<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>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "According to exist implementation, rte_eth_[rx|tx]_queue_setup will\nalways return fail if device is already started(rte_eth_dev_start).\n\nThis can't satisfied the usage when application want to deferred setup\npart of the queues while keep traffic running on those queues already\nbe setup.\n\nexample:\nrte_eth_dev_config(nb_rxq = 2, nb_txq =2)\nrte_eth_rx_queue_setup(idx = 0 ...)\nrte_eth_rx_queue_setup(idx = 0 ...)\nrte_eth_dev_start(...) /* [rx|tx]_burst is ready to start on queue 0 */\nrte_eth_rx_queue_setup(idx=1 ...) /* fail*/\n\nBasically this is not a general hardware limitation, because for NIC like\ni40e, ixgbe, it is not necessary to stop the whole device before configure\na fresh queue or reconfigure an exist queue with no traffic on it.\n\nThe patch add new device capability bit into dev_info, so\nrte_eth_[rx|tx]_queue_setup will able to started.\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n lib/librte_ether/rte_ethdev.c | 40 ++++++++++++++++++++++++++++------------\n lib/librte_ether/rte_ethdev.h |  7 +++++++\n 2 files changed, 35 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex 78bed1a16..58bde40bb 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -1425,12 +1425,6 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,\n \t\treturn -EINVAL;\n \t}\n \n-\tif (dev->data->dev_started) {\n-\t\tRTE_PMD_DEBUG_TRACE(\n-\t\t    \"port %d must be stopped to allow configuration\\n\", port_id);\n-\t\treturn -EBUSY;\n-\t}\n-\n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_infos_get, -ENOTSUP);\n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_setup, -ENOTSUP);\n \n@@ -1474,10 +1468,25 @@ rte_eth_rx_queue_setup(uint16_t port_id, uint16_t rx_queue_id,\n \t\treturn -EINVAL;\n \t}\n \n+\tif (dev->data->dev_started &&\n+\t\t!(dev_info.ext_capa & DEV_DEFERRED_RX_QUEUE_SETUP)) {\n+\t\tRTE_PMD_DEBUG_TRACE(\n+\t\t\t\"port %d must be stopped to allow rx queue setup\\n\",\n+\t\t\tport_id);\n+\t\treturn -EBUSY;\n+\t}\n+\n \trxq = dev->data->rx_queues;\n \tif (rxq[rx_queue_id]) {\n \t\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_release,\n \t\t\t\t\t-ENOTSUP);\n+\t\tif (dev->data->dev_started &&\n+\t\t\t!(dev_info.ext_capa & DEV_DEFERRED_RX_QUEUE_RELEASE)) {\n+\t\t\tRTE_PMD_DEBUG_TRACE(\n+\t\t\t  \"port %d must be stopped to allow rx queue release\\n\",\n+\t\t\t  port_id);\n+\t\t\treturn -EBUSY;\n+\t\t}\n \t\t(*dev->dev_ops->rx_queue_release)(rxq[rx_queue_id]);\n \t\trxq[rx_queue_id] = NULL;\n \t}\n@@ -1573,12 +1582,6 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,\n \t\treturn -EINVAL;\n \t}\n \n-\tif (dev->data->dev_started) {\n-\t\tRTE_PMD_DEBUG_TRACE(\n-\t\t    \"port %d must be stopped to allow configuration\\n\", port_id);\n-\t\treturn -EBUSY;\n-\t}\n-\n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_infos_get, -ENOTSUP);\n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_queue_setup, -ENOTSUP);\n \n@@ -1596,10 +1599,23 @@ rte_eth_tx_queue_setup(uint16_t port_id, uint16_t tx_queue_id,\n \t\treturn -EINVAL;\n \t}\n \n+\tif (dev->data->dev_started &&\n+\t\t!(dev_info.ext_capa & DEV_DEFERRED_TX_QUEUE_SETUP)) {\n+\t\tRTE_PMD_DEBUG_TRACE(\n+\t\t\t\"port %d must be stopped to allow tx queue setup\\n\",\n+\t\treturn -EBUSY;\n+\t}\n+\n \ttxq = dev->data->tx_queues;\n \tif (txq[tx_queue_id]) {\n \t\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_queue_release,\n \t\t\t\t\t-ENOTSUP);\n+\t\tif (dev->data->dev_started &&\n+\t\t\t!(dev_info.ext_capa & DEV_DEFERRED_TX_QUEUE_RELEASE)) {\n+\t\t\tRTE_PMD_DEBUG_TRACE(\n+\t\t\t  \"port %d must be stopped to allow tx queue release\\n\",\n+\t\t\treturn -EBUSY;\n+\t\t}\n \t\t(*dev->dev_ops->tx_queue_release)(txq[tx_queue_id]);\n \t\ttxq[tx_queue_id] = NULL;\n \t}\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex 036153306..75a85859d 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -981,6 +981,12 @@ struct rte_eth_conf {\n  */\n #define DEV_TX_OFFLOAD_SECURITY         0x00020000\n \n+/** < Deferred queue setup / release capability */\n+#define DEV_DEFERRED_RX_QUEUE_SETUP 0x00000001\n+#define DEV_DEFERRED_TX_QUEUE_SETUP 0x00000002\n+#define DEV_DEFERRED_RX_QUEUE_RELEASE 0x00000004\n+#define DEV_DEFERRED_TX_QUEUE_RELEASE 0x00000008\n+\n /*\n  * If new Tx offload capabilities are defined, they also must be\n  * mentioned in rte_tx_offload_names in rte_ethdev.c file.\n@@ -1029,6 +1035,7 @@ struct rte_eth_dev_info {\n \t/** Configured number of rx/tx queues */\n \tuint16_t nb_rx_queues; /**< Number of RX queues. */\n \tuint16_t nb_tx_queues; /**< Number of TX queues. */\n+\tuint64_t ext_capa; /**< extended capability */\n };\n \n /**\n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "v2"
    ]
}