Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/71325/?format=api
http://patches.dpdk.org/api/patches/71325/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200612032410.20864-2-guinanx.sun@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": "<20200612032410.20864-2-guinanx.sun@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200612032410.20864-2-guinanx.sun@intel.com", "date": "2020-06-12T03:23:50", "name": "[01/21] net/ixgbe/base: clear VFMBMEM and toggle VF's Tx queues", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "6563abd07712cb83088e0b7b49cd16b2ce45407f", "submitter": { "id": 1476, "url": "http://patches.dpdk.org/api/people/1476/?format=api", "name": "Guinan Sun", "email": "guinanx.sun@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/20200612032410.20864-2-guinanx.sun@intel.com/mbox/", "series": [ { "id": 10428, "url": "http://patches.dpdk.org/api/series/10428/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10428", "date": "2020-06-12T03:23:49", "name": "update ixgbe base code", "version": 1, "mbox": "http://patches.dpdk.org/series/10428/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/71325/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/71325/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 15615A00BE;\n\tFri, 12 Jun 2020 05:46:15 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D7DE55B3A;\n\tFri, 12 Jun 2020 05:46:11 +0200 (CEST)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by dpdk.org (Postfix) with ESMTP id 3FCAA49E0\n for <dev@dpdk.org>; Fri, 12 Jun 2020 05:46:06 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Jun 2020 20:46:05 -0700", "from intel.sh.intel.com ([10.239.255.18])\n by orsmga002.jf.intel.com with ESMTP; 11 Jun 2020 20:46:04 -0700" ], "IronPort-SDR": [ "\n LUkid1B3kCSsUY0UdU9K6qhOpgh/VNsyLJBqeuA5nBTyuXvPXBQvaESpCHesD3hi4HMYutCe+W\n K9XbvRqUrRJA==", "\n mFsa1ryH2gGeLmh7GLXnPWMtdeIZQwmM5U+RMNHr1iJBQOyWpNAgb0g+6OimQwyp8l4YrBY0M+\n EsY6oU9YaYnA==" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.73,501,1583222400\"; d=\"scan'208\";a=\"289759462\"", "From": "Guinan Sun <guinanx.sun@intel.com>", "To": "dev@dpdk.org", "Cc": "Guinan Sun <guinanx.sun@intel.com>,\n Piotr Pietruszewski <piotr.pietruszewski@intel.com>", "Date": "Fri, 12 Jun 2020 03:23:50 +0000", "Message-Id": "<20200612032410.20864-2-guinanx.sun@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200612032410.20864-1-guinanx.sun@intel.com>", "References": "<20200612032410.20864-1-guinanx.sun@intel.com>", "Subject": "[dpdk-dev] [PATCH 01/21] net/ixgbe/base: clear VFMBMEM and toggle\n\tVF's Tx queues", "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": "Add a method to clear VFMBMEM memory.\nAdd a method to toggle VF's TX queues as workaround\nfor silicon errata.\n\nSigned-off-by: Piotr Pietruszewski <piotr.pietruszewski@intel.com>\nSigned-off-by: Guinan Sun <guinanx.sun@intel.com>\n---\n drivers/net/ixgbe/base/ixgbe_api.c | 13 +++++++\n drivers/net/ixgbe/base/ixgbe_api.h | 1 +\n drivers/net/ixgbe/base/ixgbe_common.c | 56 +++++++++++++++++++++++++++\n drivers/net/ixgbe/base/ixgbe_common.h | 1 +\n drivers/net/ixgbe/base/ixgbe_mbx.c | 43 ++++++++++++++++++++\n drivers/net/ixgbe/base/ixgbe_mbx.h | 1 +\n drivers/net/ixgbe/base/ixgbe_type.h | 2 +\n 7 files changed, 117 insertions(+)", "diff": "diff --git a/drivers/net/ixgbe/base/ixgbe_api.c b/drivers/net/ixgbe/base/ixgbe_api.c\nindex 0a22df3d0..9e4763a64 100644\n--- a/drivers/net/ixgbe/base/ixgbe_api.c\n+++ b/drivers/net/ixgbe/base/ixgbe_api.c\n@@ -1101,6 +1101,19 @@ s32 ixgbe_set_vlvf(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on,\n \t\t\t IXGBE_NOT_IMPLEMENTED);\n }\n \n+/**\n+ * ixgbe_toggle_txdctl - Toggle VF's queues\n+ * @hw: pointer to hardware structure\n+ * @vind: VMDq pool index\n+ *\n+ * Enable and disable each queue in VF.\n+ */\n+s32 ixgbe_toggle_txdctl(struct ixgbe_hw *hw, u32 vind)\n+{\n+\treturn ixgbe_call_func(hw, hw->mac.ops.toggle_txdctl, (hw,\n+\t\t\t vind), IXGBE_NOT_IMPLEMENTED);\n+}\n+\n /**\n * ixgbe_fc_enable - Enable flow control\n * @hw: pointer to hardware structure\ndiff --git a/drivers/net/ixgbe/base/ixgbe_api.h b/drivers/net/ixgbe/base/ixgbe_api.h\nindex 33e7c3c21..be26317c5 100644\n--- a/drivers/net/ixgbe/base/ixgbe_api.h\n+++ b/drivers/net/ixgbe/base/ixgbe_api.h\n@@ -101,6 +101,7 @@ s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan,\n s32 ixgbe_set_vlvf(struct ixgbe_hw *hw, u32 vlan, u32 vind,\n \t\t bool vlan_on, u32 *vfta_delta, u32 vfta,\n \t\t bool vlvf_bypass);\n+s32 ixgbe_toggle_txdctl(struct ixgbe_hw *hw, u32 vind);\n s32 ixgbe_fc_enable(struct ixgbe_hw *hw);\n s32 ixgbe_setup_fc(struct ixgbe_hw *hw);\n s32 ixgbe_set_fw_drv_ver(struct ixgbe_hw *hw, u8 maj, u8 min, u8 build,\ndiff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c\nindex 4eb98dc19..36c003844 100644\n--- a/drivers/net/ixgbe/base/ixgbe_common.c\n+++ b/drivers/net/ixgbe/base/ixgbe_common.c\n@@ -103,6 +103,7 @@ s32 ixgbe_init_ops_generic(struct ixgbe_hw *hw)\n \tmac->ops.init_uta_tables = NULL;\n \tmac->ops.enable_rx = ixgbe_enable_rx_generic;\n \tmac->ops.disable_rx = ixgbe_disable_rx_generic;\n+\tmac->ops.toggle_txdctl = ixgbe_toggle_txdctl_generic;\n \n \t/* Flow Control */\n \tmac->ops.fc_enable = ixgbe_fc_enable_generic;\n@@ -4103,6 +4104,61 @@ s32 ixgbe_clear_vfta_generic(struct ixgbe_hw *hw)\n \treturn IXGBE_SUCCESS;\n }\n \n+/**\n+ * ixgbe_toggle_txdctl_generic - Toggle VF's queues\n+ * @hw: pointer to hardware structure\n+ * @vf_number: VF index\n+ *\n+ * Enable and disable each queue in VF.\n+ */\n+s32 ixgbe_toggle_txdctl_generic(struct ixgbe_hw *hw, u32 vf_number)\n+{\n+\tu8 queue_count, i;\n+\tu32 offset, reg;\n+\n+\tif (vf_number > 63)\n+\t\treturn IXGBE_ERR_PARAM;\n+\n+\t/*\n+\t * Determine number of queues by checking\n+\t * number of virtual functions\n+\t */\n+\treg = IXGBE_READ_REG(hw, IXGBE_GCR_EXT);\n+\tswitch (reg & IXGBE_GCR_EXT_VT_MODE_MASK) {\n+\tcase IXGBE_GCR_EXT_VT_MODE_64:\n+\t\tqueue_count = 2;\n+\t\tbreak;\n+\tcase IXGBE_GCR_EXT_VT_MODE_32:\n+\t\tqueue_count = 4;\n+\t\tbreak;\n+\tcase IXGBE_GCR_EXT_VT_MODE_16:\n+\t\tqueue_count = 8;\n+\t\tbreak;\n+\tdefault:\n+\t\treturn IXGBE_ERR_CONFIG;\n+\t}\n+\n+\t/* Toggle queues */\n+\tfor (i = 0; i < queue_count; ++i) {\n+\t\t/* Calculate offset of current queue */\n+\t\toffset = queue_count * vf_number + i;\n+\n+\t\t/* Enable queue */\n+\t\treg = IXGBE_READ_REG(hw, IXGBE_PVFTXDCTL(offset));\n+\t\treg |= IXGBE_TXDCTL_ENABLE;\n+\t\tIXGBE_WRITE_REG(hw, IXGBE_PVFTXDCTL(offset), reg);\n+\t\tIXGBE_WRITE_FLUSH(hw);\n+\n+\t\t/* Disable queue */\n+\t\treg = IXGBE_READ_REG(hw, IXGBE_PVFTXDCTL(offset));\n+\t\treg &= ~IXGBE_TXDCTL_ENABLE;\n+\t\tIXGBE_WRITE_REG(hw, IXGBE_PVFTXDCTL(offset), reg);\n+\t\tIXGBE_WRITE_FLUSH(hw);\n+\t}\n+\n+\treturn IXGBE_SUCCESS;\n+}\n+\n /**\n * ixgbe_need_crosstalk_fix - Determine if we need to do cross talk fix\n * @hw: pointer to hardware structure\ndiff --git a/drivers/net/ixgbe/base/ixgbe_common.h b/drivers/net/ixgbe/base/ixgbe_common.h\nindex 7a31f088c..1d4839a62 100644\n--- a/drivers/net/ixgbe/base/ixgbe_common.h\n+++ b/drivers/net/ixgbe/base/ixgbe_common.h\n@@ -111,6 +111,7 @@ s32 ixgbe_set_vlvf_generic(struct ixgbe_hw *hw, u32 vlan, u32 vind,\n \t\t\t bool vlvf_bypass);\n s32 ixgbe_clear_vfta_generic(struct ixgbe_hw *hw);\n s32 ixgbe_find_vlvf_slot(struct ixgbe_hw *hw, u32 vlan, bool vlvf_bypass);\n+s32 ixgbe_toggle_txdctl_generic(struct ixgbe_hw *hw, u32 vind);\n \n s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw,\n \t\t\t ixgbe_link_speed *speed,\ndiff --git a/drivers/net/ixgbe/base/ixgbe_mbx.c b/drivers/net/ixgbe/base/ixgbe_mbx.c\nindex 13bdb5f68..3d1c1669f 100644\n--- a/drivers/net/ixgbe/base/ixgbe_mbx.c\n+++ b/drivers/net/ixgbe/base/ixgbe_mbx.c\n@@ -117,6 +117,26 @@ s32 ixgbe_check_for_rst(struct ixgbe_hw *hw, u16 mbx_id)\n \treturn ret_val;\n }\n \n+/**\n+ * ixgbe_clear_mbx - Clear Mailbox Memory\n+ * @hw: pointer to the HW structure\n+ * @vf_number: id of mailbox to write\n+ *\n+ * Set VFMBMEM of given VF to 0x0.\n+ **/\n+s32 ixgbe_clear_mbx(struct ixgbe_hw *hw, u16 vf_number)\n+{\n+\tstruct ixgbe_mbx_info *mbx = &hw->mbx;\n+\ts32 ret_val = IXGBE_SUCCESS;\n+\n+\tDEBUGFUNC(\"ixgbe_clear_mbx\");\n+\n+\tif (mbx->ops.clear)\n+\t\tret_val = mbx->ops.clear(hw, vf_number);\n+\n+\treturn ret_val;\n+}\n+\n /**\n * ixgbe_poll_for_msg - Wait for message notification\n * @hw: pointer to the HW structure\n@@ -486,6 +506,7 @@ void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw)\n \tmbx->ops.check_for_msg = ixgbe_check_for_msg_vf;\n \tmbx->ops.check_for_ack = ixgbe_check_for_ack_vf;\n \tmbx->ops.check_for_rst = ixgbe_check_for_rst_vf;\n+\tmbx->ops.clear = NULL;\n \n \tmbx->stats.msgs_tx = 0;\n \tmbx->stats.msgs_rx = 0;\n@@ -702,6 +723,27 @@ STATIC s32 ixgbe_read_mbx_pf(struct ixgbe_hw *hw, u32 *msg, u16 size,\n \treturn ret_val;\n }\n \n+/**\n+ * ixgbe_clear_mbx_pf - Clear Mailbox Memory\n+ * @hw: pointer to the HW structure\n+ * @vf_number: the VF index\n+ *\n+ * Set VFMBMEM of given VF to 0x0.\n+ **/\n+STATIC s32 ixgbe_clear_mbx_pf(struct ixgbe_hw *hw, u16 vf_number)\n+{\n+\tu16 mbx_size = hw->mbx.size;\n+\tu16 i;\n+\n+\tif (vf_number > 63)\n+\t\treturn IXGBE_ERR_PARAM;\n+\n+\tfor (i = 0; i < mbx_size; ++i)\n+\t\tIXGBE_WRITE_REG_ARRAY(hw, IXGBE_PFMBMEM(vf_number), i, 0x0);\n+\n+\treturn IXGBE_SUCCESS;\n+}\n+\n /**\n * ixgbe_init_mbx_params_pf - set initial values for pf mailbox\n * @hw: pointer to the HW structure\n@@ -731,6 +773,7 @@ void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw)\n \tmbx->ops.check_for_msg = ixgbe_check_for_msg_pf;\n \tmbx->ops.check_for_ack = ixgbe_check_for_ack_pf;\n \tmbx->ops.check_for_rst = ixgbe_check_for_rst_pf;\n+\tmbx->ops.clear = ixgbe_clear_mbx_pf;\n \n \tmbx->stats.msgs_tx = 0;\n \tmbx->stats.msgs_rx = 0;\ndiff --git a/drivers/net/ixgbe/base/ixgbe_mbx.h b/drivers/net/ixgbe/base/ixgbe_mbx.h\nindex 1a45e49c2..962a44705 100644\n--- a/drivers/net/ixgbe/base/ixgbe_mbx.h\n+++ b/drivers/net/ixgbe/base/ixgbe_mbx.h\n@@ -129,6 +129,7 @@ s32 ixgbe_write_posted_mbx(struct ixgbe_hw *, u32 *, u16, u16);\n s32 ixgbe_check_for_msg(struct ixgbe_hw *, u16);\n s32 ixgbe_check_for_ack(struct ixgbe_hw *, u16);\n s32 ixgbe_check_for_rst(struct ixgbe_hw *, u16);\n+s32 ixgbe_clear_mbx(struct ixgbe_hw *hw, u16 vf_number);\n void ixgbe_init_mbx_ops_generic(struct ixgbe_hw *hw);\n void ixgbe_init_mbx_params_vf(struct ixgbe_hw *);\n void ixgbe_init_mbx_params_pf(struct ixgbe_hw *);\ndiff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h\nindex 15e937010..0470b1dfc 100644\n--- a/drivers/net/ixgbe/base/ixgbe_type.h\n+++ b/drivers/net/ixgbe/base/ixgbe_type.h\n@@ -3997,6 +3997,7 @@ struct ixgbe_mac_operations {\n \ts32 (*init_uta_tables)(struct ixgbe_hw *);\n \tvoid (*set_mac_anti_spoofing)(struct ixgbe_hw *, bool, int);\n \tvoid (*set_vlan_anti_spoofing)(struct ixgbe_hw *, bool, int);\n+\ts32 (*toggle_txdctl)(struct ixgbe_hw *hw, u32 vf_index);\n \ts32 (*update_xcast_mode)(struct ixgbe_hw *, int);\n \ts32 (*set_rlpml)(struct ixgbe_hw *, u16);\n \n@@ -4155,6 +4156,7 @@ struct ixgbe_mbx_operations {\n \ts32 (*check_for_msg)(struct ixgbe_hw *, u16);\n \ts32 (*check_for_ack)(struct ixgbe_hw *, u16);\n \ts32 (*check_for_rst)(struct ixgbe_hw *, u16);\n+\ts32 (*clear)(struct ixgbe_hw *hw, u16 vf_number);\n };\n \n struct ixgbe_mbx_stats {\n", "prefixes": [ "01/21" ] }{ "id": 71325, "url": "