Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1049830/?format=api
{ "id": 1049830, "url": "http://patchwork.ozlabs.org/api/patches/1049830/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190228232432.31659-6-anirudh.venkataramanan@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": "<20190228232432.31659-6-anirudh.venkataramanan@intel.com>", "list_archive_url": null, "date": "2019-02-28T23:24:26", "name": "[S16,05/11] ice: Add code to process LLDP MIB change events", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "dac84c08f318e1395eacfa2475d89afb34a0fd95", "submitter": { "id": 73601, "url": "http://patchwork.ozlabs.org/api/people/73601/?format=api", "name": "Anirudh Venkataramanan", "email": "anirudh.venkataramanan@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/20190228232432.31659-6-anirudh.venkataramanan@intel.com/mbox/", "series": [ { "id": 94827, "url": "http://patchwork.ozlabs.org/api/series/94827/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=94827", "date": "2019-02-28T23:24:26", "name": null, "version": 1, "mbox": "http://patchwork.ozlabs.org/series/94827/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1049830/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1049830/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.133; helo=hemlock.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 hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\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 449TCs577jz9s4V\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 1 Mar 2019 10:24:39 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id DDFCF877E4;\n\tThu, 28 Feb 2019 23:24:37 +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 2jX3jKRkqGZX; Thu, 28 Feb 2019 23:24:36 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id CDD228786C;\n\tThu, 28 Feb 2019 23:24:36 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id E25CE1BF410\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 28 Feb 2019 23:24:35 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id DFFB7877E2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 28 Feb 2019 23:24:35 +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 MW+UE3l30FlG for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 28 Feb 2019 23:24:35 +0000 (UTC)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 40842879A3\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 28 Feb 2019 23:24:35 +0000 (UTC)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t28 Feb 2019 15:24:34 -0800", "from shasta.jf.intel.com ([10.166.241.11])\n\tby FMSMGA003.fm.intel.com with ESMTP; 28 Feb 2019 15:24:34 -0800" ], "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.58,425,1544515200\"; d=\"scan'208\";a=\"137127723\"", "From": "Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 28 Feb 2019 15:24:26 -0800", "Message-Id": "<20190228232432.31659-6-anirudh.venkataramanan@intel.com>", "X-Mailer": "git-send-email 2.14.5", "In-Reply-To": "<20190228232432.31659-1-anirudh.venkataramanan@intel.com>", "References": "<20190228232432.31659-1-anirudh.venkataramanan@intel.com>", "Subject": "[Intel-wired-lan] [PATCH S16 05/11] ice: Add code to process LLDP\n\tMIB change events", "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>", "MIME-Version": "1.0", "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": "This patch adds support to process LLDP MIB change notifications sent\nby the firmware.\n\nSigned-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice_dcb.c | 5 ++--\n drivers/net/ethernet/intel/ice/ice_dcb.h | 2 ++\n drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 36 ++++++++++++++++++++++++++++\n drivers/net/ethernet/intel/ice/ice_dcb_lib.h | 4 ++++\n drivers/net/ethernet/intel/ice/ice_main.c | 3 +++\n 5 files changed, 47 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_dcb.c b/drivers/net/ethernet/intel/ice/ice_dcb.c\nindex 1ad36b40974a..ff8267f84c8c 100644\n--- a/drivers/net/ethernet/intel/ice/ice_dcb.c\n+++ b/drivers/net/ethernet/intel/ice/ice_dcb.c\n@@ -588,8 +588,7 @@ 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-static enum ice_status\n-ice_lldp_to_dcb_cfg(u8 *lldpmib, struct ice_dcbx_cfg *dcbcfg)\n+enum ice_status 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 = 0;\n@@ -871,7 +870,7 @@ ice_get_ieee_or_cee_dcb_cfg(struct ice_port_info *pi, u8 dcbx_mode)\n *\n * Get DCB configuration from the Firmware\n */\n-static enum ice_status ice_get_dcb_cfg(struct ice_port_info *pi)\n+enum ice_status ice_get_dcb_cfg(struct ice_port_info *pi)\n {\n \tstruct ice_aqc_get_cee_dcb_cfg_resp cee_cfg;\n \tstruct ice_dcbx_cfg *dcbx_cfg;\ndiff --git a/drivers/net/ethernet/intel/ice/ice_dcb.h b/drivers/net/ethernet/intel/ice/ice_dcb.h\nindex 03e310a679f0..5e2b67ee1131 100644\n--- a/drivers/net/ethernet/intel/ice/ice_dcb.h\n+++ b/drivers/net/ethernet/intel/ice/ice_dcb.h\n@@ -121,6 +121,8 @@ struct ice_cee_app_prio {\n } __packed;\n \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+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\ndiff --git a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c\nindex 67b3fab74f7a..bb9c282ee35e 100644\n--- a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c\n+++ b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c\n@@ -320,3 +320,39 @@ int ice_init_pf_dcb(struct ice_pf *pf)\n \tdev_err(dev, \"DCB init failed\\n\");\n \treturn err;\n }\n+\n+/**\n+ * ice_dcb_process_lldp_set_mib_change - Process MIB change\n+ * @pf: ptr to ice_pf\n+ * @event: pointer to the admin queue receive event\n+ */\n+void\n+ice_dcb_process_lldp_set_mib_change(struct ice_pf *pf,\n+\t\t\t\t struct ice_rq_event_info *event)\n+{\n+\tif (pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) {\n+\t\tstruct ice_dcbx_cfg *dcbcfg, *prev_cfg;\n+\t\tint err;\n+\n+\t\tprev_cfg = &pf->hw.port_info->local_dcbx_cfg;\n+\t\tdcbcfg = devm_kmemdup(&pf->pdev->dev, prev_cfg,\n+\t\t\t\t sizeof(*dcbcfg), GFP_KERNEL);\n+\t\tif (!dcbcfg)\n+\t\t\treturn;\n+\n+\t\terr = ice_lldp_to_dcb_cfg(event->msg_buf, dcbcfg);\n+\t\tif (!err)\n+\t\t\tice_pf_dcb_cfg(pf, dcbcfg);\n+\n+\t\tdevm_kfree(&pf->pdev->dev, dcbcfg);\n+\n+\t\t/* Get updated DCBx data from firmware */\n+\t\terr = ice_get_dcb_cfg(pf->hw.port_info);\n+\t\tif (err)\n+\t\t\tdev_err(&pf->pdev->dev,\n+\t\t\t\t\"Failed to get DCB config\\n\");\n+\t} else {\n+\t\tdev_dbg(&pf->pdev->dev,\n+\t\t\t\"MIB Change Event in HOST mode\\n\");\n+\t}\n+}\ndiff --git a/drivers/net/ethernet/intel/ice/ice_dcb_lib.h b/drivers/net/ethernet/intel/ice/ice_dcb_lib.h\nindex 1c60bf4ca593..a2e42f85fa55 100644\n--- a/drivers/net/ethernet/intel/ice/ice_dcb_lib.h\n+++ b/drivers/net/ethernet/intel/ice/ice_dcb_lib.h\n@@ -11,6 +11,9 @@\n u8 ice_dcb_get_ena_tc(struct ice_dcbx_cfg *dcbcfg);\n u8 ice_dcb_get_num_tc(struct ice_dcbx_cfg *dcbcfg);\n int ice_init_pf_dcb(struct ice_pf *pf);\n+void\n+ice_dcb_process_lldp_set_mib_change(struct ice_pf *pf,\n+\t\t\t\t struct ice_rq_event_info *event);\n #else\n static inline u8 ice_dcb_get_ena_tc(struct ice_dcbx_cfg __always_unused *dcbcfg)\n {\n@@ -28,5 +31,6 @@ static inline int ice_init_pf_dcb(struct ice_pf *pf)\n \treturn -EOPNOTSUPP;\n }\n \n+#define ice_dcb_process_lldp_set_mib_change(pf, event) do {} while (0)\n #endif /* CONFIG_DCB */\n #endif /* _ICE_DCB_LIB_H_ */\ndiff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex 158339769097..9b58f156ceee 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -936,6 +936,9 @@ static int __ice_clean_ctrlq(struct ice_pf *pf, enum ice_ctl_q q_type)\n \t\tcase ice_aqc_opc_fw_logging:\n \t\t\tice_output_fw_log(hw, &event.desc, event.msg_buf);\n \t\t\tbreak;\n+\t\tcase ice_aqc_opc_lldp_set_mib_change:\n+\t\t\tice_dcb_process_lldp_set_mib_change(pf, &event);\n+\t\t\tbreak;\n \t\tdefault:\n \t\t\tdev_dbg(&pf->pdev->dev,\n \t\t\t\t\"%s Receive Queue unknown event 0x%04x ignored\\n\",\n", "prefixes": [ "S16", "05/11" ] }