Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/109391/?format=api
http://patches.dpdk.org/api/patches/109391/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220407105706.18889-40-kevinx.liu@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": "<20220407105706.18889-40-kevinx.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220407105706.18889-40-kevinx.liu@intel.com", "date": "2022-04-07T10:57:06", "name": "[39/39] net/ice: fix DCF reset", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "508629e59c9c03a142f952f9d9eefc7c041b80a9", "submitter": { "id": 2440, "url": "http://patches.dpdk.org/api/people/2440/?format=api", "name": "Kevin Liu", "email": "kevinx.liu@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/20220407105706.18889-40-kevinx.liu@intel.com/mbox/", "series": [ { "id": 22387, "url": "http://patches.dpdk.org/api/series/22387/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=22387", "date": "2022-04-07T10:56:27", "name": "support full function of DCF", "version": 1, "mbox": "http://patches.dpdk.org/series/22387/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/109391/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/109391/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 49097A0508;\n\tThu, 7 Apr 2022 05:02:06 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8D42C428E2;\n\tThu, 7 Apr 2022 05:00:03 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id EBA6D428E9\n for <dev@dpdk.org>; Thu, 7 Apr 2022 05:00:01 +0200 (CEST)", "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Apr 2022 20:00:01 -0700", "from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195])\n by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Apr 2022 19:59:59 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1649300402; x=1680836402;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=vZ1wK6tEwVCGfFyeyKkg16W2Djo88uHh23EhCqeAsCc=;\n b=HPyUNLBoUOyDKt5z8n65N0LisZhxHNagxw0nS60+oIrfKUkizLhbQeOW\n rQ7lCJUyfz1JTAfuciFP8O2AN+gVzHVDzVgETsHKKueQ/PSUDq6pocIqb\n omr2wKitkqrg2uGv3vqSK6EHcjNeRmPhxF+wxPcEejxtLUBufYpDTVfvF\n TpA901P77oXGUeLAHdJS5AouSD44q2d2kJD68Ivyel3hLmsCWBvMJOJES\n i09Obdwn3mB5znuiXhhFBPSkeFqxrPQAlSN/Wj0akqju44FR/iGN9S5ln\n fiTbjCiglUiLV4+YZ8SvGclj2mSPf40rKgoEtkncWyI7fJjPT/n77O1ST g==;", "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10309\"; a=\"248738523\"", "E=Sophos;i=\"5.90,241,1643702400\"; d=\"scan'208\";a=\"248738523\"", "E=Sophos;i=\"5.90,241,1643702400\"; d=\"scan'208\";a=\"570850893\"" ], "From": "Kevin Liu <kevinx.liu@intel.com>", "To": "dev@dpdk.org", "Cc": "qiming.yang@intel.com, qi.z.zhang@intel.com, stevex.yang@intel.com,\n Kevin Liu <kevinx.liu@intel.com>, Alvin Zhang <alvinx.zhang@intel.com>", "Subject": "[PATCH 39/39] net/ice: fix DCF reset", "Date": "Thu, 7 Apr 2022 10:57:06 +0000", "Message-Id": "<20220407105706.18889-40-kevinx.liu@intel.com>", "X-Mailer": "git-send-email 2.33.1", "In-Reply-To": "<20220407105706.18889-1-kevinx.liu@intel.com>", "References": "<20220407105706.18889-1-kevinx.liu@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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" }, "content": "After the PF triggers the VF reset, before the VF PMD can perform\nany operations on the hardware, it must reinitialize the all resources.\n\nThis patch adds a flag to indicate whether the VF has been reset by\nPF, and update the DCF resetting operations according to this flag.\n\nFixes: 1a86f4dbdf42 (\"net/ice: support DCF device reset\")\n\nSigned-off-by: Alvin Zhang <alvinx.zhang@intel.com>\nSigned-off-by: Kevin Liu <kevinx.liu@intel.com>\n---\n drivers/net/ice/base/ice_common.c | 4 +++-\n drivers/net/ice/ice_dcf.c | 2 +-\n drivers/net/ice/ice_dcf_ethdev.c | 17 ++++++++++++++++-\n drivers/net/ice/ice_dcf_parent.c | 3 +++\n 4 files changed, 23 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c\nindex 5d5ce894ff..530e766abf 100644\n--- a/drivers/net/ice/base/ice_common.c\n+++ b/drivers/net/ice/base/ice_common.c\n@@ -779,6 +779,7 @@ enum ice_status ice_init_fltr_mgmt_struct(struct ice_hw *hw)\n \tstatus = ice_init_def_sw_recp(hw, &hw->switch_info->recp_list);\n \tif (status) {\n \t\tice_free(hw, hw->switch_info);\n+\t\thw->switch_info = NULL;\n \t\treturn status;\n \t}\n \treturn ICE_SUCCESS;\n@@ -848,7 +849,6 @@ ice_cleanup_fltr_mgmt_single(struct ice_hw *hw, struct ice_switch_info *sw)\n \tice_rm_sw_replay_rule_info(hw, sw);\n \tice_free(hw, sw->buildin_recipes);\n \tice_free(hw, sw->recp_list);\n-\tice_free(hw, sw);\n }\n \n /**\n@@ -858,6 +858,8 @@ ice_cleanup_fltr_mgmt_single(struct ice_hw *hw, struct ice_switch_info *sw)\n void ice_cleanup_fltr_mgmt_struct(struct ice_hw *hw)\n {\n \tice_cleanup_fltr_mgmt_single(hw, hw->switch_info);\n+\tice_free(hw, hw->switch_info);\n+\thw->switch_info = NULL;\n }\n \n /**\ndiff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c\nindex 6b210176a0..dfd6d5ff64 100644\n--- a/drivers/net/ice/ice_dcf.c\n+++ b/drivers/net/ice/ice_dcf.c\n@@ -1430,7 +1430,7 @@ ice_dcf_cap_reset(struct rte_eth_dev *eth_dev, struct ice_dcf_hw *hw)\n \tint ret;\n \n \tstruct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);\n-\tstruct rte_intr_handle *intr_handle = &pci_dev->intr_handle;\n+\tstruct rte_intr_handle *intr_handle = pci_dev->intr_handle;\n \n \tice_dcf_disable_irq0(hw);\n \trte_intr_disable(intr_handle);\ndiff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c\nindex b5381cdfc4..e09570cd40 100644\n--- a/drivers/net/ice/ice_dcf_ethdev.c\n+++ b/drivers/net/ice/ice_dcf_ethdev.c\n@@ -1005,6 +1005,15 @@ dcf_add_del_mc_addr_list(struct ice_dcf_hw *hw,\n \tuint32_t i;\n \tint len, err = 0;\n \n+\tif (hw->resetting) {\n+\t\tif (!add)\n+\t\t\treturn 0;\n+\n+\t\tPMD_DRV_LOG(ERR,\n+\t\t\t \"fail to add multicast MACs for VF resetting\");\n+\t\treturn -EIO;\n+\t}\n+\n \tlen = sizeof(struct virtchnl_ether_addr_list);\n \tlen += sizeof(struct virtchnl_ether_addr) * mc_addrs_num;\n \n@@ -1643,7 +1652,13 @@ ice_dcf_dev_close(struct rte_eth_dev *dev)\n \tif (rte_eal_process_type() != RTE_PROC_PRIMARY)\n \t\treturn 0;\n \n-\t(void)ice_dcf_dev_stop(dev);\n+\tif (adapter->parent.pf.adapter_stopped)\n+\t\t(void)ice_dcf_dev_stop(dev);\n+\n+\tif (adapter->real_hw.resetting) {\n+\t\tice_dcf_uninit_hw(dev, &adapter->real_hw);\n+\t\tice_dcf_init_hw(dev, &adapter->real_hw);\n+\t}\n \n \tice_free_queues(dev);\n \ndiff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c\nindex 2aa69c7368..2a936bd2c1 100644\n--- a/drivers/net/ice/ice_dcf_parent.c\n+++ b/drivers/net/ice/ice_dcf_parent.c\n@@ -243,6 +243,9 @@ ice_dcf_handle_pf_event_msg(struct ice_dcf_hw *dcf_hw,\n \tcase VIRTCHNL_EVENT_RESET_IMPENDING:\n \t\tPMD_DRV_LOG(DEBUG, \"VIRTCHNL_EVENT_RESET_IMPENDING event\");\n \t\tdcf_hw->resetting = true;\n+\t\trte_eth_dev_callback_process(dcf_hw->eth_dev,\n+\t\t\t\t\t RTE_ETH_EVENT_INTR_RESET,\n+\t\t\t\t\t NULL);\n \t\tbreak;\n \tcase VIRTCHNL_EVENT_LINK_CHANGE:\n \t\tPMD_DRV_LOG(DEBUG, \"VIRTCHNL_EVENT_LINK_CHANGE event\");\n", "prefixes": [ "39/39" ] }{ "id": 109391, "url": "