get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 41918,
    "url": "http://patches.dpdk.org/api/patches/41918/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180629092944.15576-6-johndale@cisco.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": "<20180629092944.15576-6-johndale@cisco.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180629092944.15576-6-johndale@cisco.com",
    "date": "2018-06-29T09:29:34",
    "name": "[v2,05/15] net/enic: report ring limits and preferred default values",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "54567ec8d36e9f0aedfb9242ecce6294d130d44c",
    "submitter": {
        "id": 359,
        "url": "http://patches.dpdk.org/api/people/359/?format=api",
        "name": "John Daley (johndale)",
        "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@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180629092944.15576-6-johndale@cisco.com/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/41918/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/41918/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 7BB7F1B3A8;\n\tFri, 29 Jun 2018 11:31:50 +0200 (CEST)",
            "from rcdn-iport-5.cisco.com (rcdn-iport-5.cisco.com [173.37.86.76])\n\tby dpdk.org (Postfix) with ESMTP id D25611B1FC\n\tfor <dev@dpdk.org>; Fri, 29 Jun 2018 11:31:48 +0200 (CEST)",
            "from rcdn-core-2.cisco.com ([173.37.93.153])\n\tby rcdn-iport-5.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t29 Jun 2018 09:31:47 +0000",
            "from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48])\n\tby rcdn-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id w5T9Vlji028525;\n\tFri, 29 Jun 2018 09:31:47 GMT",
            "by cisco.com (Postfix, from userid 392789)\n\tid 785B520F2001; Fri, 29 Jun 2018 02:31:47 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n\td=cisco.com; i=@cisco.com; l=4937; q=dns/txt; s=iport;\n\tt=1530264708; x=1531474308;\n\th=from:to:cc:subject:date:message-id:in-reply-to: references;\n\tbh=B6TSHFee0yWICotquYuuFUS08GgLeqFaXpWQe91stao=;\n\tb=Kf6LoCETfJlC4OGOcrMAREsKJpBehmoqAgUGbm6QpPkaLSICKbobQDlz\n\tZlQJrpZ9cwcdgQks0XAg+sqBrMVQfZqNUiSm1zr/T+b3EfRjZML6qgUJr\n\t8o2aVaUlA5+giKnpLJ5E1cu7I2dl4Zc7numTrhH6YqdXMVa+NL5G4UoKu w=;",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,285,1526342400\"; d=\"scan'208\";a=\"198973323\"",
        "From": "John Daley <johndale@cisco.com>",
        "To": "ferruh.yigit@intel.com",
        "Cc": "dev@dpdk.org, Hyong Youb Kim <hyonkim@cisco.com>",
        "Date": "Fri, 29 Jun 2018 02:29:34 -0700",
        "Message-Id": "<20180629092944.15576-6-johndale@cisco.com>",
        "X-Mailer": "git-send-email 2.16.2",
        "In-Reply-To": "<20180629092944.15576-1-johndale@cisco.com>",
        "References": "<20180628031940.17397-1-johndale@cisco.com>\n\t<20180629092944.15576-1-johndale@cisco.com>",
        "Subject": "[dpdk-dev] [PATCH v2 05/15] net/enic: report ring limits and\n\tpreferred default values",
        "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://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/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: Hyong Youb Kim <hyonkim@cisco.com>\n\nReport min/max ring sizes, alignments, and so on, and rely on the\ncommon checks implemented in the rte_ethdev layer.\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 | 24 ++++++++++++++++++++++++\n drivers/net/enic/enic_main.c   | 24 ++++++++----------------\n drivers/net/enic/enic_res.h    | 12 ++++++++++++\n 3 files changed, 44 insertions(+), 16 deletions(-)",
    "diff": "diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c\nindex 6ebad8d96..697dd6508 100644\n--- a/drivers/net/enic/enic_ethdev.c\n+++ b/drivers/net/enic/enic_ethdev.c\n@@ -482,6 +482,30 @@ static void enicpmd_dev_info_get(struct rte_eth_dev *eth_dev,\n \tdevice_info->reta_size = enic->reta_size;\n \tdevice_info->hash_key_size = enic->hash_key_size;\n \tdevice_info->flow_type_rss_offloads = enic->flow_type_rss_offloads;\n+\tdevice_info->rx_desc_lim = (struct rte_eth_desc_lim) {\n+\t\t.nb_max = enic->config.rq_desc_count,\n+\t\t.nb_min = ENIC_MIN_RQ_DESCS,\n+\t\t.nb_align = ENIC_ALIGN_DESCS,\n+\t};\n+\tdevice_info->tx_desc_lim = (struct rte_eth_desc_lim) {\n+\t\t.nb_max = enic->config.wq_desc_count,\n+\t\t.nb_min = ENIC_MIN_WQ_DESCS,\n+\t\t.nb_align = ENIC_ALIGN_DESCS,\n+\t\t.nb_seg_max = ENIC_TX_XMIT_MAX,\n+\t\t.nb_mtu_seg_max = ENIC_NON_TSO_MAX_DESC,\n+\t};\n+\tdevice_info->default_rxportconf = (struct rte_eth_dev_portconf) {\n+\t\t.burst_size = ENIC_DEFAULT_RX_BURST,\n+\t\t.ring_size = RTE_MIN(device_info->rx_desc_lim.nb_max,\n+\t\t\tENIC_DEFAULT_RX_RING_SIZE),\n+\t\t.nb_queues = ENIC_DEFAULT_RX_RINGS,\n+\t};\n+\tdevice_info->default_txportconf = (struct rte_eth_dev_portconf) {\n+\t\t.burst_size = ENIC_DEFAULT_TX_BURST,\n+\t\t.ring_size = RTE_MIN(device_info->tx_desc_lim.nb_max,\n+\t\t\tENIC_DEFAULT_TX_RING_SIZE),\n+\t\t.nb_queues = ENIC_DEFAULT_TX_RINGS,\n+\t};\n }\n \n static const uint32_t *enicpmd_dev_supported_ptypes_get(struct rte_eth_dev *dev)\ndiff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c\nindex 863d2463c..2cd85168d 100644\n--- a/drivers/net/enic/enic_main.c\n+++ b/drivers/net/enic/enic_main.c\n@@ -743,8 +743,8 @@ int enic_alloc_rq(struct enic *enic, uint16_t queue_idx,\n \t}\n \n \t/* number of descriptors have to be a multiple of 32 */\n-\tnb_sop_desc = (nb_desc / mbufs_per_pkt) & ~0x1F;\n-\tnb_data_desc = (nb_desc - nb_sop_desc) & ~0x1F;\n+\tnb_sop_desc = (nb_desc / mbufs_per_pkt) & ENIC_ALIGN_DESCS_MASK;\n+\tnb_data_desc = (nb_desc - nb_sop_desc) & ENIC_ALIGN_DESCS_MASK;\n \n \trq_sop->max_mbufs_per_pkt = mbufs_per_pkt;\n \trq_data->max_mbufs_per_pkt = mbufs_per_pkt;\n@@ -752,7 +752,7 @@ int enic_alloc_rq(struct enic *enic, uint16_t queue_idx,\n \tif (mbufs_per_pkt > 1) {\n \t\tmin_sop = 64;\n \t\tmax_sop = ((enic->config.rq_desc_count /\n-\t\t\t    (mbufs_per_pkt - 1)) & ~0x1F);\n+\t\t\t    (mbufs_per_pkt - 1)) & ENIC_ALIGN_DESCS_MASK);\n \t\tmin_data = min_sop * (mbufs_per_pkt - 1);\n \t\tmax_data = enic->config.rq_desc_count;\n \t} else {\n@@ -870,19 +870,11 @@ 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 > 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+\t/*\n+\t * rte_eth_tx_queue_setup() checks min, max, and alignment. So just\n+\t * print an info message for diagnostics.\n+\t */\n+\tdev_info(enic, \"TX Queues - effective number of descs:%d\\n\", nb_desc);\n \n \t/* Allocate queue resources */\n \terr = vnic_wq_alloc(enic->vdev, &enic->wq[queue_idx], queue_idx,\ndiff --git a/drivers/net/enic/enic_res.h b/drivers/net/enic/enic_res.h\nindex e68f1307b..6a3a0c5cc 100644\n--- a/drivers/net/enic/enic_res.h\n+++ b/drivers/net/enic/enic_res.h\n@@ -16,6 +16,10 @@\n #define ENIC_MIN_RQ_DESCS\t\t64\n #define ENIC_MAX_RQ_DESCS\t\t4096\n \n+/* A descriptor ring has a multiple of 32 descriptors */\n+#define ENIC_ALIGN_DESCS\t\t32\n+#define ENIC_ALIGN_DESCS_MASK\t\t~(ENIC_ALIGN_DESCS - 1)\n+\n #define ENIC_MIN_MTU\t\t\t68\n \n /* Does not include (possible) inserted VLAN tag and FCS */\n@@ -31,6 +35,14 @@\n #define ENIC_DEFAULT_RX_FREE_THRESH\t32\n #define ENIC_TX_XMIT_MAX\t\t64\n \n+/* Defaults for dev_info.default_{rx,tx}portconf */\n+#define ENIC_DEFAULT_RX_BURST\t\t32\n+#define ENIC_DEFAULT_RX_RINGS\t\t1\n+#define ENIC_DEFAULT_RX_RING_SIZE\t512\n+#define ENIC_DEFAULT_TX_BURST\t\t32\n+#define ENIC_DEFAULT_TX_RINGS\t\t1\n+#define ENIC_DEFAULT_TX_RING_SIZE\t512\n+\n #define ENIC_RSS_DEFAULT_CPU    0\n #define ENIC_RSS_BASE_CPU       0\n #define ENIC_RSS_HASH_BITS      7\n",
    "prefixes": [
        "v2",
        "05/15"
    ]
}