get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 135031,
    "url": "http://patches.dpdk.org/api/patches/135031/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231211171109.89716-5-ajit.khaparde@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": "<20231211171109.89716-5-ajit.khaparde@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231211171109.89716-5-ajit.khaparde@broadcom.com",
    "date": "2023-12-11T17:10:59",
    "name": "[v3,04/14] net/bnxt: use the correct COS queue for Tx",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "edf425b254a98445b1dc88e0ceb90510a338bcb5",
    "submitter": {
        "id": 501,
        "url": "http://patches.dpdk.org/api/people/501/?format=api",
        "name": "Ajit Khaparde",
        "email": "ajit.khaparde@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/20231211171109.89716-5-ajit.khaparde@broadcom.com/mbox/",
    "series": [
        {
            "id": 30511,
            "url": "http://patches.dpdk.org/api/series/30511/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30511",
            "date": "2023-12-11T17:10:55",
            "name": "support new 5760X P7 devices",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/30511/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/135031/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/135031/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id F3F77436C8;\n\tMon, 11 Dec 2023 18:11:51 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 64F0442D96;\n\tMon, 11 Dec 2023 18:11:30 +0100 (CET)",
            "from mail-qk1-f176.google.com (mail-qk1-f176.google.com\n [209.85.222.176])\n by mails.dpdk.org (Postfix) with ESMTP id 0BD9142D96\n for <dev@dpdk.org>; Mon, 11 Dec 2023 18:11:29 +0100 (CET)",
            "by mail-qk1-f176.google.com with SMTP id\n af79cd13be357-77f3c4914e5so252681985a.3\n for <dev@dpdk.org>; Mon, 11 Dec 2023 09:11:28 -0800 (PST)",
            "from C02GC2QQMD6T.wifi.broadcom.net ([192.19.223.252])\n by smtp.gmail.com with ESMTPSA id\n qz16-20020a05620a8c1000b0077efdfbd730sm3094581qkn.34.2023.12.11.09.11.25\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 11 Dec 2023 09:11:26 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=broadcom.com; s=google; t=1702314688; x=1702919488; darn=dpdk.org;\n h=mime-version:references:in-reply-to:message-id:date:subject:cc:to\n :from:from:to:cc:subject:date:message-id:reply-to;\n bh=TJQrFf1wqELfrzUcAHqojml3xW6Mxws8imFhGIFOEEw=;\n b=ZaFEDkFA5+l9IcoKw6p2m9uGSVuVa3WWcvb56UXm2oWW67By392CjhnqXESknbrFbG\n hY8VdYq9kzK696SJktsBcx56xkVf1sARNk6z8eZq2GgkwQQqmZWiMqicEhDL9jbu5mU+\n PQ0lelHI4LUo17Nk2ZqduJWk0A+y97LIAMBl4=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1702314688; x=1702919488;\n h=mime-version:references:in-reply-to:message-id:date:subject:cc:to\n :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n bh=TJQrFf1wqELfrzUcAHqojml3xW6Mxws8imFhGIFOEEw=;\n b=ovWqr1GRhNF79EthNIPcPP+1SFlO/iPaFLMFAHGWhgbT5beIc2JlovzzPCg0v/bUFg\n qrS8CL9mVQ/LqV8c9CuY87D8gNGl/P3serDOPaY+VkknLjcMrLh1y61PHR5kyuf/vzEb\n U+hlJ5g/3+/Ag8L2Shrf0iYtvkx0kYxPxwvMHl9FLP+fk7QamkO5DRmpbyoyDBs39JSd\n MFlcxWkfzhtrGC6XZe7iGS/Zj88t3Bd7P53UuGB+YmlV59eZdXJ5R9i2B4YZRcUgORaw\n EjxsDNrxvuejmdgptX0HvAw4WyJq9ELr+b9dbUcR2qKD6/INHdExKEayjile15qk30Dv\n EkeQ==",
        "X-Gm-Message-State": "AOJu0YzrKeKAy3/goaipDVx8KEwU31aGwkdNXoo6BBFPwwkiGhwHzcRm\n eX1nngogN4+v1iNbmKMEIU/HceRGFVpqr72sBpC2fAx+s1WShPN35i7k9xIB0ALhpgCvNIovL4p\n fPPdMfnYQ8rBdJqP3TSW6wBAW0BmhCaqse2tUm8BD3XN+rpg/x19q+sMfoqnpbKEuqlDm",
        "X-Google-Smtp-Source": "\n AGHT+IF72AqYaORbrOe1DO8au6d9kg/LrWCDFckFsQ59fx9ezAlM4jjypEbGNXvHMjwsFXsh8jnYmw==",
        "X-Received": "by 2002:a05:620a:63c4:b0:77e:fba3:4f40 with SMTP id\n pw4-20020a05620a63c400b0077efba34f40mr7026683qkn.150.1702314687893;\n Mon, 11 Dec 2023 09:11:27 -0800 (PST)",
        "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "Somnath Kotur <somnath.kotur@broadcom.com>",
        "Subject": "[PATCH v3 04/14] net/bnxt: use the correct COS queue for Tx",
        "Date": "Mon, 11 Dec 2023 09:10:59 -0800",
        "Message-Id": "<20231211171109.89716-5-ajit.khaparde@broadcom.com>",
        "X-Mailer": "git-send-email 2.39.2 (Apple Git-143)",
        "In-Reply-To": "<20231211171109.89716-1-ajit.khaparde@broadcom.com>",
        "References": "<20231211171109.89716-1-ajit.khaparde@broadcom.com>",
        "MIME-Version": "1.0",
        "Content-Type": "multipart/signed; protocol=\"application/pkcs7-signature\";\n micalg=sha-256; boundary=\"0000000000004a1ba6060c3f0601\"",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "Earlier the firmware was configuring single lossy COS profiles for Tx.\nBut now more than one profiles is possible.\nIdentify the profile a NIC driver should use based on the profile type\nhint provided in queue_cfg_info.\n\nIf the firmware does not set the bit to use profile type,\nthen we will use the older method to pick the COS queue for Tx.\n\nSigned-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\nReviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>\n---\n drivers/net/bnxt/bnxt.h      |  1 +\n drivers/net/bnxt/bnxt_hwrm.c | 56 ++++++++++++++++++++++++++++++++++--\n drivers/net/bnxt/bnxt_hwrm.h |  7 +++++\n 3 files changed, 62 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h\nindex 0e01b1d4ba..542ef13f7c 100644\n--- a/drivers/net/bnxt/bnxt.h\n+++ b/drivers/net/bnxt/bnxt.h\n@@ -311,6 +311,7 @@ struct bnxt_link_info {\n struct bnxt_cos_queue_info {\n \tuint8_t\tid;\n \tuint8_t\tprofile;\n+\tuint8_t\tprofile_type;\n };\n \n struct rte_flow {\ndiff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c\nindex 0a31b984e6..fe9e629892 100644\n--- a/drivers/net/bnxt/bnxt_hwrm.c\n+++ b/drivers/net/bnxt/bnxt_hwrm.c\n@@ -1544,7 +1544,7 @@ int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp)\n \treturn 0;\n }\n \n-static bool bnxt_find_lossy_profile(struct bnxt *bp)\n+static bool _bnxt_find_lossy_profile(struct bnxt *bp)\n {\n \tint i = 0;\n \n@@ -1558,6 +1558,41 @@ static bool bnxt_find_lossy_profile(struct bnxt *bp)\n \treturn false;\n }\n \n+static bool _bnxt_find_lossy_nic_profile(struct bnxt *bp)\n+{\n+\tint i = 0, j = 0;\n+\n+\tfor (i = 0; i < BNXT_COS_QUEUE_COUNT; i++) {\n+\t\tfor (j = 0; j < BNXT_COS_QUEUE_COUNT; j++) {\n+\t\t\tif (bp->tx_cos_queue[i].profile ==\n+\t\t\t    HWRM_QUEUE_SERVICE_PROFILE_LOSSY &&\n+\t\t\t    bp->tx_cos_queue[j].profile_type ==\n+\t\t\t    HWRM_QUEUE_SERVICE_PROFILE_TYPE_NIC) {\n+\t\t\t\tbp->tx_cosq_id[0] = bp->tx_cos_queue[i].id;\n+\t\t\t\treturn true;\n+\t\t\t}\n+\t\t}\n+\t}\n+\treturn false;\n+}\n+\n+static bool bnxt_find_lossy_profile(struct bnxt *bp, bool use_prof_type)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < BNXT_COS_QUEUE_COUNT; i++) {\n+\t\tPMD_DRV_LOG(DEBUG, \"profile %d, profile_id %d, type %d\\n\",\n+\t\t\t    bp->tx_cos_queue[i].profile,\n+\t\t\t    bp->tx_cos_queue[i].id,\n+\t\t\t    bp->tx_cos_queue[i].profile_type);\n+\t}\n+\n+\tif (use_prof_type)\n+\t\treturn _bnxt_find_lossy_nic_profile(bp);\n+\telse\n+\t\treturn _bnxt_find_lossy_profile(bp);\n+}\n+\n static void bnxt_find_first_valid_profile(struct bnxt *bp)\n {\n \tint i = 0;\n@@ -1579,6 +1614,7 @@ int bnxt_hwrm_queue_qportcfg(struct bnxt *bp)\n \tstruct hwrm_queue_qportcfg_input req = {.req_type = 0 };\n \tstruct hwrm_queue_qportcfg_output *resp = bp->hwrm_cmd_resp_addr;\n \tuint32_t dir = HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH_TX;\n+\tbool use_prof_type = false;\n \tint i;\n \n get_rx_info:\n@@ -1590,10 +1626,15 @@ int bnxt_hwrm_queue_qportcfg(struct bnxt *bp)\n \t    !(bp->vnic_cap_flags & BNXT_VNIC_CAP_COS_CLASSIFY))\n \t\treq.drv_qmap_cap =\n \t\t\tHWRM_QUEUE_QPORTCFG_INPUT_DRV_QMAP_CAP_ENABLED;\n+\n \trc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);\n \n \tHWRM_CHECK_RESULT();\n \n+\tif (resp->queue_cfg_info &\n+\t    HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_CFG_INFO_USE_PROFILE_TYPE)\n+\t\tuse_prof_type = true;\n+\n \tif (dir == HWRM_QUEUE_QPORTCFG_INPUT_FLAGS_PATH_TX) {\n \t\tGET_TX_QUEUE_INFO(0);\n \t\tGET_TX_QUEUE_INFO(1);\n@@ -1603,6 +1644,16 @@ int bnxt_hwrm_queue_qportcfg(struct bnxt *bp)\n \t\tGET_TX_QUEUE_INFO(5);\n \t\tGET_TX_QUEUE_INFO(6);\n \t\tGET_TX_QUEUE_INFO(7);\n+\t\tif (use_prof_type) {\n+\t\t\tGET_TX_QUEUE_TYPE_INFO(0);\n+\t\t\tGET_TX_QUEUE_TYPE_INFO(1);\n+\t\t\tGET_TX_QUEUE_TYPE_INFO(2);\n+\t\t\tGET_TX_QUEUE_TYPE_INFO(3);\n+\t\t\tGET_TX_QUEUE_TYPE_INFO(4);\n+\t\t\tGET_TX_QUEUE_TYPE_INFO(5);\n+\t\t\tGET_TX_QUEUE_TYPE_INFO(6);\n+\t\t\tGET_TX_QUEUE_TYPE_INFO(7);\n+\t\t}\n \t} else  {\n \t\tGET_RX_QUEUE_INFO(0);\n \t\tGET_RX_QUEUE_INFO(1);\n@@ -1636,11 +1687,12 @@ int bnxt_hwrm_queue_qportcfg(struct bnxt *bp)\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\tif (!bnxt_find_lossy_profile(bp, use_prof_type))\n \t\t\t\tbnxt_find_first_valid_profile(bp);\n \n \t\t}\n \t}\n+\tPMD_DRV_LOG(DEBUG, \"Tx COS Queue ID %d\\n\", bp->tx_cosq_id[0]);\n \n \tbp->max_tc = resp->max_configurable_queues;\n \tbp->max_lltc = resp->max_configurable_lossless_queues;\ndiff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h\nindex 68384bc757..f9fa6cf73a 100644\n--- a/drivers/net/bnxt/bnxt_hwrm.h\n+++ b/drivers/net/bnxt/bnxt_hwrm.h\n@@ -46,6 +46,9 @@ struct hwrm_func_qstats_output;\n #define HWRM_QUEUE_SERVICE_PROFILE_UNKNOWN \\\n \tHWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_UNKNOWN\n \n+#define HWRM_QUEUE_SERVICE_PROFILE_TYPE_NIC \\\n+\tHWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_TYPE_NIC\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@@ -74,6 +77,10 @@ struct hwrm_func_qstats_output;\n \tbp->tx_cos_queue[x].profile =\t\\\n \t\tresp->queue_id##x##_service_profile\n \n+#define GET_TX_QUEUE_TYPE_INFO(x) \\\n+\tbp->tx_cos_queue[x].profile_type =\t\\\n+\t\tresp->queue_id##x##_service_profile_type\n+\n #define GET_RX_QUEUE_INFO(x) \\\n \tbp->rx_cos_queue[x].id = resp->queue_id##x; \\\n \tbp->rx_cos_queue[x].profile =\t\\\n",
    "prefixes": [
        "v3",
        "04/14"
    ]
}