Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/28972/?format=api
http://patches.dpdk.org/api/patches/28972/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1505872770-63412-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": "<1505872770-63412-1-git-send-email-wei.dai@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1505872770-63412-1-git-send-email-wei.dai@intel.com", "date": "2017-09-20T01:59:30", "name": "[dpdk-dev,v3] net/i40e: fix mirror rule reset when port is stopped", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "b4be1aae161f043005f25e9bc10cf2b057bd5c5e", "submitter": { "id": 490, "url": "http://patches.dpdk.org/api/people/490/?format=api", "name": "Wei Dai", "email": "wei.dai@intel.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1505872770-63412-1-git-send-email-wei.dai@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/28972/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/28972/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 E6D401E34;\n\tWed, 20 Sep 2017 04:12:06 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 76FEEF04;\n\tWed, 20 Sep 2017 04:12:04 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Sep 2017 19:12:03 -0700", "from dpdk6.bj.intel.com ([172.16.182.87])\n\tby orsmga002.jf.intel.com with ESMTP; 19 Sep 2017 19:12:00 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.42,420,1500966000\"; d=\"scan'208\";a=\"137314964\"", "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 09:59:30 +0800", "Message-Id": "<1505872770-63412-1-git-send-email-wei.dai@intel.com>", "X-Mailer": "git-send-email 2.7.5", "In-Reply-To": "<1505097022-11224-1-git-send-email-wei.dai@intel.com>", "References": "<1505097022-11224-1-git-send-email-wei.dai@intel.com>", "Subject": "[dpdk-dev] [PATCH v3] 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..23b9b38 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@@ -2096,10 +2102,23 @@ 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\tint ret;\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\t} else {\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", "v3" ] }{ "id": 28972, "url": "