get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 63946,
    "url": "http://patches.dpdk.org/api/patches/63946/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20191217041755.29232-3-somnath.kotur@broadcom.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": "<20191217041755.29232-3-somnath.kotur@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191217041755.29232-3-somnath.kotur@broadcom.com",
    "date": "2019-12-17T04:17:51",
    "name": "[2/6] net/bnxt: fix to use first valid profile if lossy profile not found",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "769008a6b5812ba6a36215ee9162274cf732b4e3",
    "submitter": {
        "id": 908,
        "url": "http://patches.dpdk.org/api/people/908/?format=api",
        "name": "Somnath Kotur",
        "email": "somnath.kotur@broadcom.com"
    },
    "delegate": {
        "id": 1766,
        "url": "http://patches.dpdk.org/api/users/1766/?format=api",
        "username": "ajitkhaparde",
        "first_name": "Ajit",
        "last_name": "Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20191217041755.29232-3-somnath.kotur@broadcom.com/mbox/",
    "series": [
        {
            "id": 7857,
            "url": "http://patches.dpdk.org/api/series/7857/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7857",
            "date": "2019-12-17T04:17:49",
            "name": "bnxt patchset",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/7857/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/63946/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/63946/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id B504DA04F0;\n\tTue, 17 Dec 2019 05:18:46 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0F48C37B0;\n\tTue, 17 Dec 2019 05:18:36 +0100 (CET)",
            "from relay.smtp.broadcom.com (unknown [192.19.232.149])\n by dpdk.org (Postfix) with ESMTP id 14FCD2BF9\n for <dev@dpdk.org>; Tue, 17 Dec 2019 05:18:30 +0100 (CET)",
            "from dhcp-10-123-153-55.dhcp.broadcom.net\n (bgccx-dev-host-lnx35.bec.broadcom.net [10.123.153.55])\n by relay.smtp.broadcom.com (Postfix) with ESMTP id A96441BE6C1;\n Mon, 16 Dec 2019 20:18:28 -0800 (PST)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com A96441BE6C1",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com;\n s=dkimrelay; t=1576556309;\n bh=EGqznrm4mDq4MxIA4h9Fo3/5KVc1JBilcBJeFZxTrNc=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=HPCSveO5gsfmSp1DxmbemFrLD+eXdiegEsX9G5793/sQIVm9ds9W+9yrY7lY9AIs8\n FvyJzbnpZVNca6ms1/jgvCRCh6gtOES+0s6NqclRB9dAbKwQ9i9C6JfiwG5ZZQTDn0\n 1rKLX5cnBnLMdLKfR0kVl7BKnSBtMIi+EV7pOtU8=",
        "From": "Somnath Kotur <somnath.kotur@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com",
        "Date": "Tue, 17 Dec 2019 09:47:51 +0530",
        "Message-Id": "<20191217041755.29232-3-somnath.kotur@broadcom.com>",
        "X-Mailer": "git-send-email 2.10.1.613.g2cc2e70",
        "In-Reply-To": "<20191217041755.29232-1-somnath.kotur@broadcom.com>",
        "References": "<20191217041755.29232-1-somnath.kotur@broadcom.com>",
        "Subject": "[dpdk-dev] [PATCH 2/6] net/bnxt: fix to use first valid profile if\n\tlossy profile not found",
        "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 <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 <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "In the case when CoS classification is disabled, driver was iterating\nlooking for only lossy profiles as that is what is expected to be used\nfor regular NIC operations. But in certain custom profiles, there were\nno lossy profiles configured, only lossless profiles instead.\nTo handle such cases, it is better to fallback to using the first valid\nprofile.\n\nFixes: 698aa7e95 (\"net/bnxt: add code to determine the Tx COS queue\")\n\nSigned-off-by: Somnath Kotur <somnath.kotur@broadcom.com>\nReviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>\n---\n drivers/net/bnxt/bnxt_hwrm.c | 44 ++++++++++++++++++++++++++++++++++++--------\n drivers/net/bnxt/bnxt_hwrm.h |  3 +++\n 2 files changed, 39 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c\nindex 64dc78a..694d2d0 100644\n--- a/drivers/net/bnxt/bnxt_hwrm.c\n+++ b/drivers/net/bnxt/bnxt_hwrm.c\n@@ -1211,6 +1211,35 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp,\n \treturn rc;\n }\n \n+static bool bnxt_find_lossy_profile(struct bnxt *bp)\n+{\n+\tint i = 0;\n+\n+\tfor (i = BNXT_COS_QUEUE_COUNT - 1; i >= 0; i--) {\n+\t\tif (bp->tx_cos_queue[i].profile ==\n+\t\t    HWRM_QUEUE_SERVICE_PROFILE_LOSSY) {\n+\t\t\tbp->tx_cosq_id[0] = bp->tx_cos_queue[i].id;\n+\t\t\treturn true;\n+\t\t}\n+\t}\n+\treturn false;\n+}\n+\n+static void bnxt_find_first_valid_profile(struct bnxt *bp)\n+{\n+\tint i = 0;\n+\n+\tfor (i = BNXT_COS_QUEUE_COUNT - 1; i >= 0; i--) {\n+\t\tif (bp->tx_cos_queue[i].profile !=\n+\t\t    HWRM_QUEUE_SERVICE_PROFILE_UNKNOWN &&\n+\t\t    bp->tx_cos_queue[i].id !=\n+\t\t    HWRM_QUEUE_SERVICE_PROFILE_UNKNOWN) {\n+\t\t\tbp->tx_cosq_id[0] = bp->tx_cos_queue[i].id;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+}\n+\n int bnxt_hwrm_queue_qportcfg(struct bnxt *bp)\n {\n \tint rc = 0;\n@@ -1270,14 +1299,13 @@ int bnxt_hwrm_queue_qportcfg(struct bnxt *bp)\n \t\t\t\t\t\tbp->tx_cos_queue[i].id;\n \t\t\t}\n \t\t} else {\n-\t\t\tfor (i = BNXT_COS_QUEUE_COUNT - 1; i >= 0; i--) {\n-\t\t\t\tif (bp->tx_cos_queue[i].profile ==\n-\t\t\t\t\tHWRM_QUEUE_SERVICE_PROFILE_LOSSY) {\n-\t\t\t\t\tbp->tx_cosq_id[0] =\n-\t\t\t\t\t\tbp->tx_cos_queue[i].id;\n-\t\t\t\t\tbreak;\n-\t\t\t\t}\n-\t\t\t}\n+\t\t\t/* When CoS classification is disabled, for normal NIC\n+\t\t\t * operations, ideally we should look to use LOSSY.\n+\t\t\t * If not found, fallback to the first valid profile\n+\t\t\t */\n+\t\t\tif (!bnxt_find_lossy_profile(bp))\n+\t\t\t\tbnxt_find_first_valid_profile(bp);\n+\n \t\t}\n \t}\n \ndiff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h\nindex abe5de9..d8d1360 100644\n--- a/drivers/net/bnxt/bnxt_hwrm.h\n+++ b/drivers/net/bnxt/bnxt_hwrm.h\n@@ -35,6 +35,9 @@\n #define HWRM_QUEUE_SERVICE_PROFILE_LOSSY \\\n \tHWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LOSSY\n \n+#define HWRM_QUEUE_SERVICE_PROFILE_UNKNOWN \\\n+\tHWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_UNKNOWN\n+\n #define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MINIMAL_STATIC \\\n \tHWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESERVATION_STRATEGY_MINIMAL_STATIC\n #define HWRM_FUNC_RESOURCE_QCAPS_OUTPUT_VF_RESV_STRATEGY_MAXIMAL \\\n",
    "prefixes": [
        "2/6"
    ]
}