get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54693,
    "url": "http://patches.dpdk.org/api/patches/54693/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190611155221.2703-35-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": "<20190611155221.2703-35-leyi.rong@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190611155221.2703-35-leyi.rong@intel.com",
    "date": "2019-06-11T15:51:49",
    "name": "[v2,34/66] net/ice/base: implement LLDP persistent settings",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "aa5976f85107cb80e32beca828ef89e17aeae442",
    "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/20190611155221.2703-35-leyi.rong@intel.com/mbox/",
    "series": [
        {
            "id": 4981,
            "url": "http://patches.dpdk.org/api/series/4981/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4981",
            "date": "2019-06-11T15:51:15",
            "name": "shared code update",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/4981/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54693/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/54693/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 5FE821C56D;\n\tTue, 11 Jun 2019 17:55:00 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 0191A1BF01\n\tfor <dev@dpdk.org>; Tue, 11 Jun 2019 17:54:19 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Jun 2019 08:54:19 -0700",
            "from lrong-srv-03.sh.intel.com ([10.67.119.177])\n\tby orsmga001.jf.intel.com with ESMTP; 11 Jun 2019 08:54:18 -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\tJaroslaw Ilgiewicz <jaroslaw.ilgiewicz@intel.com>,\n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>",
        "Date": "Tue, 11 Jun 2019 23:51:49 +0800",
        "Message-Id": "<20190611155221.2703-35-leyi.rong@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190611155221.2703-1-leyi.rong@intel.com>",
        "References": "<20190604054248.68510-1-leyi.rong@intel.com>\n\t<20190611155221.2703-1-leyi.rong@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 34/66] net/ice/base: implement LLDP persistent\n\tsettings",
        "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": "This patch implements persistent, across reboots, start and stop\nof LLDP agent. Added additional function parameter to\nice_aq_start_lldp and ice_aq_stop_lldp.\n\nSigned-off-by: Jaroslaw Ilgiewicz <jaroslaw.ilgiewicz@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 | 33 ++++++++++++++++++++++-----------\n drivers/net/ice/base/ice_dcb.h |  9 ++++-----\n drivers/net/ice/ice_ethdev.c   |  2 +-\n 3 files changed, 27 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_dcb.c b/drivers/net/ice/base/ice_dcb.c\nindex 100c4bb0f..008c7a110 100644\n--- a/drivers/net/ice/base/ice_dcb.c\n+++ b/drivers/net/ice/base/ice_dcb.c\n@@ -83,12 +83,14 @@ ice_aq_cfg_lldp_mib_change(struct ice_hw *hw, bool ena_update,\n  * @hw: pointer to the HW struct\n  * @shutdown_lldp_agent: True if LLDP Agent needs to be Shutdown\n  *\t\t\t False if LLDP Agent needs to be Stopped\n+ * @persist: True if Stop/Shutdown of LLDP Agent needs to be persistent across\n+ *\t     reboots\n  * @cd: pointer to command details structure or NULL\n  *\n  * Stop or Shutdown the embedded LLDP Agent (0x0A05)\n  */\n enum ice_status\n-ice_aq_stop_lldp(struct ice_hw *hw, bool shutdown_lldp_agent,\n+ice_aq_stop_lldp(struct ice_hw *hw, bool shutdown_lldp_agent, bool persist,\n \t\t struct ice_sq_cd *cd)\n {\n \tstruct ice_aqc_lldp_stop *cmd;\n@@ -101,17 +103,22 @@ ice_aq_stop_lldp(struct ice_hw *hw, bool shutdown_lldp_agent,\n \tif (shutdown_lldp_agent)\n \t\tcmd->command |= ICE_AQ_LLDP_AGENT_SHUTDOWN;\n \n+\tif (persist)\n+\t\tcmd->command |= ICE_AQ_LLDP_AGENT_PERSIST_DIS;\n+\n \treturn ice_aq_send_cmd(hw, &desc, NULL, 0, cd);\n }\n \n /**\n  * ice_aq_start_lldp\n  * @hw: pointer to the HW struct\n+ * @persist: True if Start of LLDP Agent needs to be persistent across reboots\n  * @cd: pointer to command details structure or NULL\n  *\n  * Start the embedded LLDP Agent on all ports. (0x0A06)\n  */\n-enum ice_status ice_aq_start_lldp(struct ice_hw *hw, struct ice_sq_cd *cd)\n+enum ice_status\n+ice_aq_start_lldp(struct ice_hw *hw, bool persist, struct ice_sq_cd *cd)\n {\n \tstruct ice_aqc_lldp_start *cmd;\n \tstruct ice_aq_desc desc;\n@@ -122,6 +129,9 @@ enum ice_status ice_aq_start_lldp(struct ice_hw *hw, struct ice_sq_cd *cd)\n \n \tcmd->command = ICE_AQ_LLDP_AGENT_START;\n \n+\tif (persist)\n+\t\tcmd->command |= ICE_AQ_LLDP_AGENT_PERSIST_ENA;\n+\n \treturn ice_aq_send_cmd(hw, &desc, NULL, 0, cd);\n }\n \n@@ -615,7 +625,8 @@ ice_parse_org_tlv(struct ice_lldp_org_tlv *tlv, struct ice_dcbx_cfg *dcbcfg)\n  *\n  * Parse DCB configuration from the LLDPDU\n  */\n-enum ice_status ice_lldp_to_dcb_cfg(u8 *lldpmib, struct ice_dcbx_cfg *dcbcfg)\n+enum ice_status\n+ice_lldp_to_dcb_cfg(u8 *lldpmib, struct ice_dcbx_cfg *dcbcfg)\n {\n \tstruct ice_lldp_org_tlv *tlv;\n \tenum ice_status ret = ICE_SUCCESS;\n@@ -659,7 +670,7 @@ enum ice_status ice_lldp_to_dcb_cfg(u8 *lldpmib, struct ice_dcbx_cfg *dcbcfg)\n /**\n  * ice_aq_get_dcb_cfg\n  * @hw: pointer to the HW struct\n- * @mib_type: mib type for the query\n+ * @mib_type: MIB type for the query\n  * @bridgetype: bridge type for the query (remote)\n  * @dcbcfg: store for LLDPDU data\n  *\n@@ -690,13 +701,13 @@ ice_aq_get_dcb_cfg(struct ice_hw *hw, u8 mib_type, u8 bridgetype,\n }\n \n /**\n- * ice_aq_start_stop_dcbx - Start/Stop DCBx service in FW\n+ * ice_aq_start_stop_dcbx - Start/Stop DCBX service in FW\n  * @hw: pointer to the HW struct\n- * @start_dcbx_agent: True if DCBx Agent needs to be started\n- *\t\t      False if DCBx Agent needs to be stopped\n- * @dcbx_agent_status: FW indicates back the DCBx agent status\n- *\t\t       True if DCBx Agent is active\n- *\t\t       False if DCBx Agent is stopped\n+ * @start_dcbx_agent: True if DCBX Agent needs to be started\n+ *\t\t      False if DCBX Agent needs to be stopped\n+ * @dcbx_agent_status: FW indicates back the DCBX agent status\n+ *\t\t       True if DCBX Agent is active\n+ *\t\t       False if DCBX Agent is stopped\n  * @cd: pointer to command details structure or NULL\n  *\n  * Start/Stop the embedded dcbx Agent. In case that this wrapper function\n@@ -1236,7 +1247,7 @@ ice_add_dcb_tlv(struct ice_lldp_org_tlv *tlv, struct ice_dcbx_cfg *dcbcfg,\n /**\n  * ice_dcb_cfg_to_lldp - Convert DCB configuration to MIB format\n  * @lldpmib: pointer to the HW struct\n- * @miblen: length of LLDP mib\n+ * @miblen: length of LLDP MIB\n  * @dcbcfg: Local store which holds the DCB Config\n  *\n  * Convert the DCB configuration to MIB format\ndiff --git a/drivers/net/ice/base/ice_dcb.h b/drivers/net/ice/base/ice_dcb.h\nindex 65d2bafef..47127096b 100644\n--- a/drivers/net/ice/base/ice_dcb.h\n+++ b/drivers/net/ice/base/ice_dcb.h\n@@ -114,7 +114,6 @@ struct ice_lldp_org_tlv {\n \t__be32 ouisubtype;\n \tu8 tlvinfo[1];\n };\n-\n #pragma pack()\n \n struct ice_cee_tlv_hdr {\n@@ -147,7 +146,6 @@ struct ice_cee_app_prio {\n \t__be16 lower_oui;\n \tu8 prio_map;\n };\n-\n #pragma pack()\n \n /* TODO: The below structures related LLDP/DCBX variables\n@@ -190,8 +188,8 @@ enum ice_status\n ice_aq_get_cee_dcb_cfg(struct ice_hw *hw,\n \t\t       struct ice_aqc_get_cee_dcb_cfg_resp *buff,\n \t\t       struct ice_sq_cd *cd);\n-u8 ice_get_dcbx_status(struct ice_hw *hw);\n enum ice_status ice_lldp_to_dcb_cfg(u8 *lldpmib, struct ice_dcbx_cfg *dcbcfg);\n+u8 ice_get_dcbx_status(struct ice_hw *hw);\n enum ice_status\n ice_aq_get_dcb_cfg(struct ice_hw *hw, u8 mib_type, u8 bridgetype,\n \t\t   struct ice_dcbx_cfg *dcbcfg);\n@@ -211,9 +209,10 @@ enum ice_status\n ice_update_port_tc_tree_cfg(struct ice_port_info *pi,\n \t\t\t    struct ice_aqc_port_ets_elem *buf);\n enum ice_status\n-ice_aq_stop_lldp(struct ice_hw *hw, bool shutdown_lldp_agent,\n+ice_aq_stop_lldp(struct ice_hw *hw, bool shutdown_lldp_agent, bool persist,\n \t\t struct ice_sq_cd *cd);\n-enum ice_status ice_aq_start_lldp(struct ice_hw *hw, struct ice_sq_cd *cd);\n+enum ice_status\n+ice_aq_start_lldp(struct ice_hw *hw, bool persist, 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);\ndiff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c\nindex 962d506a1..b14bc7102 100644\n--- a/drivers/net/ice/ice_ethdev.c\n+++ b/drivers/net/ice/ice_ethdev.c\n@@ -1447,7 +1447,7 @@ ice_dev_init(struct rte_eth_dev *dev)\n \t/* Disable double vlan by default */\n \tice_vsi_config_double_vlan(vsi, FALSE);\n \n-\tret = ice_aq_stop_lldp(hw, TRUE, NULL);\n+\tret = ice_aq_stop_lldp(hw, TRUE, FALSE, NULL);\n \tif (ret != ICE_SUCCESS)\n \t\tPMD_INIT_LOG(DEBUG, \"lldp has already stopped\\n\");\n \n",
    "prefixes": [
        "v2",
        "34/66"
    ]
}