get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64090,
    "url": "http://patchwork.dpdk.org/api/patches/64090/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20191221022937.54397-3-ajit.khaparde@broadcom.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20191221022937.54397-3-ajit.khaparde@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191221022937.54397-3-ajit.khaparde@broadcom.com",
    "date": "2019-12-21T02:29:37",
    "name": "[v2,2/5] net/bnxt: fix to use first valid profile",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "769008a6b5812ba6a36215ee9162274cf732b4e3",
    "submitter": {
        "id": 501,
        "url": "http://patchwork.dpdk.org/api/people/501/?format=api",
        "name": "Ajit Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "delegate": {
        "id": 1766,
        "url": "http://patchwork.dpdk.org/api/users/1766/?format=api",
        "username": "ajitkhaparde",
        "first_name": "Ajit",
        "last_name": "Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20191221022937.54397-3-ajit.khaparde@broadcom.com/mbox/",
    "series": [
        {
            "id": 7924,
            "url": "http://patchwork.dpdk.org/api/series/7924/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=7924",
            "date": "2019-12-21T02:29:37",
            "name": null,
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/7924/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/64090/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/64090/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 0A9C8A04F8;\n\tSat, 21 Dec 2019 03:31:23 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E559E1BE3D;\n\tSat, 21 Dec 2019 03:31:18 +0100 (CET)",
            "from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com\n [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id CEC675B3C;\n Sat, 21 Dec 2019 03:31:17 +0100 (CET)",
            "from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net\n [10.75.242.48])\n by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id F422330C54B;\n Fri, 20 Dec 2019 18:26:16 -0800 (PST)",
            "from localhost.localdomain (unknown [10.230.30.124])\n by mail-irv-17.broadcom.com (Postfix) with ESMTP id 5C374140069;\n Fri, 20 Dec 2019 18:31:16 -0800 (PST)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com F422330C54B",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com;\n s=dkimrelay; t=1576895177;\n bh=7Gexiwwk4EVT2C2p1+T20cKdwscqD+Ft2sDFPj7avMo=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=SIxZazLTF+P0MrmWNGB/jmQTmUBGo5xJmaFNj80lRl3I3LqSwm4HuxOnmbKjdIHw/\n kM7e65fwzoxmm4d86Qr3gpoRgFb3TpReyqaEcV+w5UFY5ka9bKZygGSSrEwbujPK+k\n NdiOZidKFFHFPq7ft0dK2VZj0rPEKmhevgtpEpy0=",
        "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com, Somnath Kotur <somnath.kotur@broadcom.com>,\n stable@dpdk.org",
        "Date": "Fri, 20 Dec 2019 18:29:37 -0800",
        "Message-Id": "<20191221022937.54397-3-ajit.khaparde@broadcom.com>",
        "X-Mailer": "git-send-email 2.21.0 (Apple Git-122.2)",
        "In-Reply-To": "<20191217041755.29232-1-somnath.kotur@broadcom.com>",
        "References": "<20191217041755.29232-1-somnath.kotur@broadcom.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 2/5] net/bnxt: fix to use first valid profile",
        "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": "From: Somnath Kotur <somnath.kotur@broadcom.com>\n\nIn 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: 698aa7e95325 (\"net/bnxt: add code to determine the Tx COS queue\")\nCc: stable@dpdk.org\n\nSigned-off-by: Somnath Kotur <somnath.kotur@broadcom.com>\nReviewed-by: Ajit 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 d0dcd561c..bee4c154f 100644\n--- a/drivers/net/bnxt/bnxt_hwrm.c\n+++ b/drivers/net/bnxt/bnxt_hwrm.c\n@@ -1210,6 +1210,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@@ -1269,14 +1298,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 abe5de9db..d8d1360f9 100644\n--- a/drivers/net/bnxt/bnxt_hwrm.h\n+++ b/drivers/net/bnxt/bnxt_hwrm.h\n@@ -35,6 +35,9 @@ struct bnxt_cp_ring_info;\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": [
        "v2",
        "2/5"
    ]
}