Show a patch.

GET /api/patches/41916/?format=api
Content-Type: application/json
Vary: Accept

    "id": 41916,
    "url": "",
    "web_url": "",
    "project": {
        "id": 1,
        "url": "",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "",
        "list_email": "",
        "web_url": "",
        "scm_url": "git://",
        "webscm_url": ""
    "msgid": "<>",
    "date": "2018-06-29T09:29:32",
    "name": "[v2,03/15] net/enic: do not overwrite admin Tx queue limit",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "37efde05131fabe93706478aa265f24939a38263",
    "submitter": {
        "id": 359,
        "url": "",
        "name": "John Daley",
        "email": ""
    "delegate": {
        "id": 319,
        "url": "",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": ""
    "mbox": "",
    "series": [
            "id": 308,
            "url": "",
            "web_url": "",
            "date": "2018-06-29T09:29:29",
            "name": "enic PMD fixes and performance improvements",
            "version": 2,
            "mbox": ""
    "comments": "",
    "check": "success",
    "checks": "",
    "tags": {},
    "headers": {
        "X-Mailer": "git-send-email 2.16.2",
        "List-Id": "DPDK patches and discussions <>",
        "From": "John Daley <>",
        "List-Help": "<>",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n\;; l=3734; q=dns/txt; s=iport;\n\tt=1530264661; x=1531474261;\n\th=from:to:cc:subject:date:message-id:in-reply-to: references;\n\tbh=SGfGJDEmX6ucf0xzKaYwyLNvkxD9cNDYr5Gj2IzsEng=;\n\tb=DCkLcebV1Dgfq9MGVhoMczhse1wyly6IBJUrL8njTP01x7m0mqgRx4VB\n\tdcNneLg2v/HbCAWDJM47nhalOlSIxnsgc/na/SizLa+r0U2fyWBeK3rSZ\n\tILbsl7hEHZRbm7nryX41pXvq+tKJjWkkQisFkMRQBBhXPsXGiVnaRTrw/ M=;",
        "X-BeenThere": "",
        "X-Mailman-Version": "2.1.15",
        "Delivered-To": "",
        "List-Subscribe": "<>,\n\t<>",
        "Cc": ", Hyong Youb Kim <>",
        "To": "",
        "Errors-To": "",
        "References": "<>\n\t<>",
        "Sender": "\"dev\" <>",
        "Return-Path": "<>",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,285,1526342400\"; d=\"scan'208\";a=\"416956082\"",
        "List-Post": "<>",
        "Received": [
            "from [] (localhost [])\n\tby (Postfix) with ESMTP id D7FFF1B3AE;\n\tFri, 29 Jun 2018 11:31:03 +0200 (CEST)",
            "from ( [])\n\tby (Postfix) with ESMTP id D2D941B3AE\n\tfor <>; Fri, 29 Jun 2018 11:31:01 +0200 (CEST)",
            "from ([])\n\tby with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t29 Jun 2018 09:31:00 +0000",
            "from ( [])\n\tby (8.14.5/8.14.5) with ESMTP id w5T9V0lk018742;\n\tFri, 29 Jun 2018 09:31:00 GMT",
            "by (Postfix, from userid 392789)\n\tid ACD6D20F2001; Fri, 29 Jun 2018 02:31:00 -0700 (PDT)"
        "Date": "Fri, 29 Jun 2018 02:29:32 -0700",
        "List-Archive": "<>",
        "Subject": "[dpdk-dev] [PATCH v2 03/15] net/enic: do not overwrite admin Tx\n\tqueue limit",
        "In-Reply-To": "<>",
        "Message-Id": "<>",
        "Precedence": "list",
        "List-Unsubscribe": "<>,\n\t<>",
        "X-Original-To": ""
    "content": "From: Hyong Youb Kim <>\n\nCurrently, enic_alloc_wq (via rte_eth_tx_queue_setup) may overwrite\nthe admin limit with a lower value. This is wrong as seen in the\nfollowing sequence.\n\n1. UCS admin-set Tx queue limit (config.wq_desc_count) = 4096\n2. Set up tx queue with 512 descriptors\n   The admin limit (config.wq_desc_count) becomes 512.\n3. Stop ports and now set up Tx queue with 1024 descriptors.\n   This fails because 1024 is greater than the admin limit (512).\n\nDo not modify the admin limit, and when queried, report the current\nnumber of descriptors instead of the admin limit. The rx queue setup\n(enic_alloc_rq) does not this problem.\n\nFixes: fefed3d1e62c (\"enic: new driver\")\n\nSigned-off-by: Hyong Youb Kim <>\nReviewed-by: John Daley <>\n---\n drivers/net/enic/enic_ethdev.c |  5 +++--\n drivers/net/enic/enic_main.c   | 30 ++++++++++++++----------------\n 2 files changed, 17 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c\nindex 286308924..6ebad8d96 100644\n--- a/drivers/net/enic/enic_ethdev.c\n+++ b/drivers/net/enic/enic_ethdev.c\n@@ -731,13 +731,14 @@ static void enicpmd_dev_rxq_info_get(struct rte_eth_dev *dev,\n }\n \n static void enicpmd_dev_txq_info_get(struct rte_eth_dev *dev,\n-\t\t\t\t     __rte_unused uint16_t tx_queue_id,\n+\t\t\t\t     uint16_t tx_queue_id,\n \t\t\t\t     struct rte_eth_txq_info *qinfo)\n {\n \tstruct enic *enic = pmd_priv(dev);\n+\tstruct vnic_wq *wq = &enic->wq[tx_queue_id];\n \n \tENICPMD_FUNC_TRACE();\n-\tqinfo->nb_desc = enic->config.wq_desc_count;\n+\tqinfo->nb_desc = wq->ring.desc_count;\n \tmemset(&qinfo->conf, 0, sizeof(qinfo->conf));\n \tqinfo->conf.offloads = enic->tx_offload_capa;\n \t/* tx_thresh, and all the other fields are not applicable for enic */\ndiff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c\nindex 899603fa7..aba2ff5a7 100644\n--- a/drivers/net/enic/enic_main.c\n+++ b/drivers/net/enic/enic_main.c\n@@ -869,25 +869,23 @@ int enic_alloc_wq(struct enic *enic, uint16_t queue_idx,\n \tstatic int instance;\n \n \twq->socket_id = socket_id;\n-\tif (nb_desc) {\n-\t\tif (nb_desc > enic->config.wq_desc_count) {\n-\t\t\tdev_warning(enic,\n-\t\t\t\t\"WQ %d - number of tx desc in cmd line (%d)\"\\\n-\t\t\t\t\"is greater than that in the UCSM/CIMC adapter\"\\\n-\t\t\t\t\"policy.  Applying the value in the adapter \"\\\n-\t\t\t\t\"policy (%d)\\n\",\n-\t\t\t\tqueue_idx, nb_desc, enic->config.wq_desc_count);\n-\t\t} else if (nb_desc != enic->config.wq_desc_count) {\n-\t\t\tenic->config.wq_desc_count = nb_desc;\n-\t\t\tdev_info(enic,\n-\t\t\t\t\"TX Queues - effective number of descs:%d\\n\",\n-\t\t\t\tnb_desc);\n-\t\t}\n+\tif (nb_desc > enic->config.wq_desc_count) {\n+\t\tdev_warning(enic,\n+\t\t\t    \"WQ %d - number of tx desc in cmd line (%d) \"\n+\t\t\t    \"is greater than that in the UCSM/CIMC adapter \"\n+\t\t\t    \"policy.  Applying the value in the adapter \"\n+\t\t\t    \"policy (%d)\\n\",\n+\t\t\t    queue_idx, nb_desc, enic->config.wq_desc_count);\n+\t\tnb_desc = enic->config.wq_desc_count;\n+\t} else if (nb_desc != enic->config.wq_desc_count) {\n+\t\tdev_info(enic,\n+\t\t\t \"TX Queues - effective number of descs:%d\\n\",\n+\t\t\t nb_desc);\n \t}\n \n \t/* Allocate queue resources */\n \terr = vnic_wq_alloc(enic->vdev, &enic->wq[queue_idx], queue_idx,\n-\t\tenic->config.wq_desc_count,\n+\t\tnb_desc,\n \t\tsizeof(struct wq_enet_desc));\n \tif (err) {\n \t\tdev_err(enic, \"error in allocation of wq\\n\");\n@@ -895,7 +893,7 @@ int enic_alloc_wq(struct enic *enic, uint16_t queue_idx,\n \t}\n \n \terr = vnic_cq_alloc(enic->vdev, &enic->cq[cq_index], cq_index,\n-\t\tsocket_id, enic->config.wq_desc_count,\n+\t\tsocket_id, nb_desc,\n \t\tsizeof(struct cq_enet_wq_desc));\n \tif (err) {\n \t\tvnic_wq_free(wq);\n",
    "prefixes": [