get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 16256,
    "url": "https://patches.dpdk.org/api/patches/16256/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20160929205505.31690-1-johndale@cisco.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20160929205505.31690-1-johndale@cisco.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20160929205505.31690-1-johndale@cisco.com",
    "date": "2016-09-29T20:55:05",
    "name": "[dpdk-dev] net/enic: update enic guide and add warning for invalid conf",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "5adda0b6bc7aaf3bb3705b18b8cd113604a62c7d",
    "submitter": {
        "id": 359,
        "url": "https://patches.dpdk.org/api/people/359/?format=api",
        "name": "John Daley (johndale)",
        "email": "johndale@cisco.com"
    },
    "delegate": {
        "id": 10,
        "url": "https://patches.dpdk.org/api/users/10/?format=api",
        "username": "bruce",
        "first_name": "Bruce",
        "last_name": "Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20160929205505.31690-1-johndale@cisco.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/16256/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/16256/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 0717829CD;\n\tThu, 29 Sep 2016 22:55:11 +0200 (CEST)",
            "from alln-iport-3.cisco.com (alln-iport-3.cisco.com\n\t[173.37.142.90]) by dpdk.org (Postfix) with ESMTP id C77C2298F\n\tfor <dev@dpdk.org>; Thu, 29 Sep 2016 22:55:08 +0200 (CEST)",
            "from rcdn-core-4.cisco.com ([173.37.93.155])\n\tby alln-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t29 Sep 2016 20:55:08 +0000",
            "from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48])\n\tby rcdn-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id u8TKt7pN012093;\n\tThu, 29 Sep 2016 20:55:08 GMT",
            "by cisco.com (Postfix, from userid 392789)\n\tid B3B9A3FAAE0E; Thu, 29 Sep 2016 13:55:07 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n\td=cisco.com; i=@cisco.com; l=5061; q=dns/txt; s=iport;\n\tt=1475182508; x=1476392108;\n\th=from:to:cc:subject:date:message-id;\n\tbh=FPaXg9MXrbFmOD2prR4n1XQrgXs03dlSAaYCjhS4LVc=;\n\tb=hHTgiKgX230QM5+RObuqc+3AuLDwFRy9j6UbdFFsAvgV1+0cJOlGgCUd\n\tfQyQaplXt9rKkFj4sU7GZOt99aKsU5cCkomI3TmRigzTFhsy7esjm5CN2\n\tM613RgxHM3jRgVnwVX8ChazWyPo8JQpDRvfAtR/Ut879P8iU+B0Eol0YH s=;",
        "X-IronPort-AV": "E=Sophos;i=\"5.31,417,1473120000\"; d=\"scan'208\";a=\"329162468\"",
        "From": "John Daley <johndale@cisco.com>",
        "To": "bruce.richardson@intel.com",
        "Cc": "dev@dpdk.org, Nelson Escobar <neescoba@cisco.com>",
        "Date": "Thu, 29 Sep 2016 13:55:05 -0700",
        "Message-Id": "<20160929205505.31690-1-johndale@cisco.com>",
        "X-Mailer": "git-send-email 2.10.0",
        "Subject": "[dpdk-dev] [PATCH] net/enic: update enic guide and add warning for\n\tinvalid conf",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://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": "<http://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": "From: Nelson Escobar <neescoba@cisco.com>\n\nUpdate the enic guide to better explain how to setup vNIC parameters\non the Cisco VIC since the introduction of rx scatter and print an\nerror message for the case of having 1 RQ configured in the vNIC.\n\nSigned-off-by: Nelson Escobar <neescoba@cisco.com>\n---\n doc/guides/nics/enic.rst     | 53 +++++++++++++++++++++++++++++++++++++++-----\n drivers/net/enic/enic_main.c | 14 +++++++-----\n 2 files changed, 57 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/doc/guides/nics/enic.rst b/doc/guides/nics/enic.rst\nindex 8170286..bff5c77 100644\n--- a/doc/guides/nics/enic.rst\n+++ b/doc/guides/nics/enic.rst\n@@ -59,11 +59,31 @@ Configuration information\n \n   - **Number of Queues**\n \n-    The maximum number of receive and transmit queues are configurable on a per\n-    vNIC basis through the Cisco UCS Manager (CIMC or UCSM). These values\n-    should be configured to be greater than or equal to the nb_rx_q and nb_tx_q\n-    parameters expected to  used in the call to the rte_eth_dev_configure()\n-    function.\n+    The maximum number of receive queues (RQs), work queues (WQs) and\n+    completion queues (CQs) are configurable on a per vNIC basis\n+    through the Cisco UCS Manager (CIMC or UCSM).\n+\n+    These values should be configured as follows:\n+\n+    - The number of WQs should be greater or equal to the value of the\n+      expected nb_tx_q parameter in the call to the\n+      rte_eth_dev_configure()\n+\n+    - The number of RQs configured in the vNIC should be greater or\n+      equal to *twice* the value of the expected nb_rx_q parameter in\n+      the call to rte_eth_dev_configure().  With the addition of rx\n+      scatter, a pair of RQs on the vnic is needed for each receive\n+      queue used by DPDK, even if rx scatter is not being used.\n+      Having a vNIC with only 1 RQ is not a valid configuration, and\n+      will fail with an error message.\n+\n+    - The number of CQs should set so that there is one CQ for each\n+      WQ, and one CQ for each pair of RQs.\n+\n+    For example: If the application requires 3 Rx queues, and 3 Tx\n+    queues, the vNIC should be configured to have at least 3 WQs, 6\n+    RQs (3 pairs), and 6 CQs (3 for use by WQs + 3 for use by the 3\n+    pairs of RQs).\n \n   - **Size of Queues**\n \n@@ -71,6 +91,29 @@ Configuration information\n     a per vNIC bases via the UCS Manager and should be greater than or equal to\n     the nb_rx_desc and   nb_tx_desc parameters expected to be used in the calls\n     to rte_eth_rx_queue_setup() and rte_eth_tx_queue_setup() respectively.\n+    An application requesting more than the set size will be limited to that\n+    size.\n+\n+    Unless there is a lack of resources due to creating many vNICs, it\n+    is recommended that the WQ and RQ sizes be set to the maximum.  This\n+    gives the application the greatest amount of flexibility in its\n+    queue configuration.\n+\n+    - *Note*: Since the introduction of rx scatter, for performance\n+      reasons, this PMD uses two RQs on the vNIC per receive queue in\n+      DPDK.  One RQ holds descriptors for the start of a packet the\n+      second RQ holds the descriptors for the rest of the fragments of\n+      a packet.  This means that the nb_rx_desc parameter to\n+      rte_eth_rx_queue_setup() can be a greater than 4096.  The exact\n+      amount will depend on the size of the mbufs being used for\n+      receives, and the MTU size.\n+\n+      For example: If the mbuf size is 2048, and the MTU is 9000, then\n+      receiving a full size packet will take 5 descriptors, 1 from the\n+      start of packet queue, and 4 from the second queue.  Assuming\n+      that the RQ size was set to the maximum of 4096, then the\n+      application can specify up to 1024 + 4096 as the nb_rx_desc\n+      parameter to rte_eth_rx_queue_setup().\n \n   - **Interrupts**\n \ndiff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c\nindex 15a05b4..e3e58fb 100644\n--- a/drivers/net/enic/enic_main.c\n+++ b/drivers/net/enic/enic_main.c\n@@ -1284,6 +1284,15 @@ static int enic_dev_init(struct enic *enic)\n \t\treturn err;\n \t}\n \n+\t/* Get available resource counts */\n+\tenic_get_res_counts(enic);\n+\tif (enic->conf_rq_count == 1) {\n+\t\tdev_err(enic, \"Running with only 1 RQ configured in the vNIC is not supported.\\n\");\n+\t\tdev_err(enic, \"Please configure 2 RQs in the vNIC for each Rx queue used by DPDK.\\n\");\n+\t\tdev_err(enic, \"See the ENIC PMD guide for more information.\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n \teth_dev->data->mac_addrs = rte_zmalloc(\"enic_mac_addr\", ETH_ALEN, 0);\n \tif (!eth_dev->data->mac_addrs) {\n \t\tdev_err(enic, \"mac addr storage alloc failed, aborting.\\n\");\n@@ -1292,11 +1301,6 @@ static int enic_dev_init(struct enic *enic)\n \tether_addr_copy((struct ether_addr *) enic->mac_addr,\n \t\t&eth_dev->data->mac_addrs[0]);\n \n-\n-\t/* Get available resource counts\n-\t*/\n-\tenic_get_res_counts(enic);\n-\n \tvnic_dev_set_reset_flag(enic->vdev, 0);\n \n \t/* set up link status checking */\n",
    "prefixes": [
        "dpdk-dev"
    ]
}