get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54279,
    "url": "http://patches.dpdk.org/api/patches/54279/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190604054248.68510-4-leyi.rong@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": "<20190604054248.68510-4-leyi.rong@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190604054248.68510-4-leyi.rong@intel.com",
    "date": "2019-06-04T05:42:02",
    "name": "[03/49] net/ice/base: add API to configure MIB",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4fb226b097ce81b94f62c6373d352e581f1f2c42",
    "submitter": {
        "id": 1204,
        "url": "http://patches.dpdk.org/api/people/1204/?format=api",
        "name": "Leyi Rong",
        "email": "leyi.rong@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/20190604054248.68510-4-leyi.rong@intel.com/mbox/",
    "series": [
        {
            "id": 4879,
            "url": "http://patches.dpdk.org/api/series/4879/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4879",
            "date": "2019-06-04T05:41:59",
            "name": "shared code update",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4879/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54279/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/54279/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0341B1B9C6;\n\tTue,  4 Jun 2019 07:44:01 +0200 (CEST)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id C2EEE1B953\n\tfor <dev@dpdk.org>; Tue,  4 Jun 2019 07:43:55 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Jun 2019 22:43:55 -0700",
            "from lrong-srv-03.sh.intel.com ([10.67.119.177])\n\tby fmsmga008.fm.intel.com with ESMTP; 03 Jun 2019 22:43:54 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Leyi Rong <leyi.rong@intel.com>",
        "To": "qi.z.zhang@intel.com",
        "Cc": "dev@dpdk.org, Leyi Rong <leyi.rong@intel.com>,\n\tChinh T Cao <chinh.t.cao@intel.com>,\n\tDave Ertman <david.m.ertman@intel.com>,\n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>",
        "Date": "Tue,  4 Jun 2019 13:42:02 +0800",
        "Message-Id": "<20190604054248.68510-4-leyi.rong@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190604054248.68510-1-leyi.rong@intel.com>",
        "References": "<20190604054248.68510-1-leyi.rong@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 03/49] net/ice/base: add API to configure MIB",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add ice_cfg_lldp_mib_change and treat DCBx state NOT_STARTED as valid.\n\nSigned-off-by: Chinh T Cao <chinh.t.cao@intel.com>\nSigned-off-by: Dave Ertman <david.m.ertman@intel.com>\nSigned-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>\nSigned-off-by: Leyi Rong <leyi.rong@intel.com>\n---\n drivers/net/ice/base/ice_dcb.c | 41 +++++++++++++++++++++++++++++-----\n drivers/net/ice/base/ice_dcb.h |  3 ++-\n 2 files changed, 38 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_dcb.c b/drivers/net/ice/base/ice_dcb.c\nindex a7810578d..100c4bb0f 100644\n--- a/drivers/net/ice/base/ice_dcb.c\n+++ b/drivers/net/ice/base/ice_dcb.c\n@@ -927,10 +927,11 @@ enum ice_status ice_get_dcb_cfg(struct ice_port_info *pi)\n /**\n  * ice_init_dcb\n  * @hw: pointer to the HW struct\n+ * @enable_mib_change: enable MIB change event\n  *\n  * Update DCB configuration from the Firmware\n  */\n-enum ice_status ice_init_dcb(struct ice_hw *hw)\n+enum ice_status ice_init_dcb(struct ice_hw *hw, bool enable_mib_change)\n {\n \tstruct ice_port_info *pi = hw->port_info;\n \tenum ice_status ret = ICE_SUCCESS;\n@@ -944,7 +945,8 @@ enum ice_status ice_init_dcb(struct ice_hw *hw)\n \tpi->dcbx_status = ice_get_dcbx_status(hw);\n \n \tif (pi->dcbx_status == ICE_DCBX_STATUS_DONE ||\n-\t    pi->dcbx_status == ICE_DCBX_STATUS_IN_PROGRESS) {\n+\t    pi->dcbx_status == ICE_DCBX_STATUS_IN_PROGRESS ||\n+\t    pi->dcbx_status == ICE_DCBX_STATUS_NOT_STARTED) {\n \t\t/* Get current DCBX configuration */\n \t\tret = ice_get_dcb_cfg(pi);\n \t\tpi->is_sw_lldp = (hw->adminq.sq_last_status == ICE_AQ_RC_EPERM);\n@@ -952,13 +954,42 @@ enum ice_status ice_init_dcb(struct ice_hw *hw)\n \t\t\treturn ret;\n \t} else if (pi->dcbx_status == ICE_DCBX_STATUS_DIS) {\n \t\treturn ICE_ERR_NOT_READY;\n-\t} else if (pi->dcbx_status == ICE_DCBX_STATUS_MULTIPLE_PEERS) {\n \t}\n \n \t/* Configure the LLDP MIB change event */\n-\tret = ice_aq_cfg_lldp_mib_change(hw, true, NULL);\n+\tif (enable_mib_change) {\n+\t\tret = ice_aq_cfg_lldp_mib_change(hw, true, NULL);\n+\t\tif (!ret)\n+\t\t\tpi->is_sw_lldp = false;\n+\t}\n+\n+\treturn ret;\n+}\n+\n+/**\n+ * ice_cfg_lldp_mib_change\n+ * @hw: pointer to the HW struct\n+ * @ena_mib: enable/disable MIB change event\n+ *\n+ * Configure (disable/enable) MIB\n+ */\n+enum ice_status ice_cfg_lldp_mib_change(struct ice_hw *hw, bool ena_mib)\n+{\n+\tstruct ice_port_info *pi = hw->port_info;\n+\tenum ice_status ret;\n+\n+\tif (!hw->func_caps.common_cap.dcb)\n+\t\treturn ICE_ERR_NOT_SUPPORTED;\n+\n+\t/* Get DCBX status */\n+\tpi->dcbx_status = ice_get_dcbx_status(hw);\n+\n+\tif (pi->dcbx_status == ICE_DCBX_STATUS_DIS)\n+\t\treturn ICE_ERR_NOT_READY;\n+\n+\tret = ice_aq_cfg_lldp_mib_change(hw, ena_mib, NULL);\n \tif (!ret)\n-\t\tpi->is_sw_lldp = false;\n+\t\tpi->is_sw_lldp = !ena_mib;\n \n \treturn ret;\n }\ndiff --git a/drivers/net/ice/base/ice_dcb.h b/drivers/net/ice/base/ice_dcb.h\nindex d922c8a29..65d2bafef 100644\n--- a/drivers/net/ice/base/ice_dcb.h\n+++ b/drivers/net/ice/base/ice_dcb.h\n@@ -197,7 +197,7 @@ ice_aq_get_dcb_cfg(struct ice_hw *hw, u8 mib_type, u8 bridgetype,\n \t\t   struct ice_dcbx_cfg *dcbcfg);\n enum ice_status ice_get_dcb_cfg(struct ice_port_info *pi);\n enum ice_status ice_set_dcb_cfg(struct ice_port_info *pi);\n-enum ice_status ice_init_dcb(struct ice_hw *hw);\n+enum ice_status ice_init_dcb(struct ice_hw *hw, bool enable_mib_change);\n void ice_dcb_cfg_to_lldp(u8 *lldpmib, u16 *miblen, struct ice_dcbx_cfg *dcbcfg);\n enum ice_status\n ice_query_port_ets(struct ice_port_info *pi,\n@@ -217,6 +217,7 @@ enum ice_status ice_aq_start_lldp(struct ice_hw *hw, struct ice_sq_cd *cd);\n enum ice_status\n ice_aq_start_stop_dcbx(struct ice_hw *hw, bool start_dcbx_agent,\n \t\t       bool *dcbx_agent_status, struct ice_sq_cd *cd);\n+enum ice_status ice_cfg_lldp_mib_change(struct ice_hw *hw, bool ena_mib);\n enum ice_status\n ice_aq_cfg_lldp_mib_change(struct ice_hw *hw, bool ena_update,\n \t\t\t   struct ice_sq_cd *cd);\n",
    "prefixes": [
        "03/49"
    ]
}