get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1144210,
    "url": "http://patchwork.ozlabs.org/api/patches/1144210/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190808143938.4968-1-anthony.l.nguyen@intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20190808143938.4968-1-anthony.l.nguyen@intel.com>",
    "list_archive_url": null,
    "date": "2019-08-08T14:39:24",
    "name": "[S27,01/15] ice: Limit Max TCs on devices with more than 4 ports",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "c0e4010a717130f31e9447a2cf875acff57298b9",
    "submitter": {
        "id": 68875,
        "url": "http://patchwork.ozlabs.org/api/people/68875/?format=api",
        "name": "Tony Nguyen",
        "email": "anthony.l.nguyen@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190808143938.4968-1-anthony.l.nguyen@intel.com/mbox/",
    "series": [
        {
            "id": 124091,
            "url": "http://patchwork.ozlabs.org/api/series/124091/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=124091",
            "date": "2019-08-08T14:39:28",
            "name": "[S27,01/15] ice: Limit Max TCs on devices with more than 4 ports",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/124091/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1144210/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1144210/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com"
        ],
        "Received": [
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 464PDw2t5Kz9sMr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  9 Aug 2019 09:08:32 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 7F7598769E;\n\tThu,  8 Aug 2019 23:08:30 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id J1PJiqEthD6m; Thu,  8 Aug 2019 23:08:26 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 0C04B876B6;\n\tThu,  8 Aug 2019 23:08:25 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 6C9071BF9B6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  8 Aug 2019 23:08:20 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 67E938833E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  8 Aug 2019 23:08:20 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id ilhMIsKU3Gtb for <intel-wired-lan@lists.osuosl.org>;\n\tThu,  8 Aug 2019 23:08:17 +0000 (UTC)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id E6B42882FD\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  8 Aug 2019 23:08:16 +0000 (UTC)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Aug 2019 16:08:16 -0700",
            "from unknown (HELO localhost.jf.intel.com) ([10.166.244.174])\n\tby orsmga008.jf.intel.com with ESMTP; 08 Aug 2019 16:08:16 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.64,363,1559545200\"; d=\"scan'208\";a=\"169141826\"",
        "From": "Tony Nguyen <anthony.l.nguyen@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Thu,  8 Aug 2019 07:39:24 -0700",
        "Message-Id": "<20190808143938.4968-1-anthony.l.nguyen@intel.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH S27 01/15] ice: Limit Max TCs on devices\n\twith more than 4 ports",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "From: Usha Ketineni <usha.k.ketineni@intel.com>\n\nThis patch limits the max TCs set by the driver to the value provided by\nthe firmware as per the capabilities of the device. Otherwise, hardcoding\nto 8 TC max would fail the device configurations with more than 4 ports.\n\nSigned-off-by: Usha Ketineni <usha.k.ketineni@intel.com>\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice_adminq_cmd.h |  1 +\n drivers/net/ethernet/intel/ice/ice_common.c     | 12 ++++++++++++\n drivers/net/ethernet/intel/ice/ice_dcb_lib.c    | 10 ++++++++--\n drivers/net/ethernet/intel/ice/ice_type.h       |  3 +++\n 4 files changed, 24 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h\nindex 8ebc695171b6..4da0cde9695b 100644\n--- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h\n+++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h\n@@ -91,6 +91,7 @@ struct ice_aqc_list_caps_elem {\n #define ICE_AQC_CAPS_SRIOV\t\t\t\t0x0012\n #define ICE_AQC_CAPS_VF\t\t\t\t\t0x0013\n #define ICE_AQC_CAPS_VSI\t\t\t\t0x0017\n+#define ICE_AQC_CAPS_DCB\t\t\t\t0x0018\n #define ICE_AQC_CAPS_RSS\t\t\t\t0x0040\n #define ICE_AQC_CAPS_RXQS\t\t\t\t0x0041\n #define ICE_AQC_CAPS_TXQS\t\t\t\t0x0042\ndiff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c\nindex 0471698d9499..0d191716f97d 100644\n--- a/drivers/net/ethernet/intel/ice/ice_common.c\n+++ b/drivers/net/ethernet/intel/ice/ice_common.c\n@@ -1578,6 +1578,18 @@ ice_parse_caps(struct ice_hw *hw, void *buf, u32 cap_count,\n \t\t\t\t\t  prefix, func_p->guar_num_vsi);\n \t\t\t}\n \t\t\tbreak;\n+\t\tcase ICE_AQC_CAPS_DCB:\n+\t\t\tcaps->dcb = (number == 1);\n+\t\t\tcaps->active_tc_bitmap = logical_id;\n+\t\t\tcaps->maxtc = phys_id;\n+\t\t\tice_debug(hw, ICE_DBG_INIT,\n+\t\t\t\t  \"%s: DCB = %d\\n\", prefix, caps->dcb);\n+\t\t\tice_debug(hw, ICE_DBG_INIT,\n+\t\t\t\t  \"%s: active TC bitmap = %d\\n\", prefix,\n+\t\t\t\t  caps->active_tc_bitmap);\n+\t\t\tice_debug(hw, ICE_DBG_INIT,\n+\t\t\t\t  \"%s: TC max = %d\\n\", prefix, caps->maxtc);\n+\t\t\tbreak;\n \t\tcase ICE_AQC_CAPS_RSS:\n \t\t\tcaps->rss_table_size = number;\n \t\t\tcaps->rss_table_entry_width = logical_id;\ndiff --git a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c\nindex 34c9d1e01529..e65b87f26828 100644\n--- a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c\n+++ b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c\n@@ -418,7 +418,7 @@ static int ice_dcb_sw_dflt_cfg(struct ice_pf *pf, bool locked)\n \tmemset(&pi->local_dcbx_cfg, 0, sizeof(*dcbcfg));\n \n \tdcbcfg->etscfg.willing = 1;\n-\tdcbcfg->etscfg.maxtcs = 8;\n+\tdcbcfg->etscfg.maxtcs = hw->func_caps.common_cap.maxtc;\n \tdcbcfg->etscfg.tcbwtable[0] = 100;\n \tdcbcfg->etscfg.tsatable[0] = ICE_IEEE_TSA_ETS;\n \n@@ -427,7 +427,7 @@ static int ice_dcb_sw_dflt_cfg(struct ice_pf *pf, bool locked)\n \tdcbcfg->etsrec.willing = 0;\n \n \tdcbcfg->pfc.willing = 1;\n-\tdcbcfg->pfc.pfccap = IEEE_8021QAZ_MAX_TCS;\n+\tdcbcfg->pfc.pfccap = hw->func_caps.common_cap.maxtc;\n \n \tdcbcfg->numapps = 1;\n \tdcbcfg->app[0].selector = ICE_APP_SEL_ETHTYPE;\n@@ -459,6 +459,9 @@ int ice_init_pf_dcb(struct ice_pf *pf, bool locked)\n \terr = ice_init_dcb(hw);\n \tif (err) {\n \t\t/* FW LLDP is disabled, activate SW DCBX/LLDP mode */\n+\t\tdev_info(&pf->pdev->dev,\n+\t\t\t \"DCB is enabled in the hardware, max number of TCs supported on this port are %d\\n\",\n+\t\t\t pf->hw.func_caps.common_cap.maxtc);\n \t\tdev_info(&pf->pdev->dev,\n \t\t\t \"FW LLDP is disabled, DCBx/LLDP in SW mode.\\n\");\n \t\tport_info->is_sw_lldp = true;\n@@ -489,6 +492,9 @@ int ice_init_pf_dcb(struct ice_pf *pf, bool locked)\n \tif (err)\n \t\tgoto dcb_init_err;\n \n+\tdev_info(&pf->pdev->dev,\n+\t\t \"DCB is enabled in the hardware, max number of TCs supported on this port are %d\\n\",\n+\t\t pf->hw.func_caps.common_cap.maxtc);\n \tdev_info(&pf->pdev->dev, \"DCBX offload supported\\n\");\n \treturn err;\n \ndiff --git a/drivers/net/ethernet/intel/ice/ice_type.h b/drivers/net/ethernet/intel/ice/ice_type.h\nindex 40b028e73234..4501d50a7dcc 100644\n--- a/drivers/net/ethernet/intel/ice/ice_type.h\n+++ b/drivers/net/ethernet/intel/ice/ice_type.h\n@@ -139,6 +139,9 @@ struct ice_phy_info {\n /* Common HW capabilities for SW use */\n struct ice_hw_common_caps {\n \tu32 valid_functions;\n+\t/* DCB capabilities */\n+\tu32 active_tc_bitmap;\n+\tu32 maxtc;\n \n \t/* Tx/Rx queues */\n \tu16 num_rxq;\t\t/* Number/Total Rx queues */\n",
    "prefixes": [
        "S27",
        "01/15"
    ]
}