Show a patch.

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

{
    "id": 41916,
    "url": "http://patches.dpdk.org/api/patches/41916/?format=api",
    "web_url": "http://patches.dpdk.org/patch/41916/",
    "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"
    },
    "msgid": "<20180629092944.15576-4-johndale@cisco.com>",
    "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": "http://patches.dpdk.org/api/people/359/?format=api",
        "name": "John Daley",
        "email": "johndale@cisco.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@intel.com"
    },
    "mbox": "http://patches.dpdk.org/patch/41916/mbox/",
    "series": [
        {
            "id": 308,
            "url": "http://patches.dpdk.org/api/series/308/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=308",
            "date": "2018-06-29T09:29:29",
            "name": "enic PMD fixes and performance improvements",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/308/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41916/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/41916/checks/",
    "tags": {},
    "headers": {
        "X-Mailer": "git-send-email 2.16.2",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "From": "John Daley <johndale@cisco.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n\td=cisco.com; i=@cisco.com; 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": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Delivered-To": "patchwork@dpdk.org",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Cc": "dev@dpdk.org, Hyong Youb Kim <hyonkim@cisco.com>",
        "To": "ferruh.yigit@intel.com",
        "Errors-To": "dev-bounces@dpdk.org",
        "References": "<20180628031940.17397-1-johndale@cisco.com>\n\t<20180629092944.15576-1-johndale@cisco.com>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,285,1526342400\"; d=\"scan'208\";a=\"416956082\"",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D7FFF1B3AE;\n\tFri, 29 Jun 2018 11:31:03 +0200 (CEST)",
            "from rcdn-iport-1.cisco.com (rcdn-iport-1.cisco.com [173.37.86.72])\n\tby dpdk.org (Postfix) with ESMTP id D2D941B3AE\n\tfor <dev@dpdk.org>; Fri, 29 Jun 2018 11:31:01 +0200 (CEST)",
            "from alln-core-6.cisco.com ([173.36.13.139])\n\tby rcdn-iport-1.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t29 Jun 2018 09:31:00 +0000",
            "from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48])\n\tby alln-core-6.cisco.com (8.14.5/8.14.5) with ESMTP id w5T9V0lk018742;\n\tFri, 29 Jun 2018 09:31:00 GMT",
            "by cisco.com (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": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH v2 03/15] net/enic: do not overwrite admin Tx\n\tqueue limit",
        "In-Reply-To": "<20180629092944.15576-1-johndale@cisco.com>",
        "Message-Id": "<20180629092944.15576-4-johndale@cisco.com>",
        "Precedence": "list",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "X-Original-To": "patchwork@dpdk.org"
    },
    "content": "From: Hyong Youb Kim <hyonkim@cisco.com>\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 <hyonkim@cisco.com>\nReviewed-by: John Daley <johndale@cisco.com>\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": [
        "v2",
        "03/15"
    ]
}