get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 98561,
    "url": "http://patches.dpdk.org/api/patches/98561/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210910080821.18718-5-wenjun1.wu@intel.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": "<20210910080821.18718-5-wenjun1.wu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210910080821.18718-5-wenjun1.wu@intel.com",
    "date": "2021-09-10T08:08:18",
    "name": "[20.11,4/7] net/ice: fix error set of queue number",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "fb1c47c75fbdd5f0fe519be234a04e12061799c0",
    "submitter": {
        "id": 2083,
        "url": "http://patches.dpdk.org/api/people/2083/?format=api",
        "name": "Wenjun Wu",
        "email": "wenjun1.wu@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210910080821.18718-5-wenjun1.wu@intel.com/mbox/",
    "series": [
        {
            "id": 18824,
            "url": "http://patches.dpdk.org/api/series/18824/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=18824",
            "date": "2021-09-10T08:08:14",
            "name": "backport feature support to DPDK 20.11",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/18824/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/98561/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/98561/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 22A5BA0547;\n\tFri, 10 Sep 2021 10:27:20 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4BD5141125;\n\tFri, 10 Sep 2021 10:27:05 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n by mails.dpdk.org (Postfix) with ESMTP id B730A410E8\n for <dev@dpdk.org>; Fri, 10 Sep 2021 10:27:01 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 10 Sep 2021 01:26:59 -0700",
            "from wuwenjun.sh.intel.com ([10.67.110.178])\n by FMSMGA003.fm.intel.com with ESMTP; 10 Sep 2021 01:26:57 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10102\"; a=\"221060986\"",
            "E=Sophos;i=\"5.85,282,1624345200\"; d=\"scan'208\";a=\"221060986\"",
            "E=Sophos;i=\"5.85,282,1624345200\"; d=\"scan'208\";a=\"540346388\""
        ],
        "X-ExtLoop1": "1",
        "From": "Wenjun Wu <wenjun1.wu@intel.com>",
        "To": "dev@dpdk.org,\n\tqi.z.zhang@intel.com",
        "Cc": "Wenjun Wu <wenjun1.wu@intel.com>",
        "Date": "Fri, 10 Sep 2021 16:08:18 +0800",
        "Message-Id": "<20210910080821.18718-5-wenjun1.wu@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210910080821.18718-1-wenjun1.wu@intel.com>",
        "References": "<20210910080821.18718-1-wenjun1.wu@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 20.11 4/7] net/ice: fix error set of queue number",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This patch is not for LTS upstream, just for users to cherry-pick.\n\nThe queue number actually applied should be the maximum integer power\nof 2 less than or equal to min(vsi->nb_qps, ICE_MAX_Q_PER_TC), so we\nneed to get the most significant 1 bit. However the return value of\nfunction rte_bsf32 is the least significant 1 bit. This patch replaces\nthe function rte_bsf32 with the function rte_fls_u32 and adds\nnecessary boundary check.\n\nSigned-off-by: Wenjun Wu <wenjun1.wu@intel.com>\n---\n drivers/net/ice/ice_ethdev.c | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c\nindex 5a1e775718..ce98477427 100644\n--- a/drivers/net/ice/ice_ethdev.c\n+++ b/drivers/net/ice/ice_ethdev.c\n@@ -750,7 +750,7 @@ ice_vsi_config_tc_queue_mapping(struct ice_vsi *vsi,\n \t\t\t\tstruct ice_aqc_vsi_props *info,\n \t\t\t\tuint8_t enabled_tcmap)\n {\n-\tuint16_t bsf, qp_idx;\n+\tuint16_t fls, qp_idx;\n \n \t/* default tc 0 now. Multi-TC supporting need to be done later.\n \t * Configure TC and queue mapping parameters, for enabled TC,\n@@ -762,15 +762,15 @@ ice_vsi_config_tc_queue_mapping(struct ice_vsi *vsi,\n \t}\n \n \tvsi->nb_qps = RTE_MIN(vsi->nb_qps, ICE_MAX_Q_PER_TC);\n-\tbsf = rte_bsf32(vsi->nb_qps);\n+\tfls = (vsi->nb_qps == 0) ? 0 : rte_fls_u32(vsi->nb_qps) - 1;\n \t/* Adjust the queue number to actual queues that can be applied */\n-\tvsi->nb_qps = 0x1 << bsf;\n+\tvsi->nb_qps = (vsi->nb_qps == 0) ? 0 : 0x1 << fls;\n \n \tqp_idx = 0;\n \t/* Set tc and queue mapping with VSI */\n \tinfo->tc_mapping[0] = rte_cpu_to_le_16((qp_idx <<\n \t\t\t\t\t\tICE_AQ_VSI_TC_Q_OFFSET_S) |\n-\t\t\t\t\t       (bsf << ICE_AQ_VSI_TC_Q_NUM_S));\n+\t\t\t\t\t       (fls << ICE_AQ_VSI_TC_Q_NUM_S));\n \n \t/* Associate queue number with VSI */\n \tinfo->mapping_flags |= rte_cpu_to_le_16(ICE_AQ_VSI_Q_MAP_CONTIG);\n",
    "prefixes": [
        "20.11",
        "4/7"
    ]
}