Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/77402/?format=api
http://patches.dpdk.org/api/patches/77402/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200911131954.15999-16-qi.z.zhang@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": "<20200911131954.15999-16-qi.z.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200911131954.15999-16-qi.z.zhang@intel.com", "date": "2020-09-11T13:19:29", "name": "[v2,15/40] net/ice/base: add AQ cmd 0X0A0A LLDP fltr control", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "d21df06287c3ccf8f3ae02981608cf076de50aae", "submitter": { "id": 504, "url": "http://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200911131954.15999-16-qi.z.zhang@intel.com/mbox/", "series": [ { "id": 12148, "url": "http://patches.dpdk.org/api/series/12148/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12148", "date": "2020-09-11T13:19:15", "name": "ice base code update", "version": 2, "mbox": "http://patches.dpdk.org/series/12148/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/77402/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/77402/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id A7437A04B7;\n\tFri, 11 Sep 2020 15:18:59 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 738431C1B6;\n\tFri, 11 Sep 2020 15:16:32 +0200 (CEST)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by dpdk.org (Postfix) with ESMTP id 3FE6F1C133\n for <dev@dpdk.org>; Fri, 11 Sep 2020 15:16:23 +0200 (CEST)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Sep 2020 06:16:22 -0700", "from dpdk51.sh.intel.com ([10.67.111.82])\n by FMSMGA003.fm.intel.com with ESMTP; 11 Sep 2020 06:16:21 -0700" ], "IronPort-SDR": [ "\n TxcRycSUusLUfH22BjWsSwIobW0BzYgJCVEFVlR0agVAHVtl5+D8dfeP3i4puJQZZ4hu4woTVs\n JTJVlA3ogdPQ==", "\n I4bhrcIQbCYHGgAM/2HWZfYK1gDnuuy+QQpG1IQMfwXnsizqTMVJ6P/KQ50sD+E44/5I/V7F6N\n 2+XLPk6dY7cw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9740\"; a=\"146482223\"", "E=Sophos;i=\"5.76,415,1592895600\"; d=\"scan'208\";a=\"146482223\"", "E=Sophos;i=\"5.76,415,1592895600\"; d=\"scan'208\";a=\"342296590\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Qi Zhang <qi.z.zhang@intel.com>", "To": "ferruh.yigit@intel.com", "Cc": "dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,\n Dave Ertman <david.m.ertman@intel.com>", "Date": "Fri, 11 Sep 2020 21:19:29 +0800", "Message-Id": "<20200911131954.15999-16-qi.z.zhang@intel.com>", "X-Mailer": "git-send-email 2.13.6", "In-Reply-To": "<20200911131954.15999-1-qi.z.zhang@intel.com>", "References": "<20200907112826.48493-1-qi.z.zhang@intel.com>\n <20200911131954.15999-1-qi.z.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 15/40] net/ice/base: add AQ cmd 0X0A0A LLDP\n\tfltr control", "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 <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": "As of NVM ver 1.7.1 there is a new AQ command to add and remove\nLLDP filters for Rx flow. This patch implements the support\nstructure to implement this functionality.\n\nSigned-off-by: Dave Ertman <david.m.ertman@intel.com>\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\nAcked-by: Qiming Yang <qiming.yang@intel.com>\n---\n drivers/net/ice/base/ice_common.c | 47 +++++++++++++++++++++++++++++++++++++++\n drivers/net/ice/base/ice_common.h | 3 +++\n drivers/net/ice/base/ice_type.h | 4 ++++\n 3 files changed, 54 insertions(+)", "diff": "diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c\nindex fdde85774..87dc9db43 100644\n--- a/drivers/net/ice/base/ice_common.c\n+++ b/drivers/net/ice/base/ice_common.c\n@@ -4799,3 +4799,50 @@ ice_aq_set_lldp_mib(struct ice_hw *hw, u8 mib_type, void *buf, u16 buf_size,\n \n \treturn ice_aq_send_cmd(hw, &desc, buf, buf_size, cd);\n }\n+\n+/**\n+ * ice_fw_supports_lldp_fltr - check NVM version supports lldp_fltr_ctrl\n+ * @hw: pointer to HW struct\n+ */\n+bool ice_fw_supports_lldp_fltr_ctrl(struct ice_hw *hw)\n+{\n+\tif (hw->mac_type != ICE_MAC_E810)\n+\t\treturn false;\n+\n+\tif (hw->api_maj_ver == ICE_FW_API_LLDP_FLTR_MAJ) {\n+\t\tif (hw->api_min_ver > ICE_FW_API_LLDP_FLTR_MIN)\n+\t\t\treturn true;\n+\t\tif (hw->api_min_ver == ICE_FW_API_LLDP_FLTR_MIN &&\n+\t\t hw->api_patch >= ICE_FW_API_LLDP_FLTR_PATCH)\n+\t\t\treturn true;\n+\t} else if (hw->api_maj_ver > ICE_FW_API_LLDP_FLTR_MAJ) {\n+\t\treturn true;\n+\t}\n+\treturn false;\n+}\n+\n+/**\n+ * ice_lldp_fltr_add_remove - add or remove a LLDP Rx switch filter\n+ * @hw: pointer to HW struct\n+ * @vsi_num: absolute HW index for VSI\n+ * @add: boolean for if adding or removing a filter\n+ */\n+enum ice_status\n+ice_lldp_fltr_add_remove(struct ice_hw *hw, u16 vsi_num, bool add)\n+{\n+\tstruct ice_aqc_lldp_filter_ctrl *cmd;\n+\tstruct ice_aq_desc desc;\n+\n+\tcmd = &desc.params.lldp_filter_ctrl;\n+\n+\tice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_lldp_filter_ctrl);\n+\n+\tif (add)\n+\t\tcmd->cmd_flags = ICE_AQC_LLDP_FILTER_ACTION_ADD;\n+\telse\n+\t\tcmd->cmd_flags = ICE_AQC_LLDP_FILTER_ACTION_DELETE;\n+\n+\tcmd->vsi_num = CPU_TO_LE16(vsi_num);\n+\n+\treturn ice_aq_send_cmd(hw, &desc, NULL, 0, NULL);\n+}\ndiff --git a/drivers/net/ice/base/ice_common.h b/drivers/net/ice/base/ice_common.h\nindex 1aea915ad..d176f7495 100644\n--- a/drivers/net/ice/base/ice_common.h\n+++ b/drivers/net/ice/base/ice_common.h\n@@ -223,4 +223,7 @@ ice_sched_query_elem(struct ice_hw *hw, u32 node_teid,\n enum ice_status\n ice_aq_set_lldp_mib(struct ice_hw *hw, u8 mib_type, void *buf, u16 buf_size,\n \t\t struct ice_sq_cd *cd);\n+bool ice_fw_supports_lldp_fltr_ctrl(struct ice_hw *hw);\n+enum ice_status\n+ice_lldp_fltr_add_remove(struct ice_hw *hw, u16 vsi_num, bool add);\n #endif /* _ICE_COMMON_H_ */\ndiff --git a/drivers/net/ice/base/ice_type.h b/drivers/net/ice/base/ice_type.h\nindex be6bdf9e7..c558a1cb0 100644\n--- a/drivers/net/ice/base/ice_type.h\n+++ b/drivers/net/ice/base/ice_type.h\n@@ -1122,4 +1122,8 @@ enum ice_sw_fwd_act_type {\n #define GLPCI_LBARCTRL_VF_PE_DB_SIZE_8KB 0x1\n #define GLPCI_LBARCTRL_VF_PE_DB_SIZE_64KB 0x2\n \n+/* AQ API version for LLDP_FILTER_CONTROL */\n+#define ICE_FW_API_LLDP_FLTR_MAJ\t1\n+#define ICE_FW_API_LLDP_FLTR_MIN\t7\n+#define ICE_FW_API_LLDP_FLTR_PATCH\t1\n #endif /* _ICE_TYPE_H_ */\n", "prefixes": [ "v2", "15/40" ] }{ "id": 77402, "url": "