get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 50209,
    "url": "http://patches.dpdk.org/api/patches/50209/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1549556983-10896-10-git-send-email-arybchenko@solarflare.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": "<1549556983-10896-10-git-send-email-arybchenko@solarflare.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1549556983-10896-10-git-send-email-arybchenko@solarflare.com",
    "date": "2019-02-07T16:29:14",
    "name": "[09/38] net/sfc: use NIC min number of Tx descs instead of define",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "b4c36fac65ee08e2334517db796a18750993c769",
    "submitter": {
        "id": 607,
        "url": "http://patches.dpdk.org/api/people/607/?format=api",
        "name": "Andrew Rybchenko",
        "email": "arybchenko@solarflare.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/1549556983-10896-10-git-send-email-arybchenko@solarflare.com/mbox/",
    "series": [
        {
            "id": 3411,
            "url": "http://patches.dpdk.org/api/series/3411/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3411",
            "date": "2019-02-07T16:29:05",
            "name": "net/sfc: update base driver",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/3411/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/50209/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/50209/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 CB4B51B5D1;\n\tThu,  7 Feb 2019 17:30:53 +0100 (CET)",
            "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n\t[67.231.154.164]) by dpdk.org (Postfix) with ESMTP id ABF721B580\n\tfor <dev@dpdk.org>; Thu,  7 Feb 2019 17:30:36 +0100 (CET)",
            "from webmail.solarflare.com (webmail.solarflare.com\n\t[12.187.104.26])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby mx1-us3.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with\n\tESMTPS id 1880CB80075; Thu,  7 Feb 2019 16:30:35 +0000 (UTC)",
            "from ocex03.SolarFlarecom.com (10.20.40.36) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id 15.0.1395.4; Thu, 7 Feb 2019 08:30:31 -0800",
            "from opal.uk.solarflarecom.com (10.17.10.1) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id\n\t15.0.1395.4 via Frontend Transport; Thu, 7 Feb 2019 08:30:30 -0800",
            "from ukv-loginhost.uk.solarflarecom.com\n\t(ukv-loginhost.uk.solarflarecom.com [10.17.10.39])\n\tby opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id\n\tx17GUTUe015284; Thu, 7 Feb 2019 16:30:29 GMT",
            "from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1])\n\tby ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id\n\t7EC681613EB; Thu,  7 Feb 2019 16:30:29 +0000 (GMT)"
        ],
        "X-Virus-Scanned": "Proofpoint Essentials engine",
        "From": "Andrew Rybchenko <arybchenko@solarflare.com>",
        "To": "<dev@dpdk.org>",
        "CC": "Igor Romanov <igor.romanov@oktetlabs.ru>",
        "Date": "Thu, 7 Feb 2019 16:29:14 +0000",
        "Message-ID": "<1549556983-10896-10-git-send-email-arybchenko@solarflare.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1549556983-10896-1-git-send-email-arybchenko@solarflare.com>",
        "References": "<1549556983-10896-1-git-send-email-arybchenko@solarflare.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-TM-AS-Product-Ver": "SMEX-12.5.0.1300-8.5.1010-24412.006",
        "X-TM-AS-Result": "No-3.617000-4.000000-10",
        "X-TMASE-MatchedRID": "VUAcEURhMU7hE4ic2WIDex+WEMjoO9WWI9yVcHNDU7bHeIFnKQ51HHVX\n\t4shSYpPIf7YDZKX9w6SXULCsji+PP8acP/wBzSwn4pdq9sdj8LVYMtqMzbYRNldT83wS9+xEvkE\n\tSpfBKzZRyO22KmJrJ+sjmbai0wIi4XHEPHmpuRH0URSScn+QSXt0H8LFZNFG7/nnwJ52QYi89zd\n\tFMl2nL2q92bl/RubOFRttKO004s4MLLssn8rJR9gt0nvqoB7hSGJREc2A4oxqr5ys3KfiwhgNk+\n\to9tc7z4PAGW5zZpvheESaDBGFmPGJN1JFeUKeMEiOOUXfTkScBZSbxIRLLN37zfneGoTKOTVlxr\n\t1FJij9s=",
        "X-TM-AS-User-Approved-Sender": "No",
        "X-TM-AS-User-Blocked-Sender": "No",
        "X-TMASE-Result": "10--3.617000-4.000000",
        "X-TMASE-Version": "SMEX-12.5.0.1300-8.5.1010-24412.006",
        "X-MDID": "1549557035-kQ4VA2iqNIZO",
        "Subject": "[dpdk-dev] [PATCH 09/38] net/sfc: use NIC min number of Tx descs\n\tinstead of define",
        "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: Igor Romanov <igor.romanov@oktetlabs.ru>\n\nMin limit is not common for all NIC families. Use the variable from\nNIC configuration instead of deprecated define.\n\nSigned-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\n---\n drivers/net/sfc/sfc.c         |  3 +++\n drivers/net/sfc/sfc.h         |  1 +\n drivers/net/sfc/sfc_dp_tx.h   |  7 +++++++\n drivers/net/sfc/sfc_ef10_tx.c |  5 +++--\n drivers/net/sfc/sfc_ethdev.c  |  4 ++--\n drivers/net/sfc/sfc_tx.c      | 13 ++++++++++---\n 6 files changed, 26 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/drivers/net/sfc/sfc.c b/drivers/net/sfc/sfc.c\nindex 83001cb68..2e29bfaf4 100644\n--- a/drivers/net/sfc/sfc.c\n+++ b/drivers/net/sfc/sfc.c\n@@ -759,6 +759,9 @@ sfc_attach(struct sfc_adapter *sa)\n \tsa->txq_max_entries = encp->enc_txq_max_ndescs;\n \tSFC_ASSERT(rte_is_power_of_2(sa->txq_max_entries));\n \n+\tsa->txq_min_entries = encp->enc_txq_min_ndescs;\n+\tSFC_ASSERT(rte_is_power_of_2(sa->txq_min_entries));\n+\n \trc = sfc_intr_attach(sa);\n \tif (rc != 0)\n \t\tgoto fail_intr_attach;\ndiff --git a/drivers/net/sfc/sfc.h b/drivers/net/sfc/sfc.h\nindex 725dd5ee6..3acb3fe48 100644\n--- a/drivers/net/sfc/sfc.h\n+++ b/drivers/net/sfc/sfc.h\n@@ -245,6 +245,7 @@ struct sfc_adapter {\n \tunsigned int\t\t\ttxq_max;\n \n \tunsigned int\t\t\ttxq_max_entries;\n+\tunsigned int\t\t\ttxq_min_entries;\n \n \tuint32_t\t\t\tevq_flags;\n \tunsigned int\t\t\tevq_count;\ndiff --git a/drivers/net/sfc/sfc_dp_tx.h b/drivers/net/sfc/sfc_dp_tx.h\nindex fd492f21f..9cb2198e2 100644\n--- a/drivers/net/sfc/sfc_dp_tx.h\n+++ b/drivers/net/sfc/sfc_dp_tx.h\n@@ -27,6 +27,12 @@ struct sfc_dp_txq {\n \tstruct sfc_dp_queue\tdpq;\n };\n \n+/** Datapath transmit queue descriptor number limitations */\n+struct sfc_dp_tx_hw_limits {\n+\tunsigned int txq_max_entries;\n+\tunsigned int txq_min_entries;\n+};\n+\n /**\n  * Datapath transmit queue creation information.\n  *\n@@ -83,6 +89,7 @@ typedef void (sfc_dp_tx_get_dev_info_t)(struct rte_eth_dev_info *dev_info);\n  * @return 0 or positive errno.\n  */\n typedef int (sfc_dp_tx_qsize_up_rings_t)(uint16_t nb_tx_desc,\n+\t\t\t\t\t struct sfc_dp_tx_hw_limits *limits,\n \t\t\t\t\t unsigned int *txq_entries,\n \t\t\t\t\t unsigned int *evq_entries,\n \t\t\t\t\t unsigned int *txq_max_fill_level);\ndiff --git a/drivers/net/sfc/sfc_ef10_tx.c b/drivers/net/sfc/sfc_ef10_tx.c\nindex ff6d5b486..0711c1136 100644\n--- a/drivers/net/sfc/sfc_ef10_tx.c\n+++ b/drivers/net/sfc/sfc_ef10_tx.c\n@@ -782,6 +782,7 @@ sfc_ef10_get_dev_info(struct rte_eth_dev_info *dev_info)\n static sfc_dp_tx_qsize_up_rings_t sfc_ef10_tx_qsize_up_rings;\n static int\n sfc_ef10_tx_qsize_up_rings(uint16_t nb_tx_desc,\n+\t\t\t   struct sfc_dp_tx_hw_limits *limits,\n \t\t\t   unsigned int *txq_entries,\n \t\t\t   unsigned int *evq_entries,\n \t\t\t   unsigned int *txq_max_fill_level)\n@@ -790,8 +791,8 @@ sfc_ef10_tx_qsize_up_rings(uint16_t nb_tx_desc,\n \t * rte_ethdev API guarantees that the number meets min, max and\n \t * alignment requirements.\n \t */\n-\tif (nb_tx_desc <= EFX_TXQ_MINNDESCS)\n-\t\t*txq_entries = EFX_TXQ_MINNDESCS;\n+\tif (nb_tx_desc <= limits->txq_min_entries)\n+\t\t*txq_entries = limits->txq_min_entries;\n \telse\n \t\t*txq_entries = rte_align32pow2(nb_tx_desc);\n \ndiff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c\nindex 286550863..57b8b7e49 100644\n--- a/drivers/net/sfc/sfc_ethdev.c\n+++ b/drivers/net/sfc/sfc_ethdev.c\n@@ -162,12 +162,12 @@ sfc_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n \n \t/* Initialize to hardware limits */\n \tdev_info->tx_desc_lim.nb_max = sa->txq_max_entries;\n-\tdev_info->tx_desc_lim.nb_min = EFX_TXQ_MINNDESCS;\n+\tdev_info->tx_desc_lim.nb_min = sa->txq_min_entries;\n \t/*\n \t * The TXQ hardware requires that the descriptor count is a power\n \t * of 2, but tx_desc_lim cannot properly describe that constraint\n \t */\n-\tdev_info->tx_desc_lim.nb_align = EFX_TXQ_MINNDESCS;\n+\tdev_info->tx_desc_lim.nb_align = sa->txq_min_entries;\n \n \tif (sap->dp_rx->get_dev_info != NULL)\n \t\tsap->dp_rx->get_dev_info(dev_info);\ndiff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c\nindex acdbf1602..aa0538fe8 100644\n--- a/drivers/net/sfc/sfc_tx.c\n+++ b/drivers/net/sfc/sfc_tx.c\n@@ -131,14 +131,20 @@ sfc_tx_qinit(struct sfc_adapter *sa, unsigned int sw_index,\n \tint rc = 0;\n \tstruct sfc_dp_tx_qcreate_info info;\n \tuint64_t offloads;\n+\tstruct sfc_dp_tx_hw_limits hw_limits;\n \n \tsfc_log_init(sa, \"TxQ = %u\", sw_index);\n \n-\trc = sa->priv.dp_tx->qsize_up_rings(nb_tx_desc, &txq_entries,\n-\t\t\t\t\t    &evq_entries, &txq_max_fill_level);\n+\tmemset(&hw_limits, 0, sizeof(hw_limits));\n+\thw_limits.txq_max_entries = sa->txq_max_entries;\n+\thw_limits.txq_min_entries = sa->txq_min_entries;\n+\n+\trc = sa->priv.dp_tx->qsize_up_rings(nb_tx_desc, &hw_limits,\n+\t\t\t\t\t    &txq_entries, &evq_entries,\n+\t\t\t\t\t    &txq_max_fill_level);\n \tif (rc != 0)\n \t\tgoto fail_size_up_rings;\n-\tSFC_ASSERT(txq_entries >= EFX_TXQ_MINNDESCS);\n+\tSFC_ASSERT(txq_entries >= sa->txq_min_entries);\n \tSFC_ASSERT(txq_entries <= sa->txq_max_entries);\n \tSFC_ASSERT(txq_entries >= nb_tx_desc);\n \tSFC_ASSERT(txq_max_fill_level <= nb_tx_desc);\n@@ -920,6 +926,7 @@ sfc_txq_by_dp_txq(const struct sfc_dp_txq *dp_txq)\n static sfc_dp_tx_qsize_up_rings_t sfc_efx_tx_qsize_up_rings;\n static int\n sfc_efx_tx_qsize_up_rings(uint16_t nb_tx_desc,\n+\t\t\t  __rte_unused struct sfc_dp_tx_hw_limits *limits,\n \t\t\t  unsigned int *txq_entries,\n \t\t\t  unsigned int *evq_entries,\n \t\t\t  unsigned int *txq_max_fill_level)\n",
    "prefixes": [
        "09/38"
    ]
}