Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/28973/?format=api
http://patches.dpdk.org/api/patches/28973/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1505873529-64121-1-git-send-email-wei.dai@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": "<1505873529-64121-1-git-send-email-wei.dai@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1505873529-64121-1-git-send-email-wei.dai@intel.com", "date": "2017-09-20T02:12:09", "name": "[dpdk-dev,v4] net/i40e: fix mirror rule reset when port is stopped", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "06c7aea5a229fce31d75fe1c60ca5043ecda4760", "submitter": { "id": 490, "url": "http://patches.dpdk.org/api/people/490/?format=api", "name": "Wei Dai", "email": "wei.dai@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1505873529-64121-1-git-send-email-wei.dai@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/28973/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/28973/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 7212037B7;\n\tWed, 20 Sep 2017 04:24:43 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id C2A4A239;\n\tWed, 20 Sep 2017 04:24:41 +0200 (CEST)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Sep 2017 19:24:40 -0700", "from dpdk6.bj.intel.com ([172.16.182.87])\n\tby fmsmga005.fm.intel.com with ESMTP; 19 Sep 2017 19:24:39 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.42,420,1500966000\"; d=\"scan'208\";a=\"153341284\"", "From": "Wei Dai <wei.dai@intel.com>", "To": "jingjing.wu@intel.com,\n\tbeilei.xing@intel.com", "Cc": "dev@dpdk.org,\n\tWei Dai <wei.dai@intel.com>,\n\tstable@dpdk.org", "Date": "Wed, 20 Sep 2017 10:12:09 +0800", "Message-Id": "<1505873529-64121-1-git-send-email-wei.dai@intel.com>", "X-Mailer": "git-send-email 2.7.5", "In-Reply-To": "<1505872770-63412-1-git-send-email-wei.dai@intel.com>", "References": "<1505872770-63412-1-git-send-email-wei.dai@intel.com>", "Subject": "[dpdk-dev] [PATCH v4] net/i40e: fix mirror rule reset when port is\n\tstopped", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "When an i40e PF port is stopped, all mirror rules should be removed.\nAll rule related software and hardware resources should also be\nremoved.\n\nFixes: a4def5edf0fc (\"i40e: enable port mirroring\")\nCc: stable@dpdk.org\n\nSigned-off-by: Wei Dai <wei.dai@intel.com>\nTested-by: Lijuan Tu <lijuanx.a.tu@intel.com>\n---\n drivers/net/i40e/i40e_ethdev.c | 25 ++++++++++++++++++++++---\n 1 file changed, 22 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex f12aefa..99f2486 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -361,6 +361,12 @@ static int i40e_dev_sync_phy_type(struct i40e_hw *hw);\n static void i40e_configure_registers(struct i40e_hw *hw);\n static void i40e_hw_init(struct rte_eth_dev *dev);\n static int i40e_config_qinq(struct i40e_hw *hw, struct i40e_vsi *vsi);\n+static enum i40e_status_code i40e_aq_del_mirror_rule(struct i40e_hw *hw,\n+\t\t\t\t\t\t uint16_t seid,\n+\t\t\t\t\t\t uint16_t rule_type,\n+\t\t\t\t\t\t uint16_t *entries,\n+\t\t\t\t\t\t uint16_t count,\n+\t\t\t\t\t\t uint16_t rule_id);\n static int i40e_mirror_rule_set(struct rte_eth_dev *dev,\n \t\t\tstruct rte_eth_mirror_conf *mirror_conf,\n \t\t\tuint8_t sw_id, uint8_t on);\n@@ -2069,6 +2075,7 @@ i40e_dev_stop(struct rte_eth_dev *dev)\n \tstruct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(dev);\n \tstruct rte_intr_handle *intr_handle = &pci_dev->intr_handle;\n \tint i;\n+\tint ret;\n \n \tif (hw->adapter_stopped == 1)\n \t\treturn;\n@@ -2096,10 +2103,22 @@ i40e_dev_stop(struct rte_eth_dev *dev)\n \n \t/* Remove all mirror rules */\n \twhile ((p_mirror = TAILQ_FIRST(&pf->mirror_list))) {\n-\t\tTAILQ_REMOVE(&pf->mirror_list, p_mirror, rules);\n-\t\trte_free(p_mirror);\n+\t\tret = i40e_aq_del_mirror_rule(hw,\n+\t\t\t\t\t pf->main_vsi->veb->seid,\n+\t\t\t\t\t p_mirror->rule_type,\n+\t\t\t\t\t p_mirror->entries,\n+\t\t\t\t\t p_mirror->num_entries,\n+\t\t\t\t\t p_mirror->id);\n+\t\tif (ret < 0)\n+\t\t\tPMD_DRV_LOG(ERR, \"failed to remove mirror rule: \"\n+\t\t\t\t \"status = %d, aq_err = %d.\", ret,\n+\t\t\t\t hw->aq.asq_last_status);\n+\t\telse {\n+\t\t\tTAILQ_REMOVE(&pf->mirror_list, p_mirror, rules);\n+\t\t\trte_free(p_mirror);\n+\t\t\tpf->nb_mirror_rule--;\n+\t\t}\n \t}\n-\tpf->nb_mirror_rule = 0;\n \n \tif (!rte_intr_allow_others(intr_handle))\n \t\t/* resume to the default handler */\n", "prefixes": [ "dpdk-dev", "v4" ] }{ "id": 28973, "url": "