Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/54283/?format=api
http://patches.dpdk.org/api/patches/54283/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190604054248.68510-8-leyi.rong@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": "<20190604054248.68510-8-leyi.rong@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190604054248.68510-8-leyi.rong@intel.com", "date": "2019-06-04T05:42:06", "name": "[07/49] net/ice/base: replay advanced rule after reset", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "46cbbb06369250a82230e96b5bfb74c982cd3342", "submitter": { "id": 1204, "url": "http://patches.dpdk.org/api/people/1204/?format=api", "name": "Leyi Rong", "email": "leyi.rong@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/20190604054248.68510-8-leyi.rong@intel.com/mbox/", "series": [ { "id": 4879, "url": "http://patches.dpdk.org/api/series/4879/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4879", "date": "2019-06-04T05:41:59", "name": "shared code update", "version": 1, "mbox": "http://patches.dpdk.org/series/4879/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/54283/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/54283/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 340CA1B9EB;\n\tTue, 4 Jun 2019 07:44:09 +0200 (CEST)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 0D0C61B9C8\n\tfor <dev@dpdk.org>; Tue, 4 Jun 2019 07:44:00 +0200 (CEST)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t03 Jun 2019 22:44:00 -0700", "from lrong-srv-03.sh.intel.com ([10.67.119.177])\n\tby fmsmga008.fm.intel.com with ESMTP; 03 Jun 2019 22:43:59 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Leyi Rong <leyi.rong@intel.com>", "To": "qi.z.zhang@intel.com", "Cc": "dev@dpdk.org, Leyi Rong <leyi.rong@intel.com>,\n\tVictor Raj <victor.raj@intel.com>,\n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>", "Date": "Tue, 4 Jun 2019 13:42:06 +0800", "Message-Id": "<20190604054248.68510-8-leyi.rong@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20190604054248.68510-1-leyi.rong@intel.com>", "References": "<20190604054248.68510-1-leyi.rong@intel.com>", "Subject": "[dpdk-dev] [PATCH 07/49] net/ice/base: replay advanced rule after\n\treset", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Code added to replay the advanced rule per VSI basis and remove the\nadvanced rule information from shared code recipe list.\n\nSigned-off-by: Victor Raj <victor.raj@intel.com>\nSigned-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>\nSigned-off-by: Leyi Rong <leyi.rong@intel.com>\n---\n drivers/net/ice/base/ice_switch.c | 81 ++++++++++++++++++++++++++-----\n 1 file changed, 69 insertions(+), 12 deletions(-)", "diff": "diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex c53021aed..ca0497ca7 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -3033,6 +3033,27 @@ ice_rem_sw_rule_info(struct ice_hw *hw, struct LIST_HEAD_TYPE *rule_head)\n \t}\n }\n \n+/**\n+ * ice_rem_adv_rule_info\n+ * @hw: pointer to the hardware structure\n+ * @rule_head: pointer to the switch list structure that we want to delete\n+ */\n+static void\n+ice_rem_adv_rule_info(struct ice_hw *hw, struct LIST_HEAD_TYPE *rule_head)\n+{\n+\tstruct ice_adv_fltr_mgmt_list_entry *tmp_entry;\n+\tstruct ice_adv_fltr_mgmt_list_entry *lst_itr;\n+\n+\tif (LIST_EMPTY(rule_head))\n+\t\treturn;\n+\n+\tLIST_FOR_EACH_ENTRY_SAFE(lst_itr, tmp_entry, rule_head,\n+\t\t\t\t ice_adv_fltr_mgmt_list_entry, list_entry) {\n+\t\tLIST_DEL(&lst_itr->list_entry);\n+\t\tice_free(hw, lst_itr->lkups);\n+\t\tice_free(hw, lst_itr);\n+\t}\n+}\n \n /**\n * ice_rem_all_sw_rules_info\n@@ -3049,6 +3070,8 @@ void ice_rem_all_sw_rules_info(struct ice_hw *hw)\n \t\trule_head = &sw->recp_list[i].filt_rules;\n \t\tif (!sw->recp_list[i].adv_rule)\n \t\t\tice_rem_sw_rule_info(hw, rule_head);\n+\t\telse\n+\t\t\tice_rem_adv_rule_info(hw, rule_head);\n \t}\n }\n \n@@ -5687,6 +5710,38 @@ ice_replay_vsi_fltr(struct ice_hw *hw, u16 vsi_handle, u8 recp_id,\n \treturn status;\n }\n \n+/**\n+ * ice_replay_vsi_adv_rule - Replay advanced rule for requested VSI\n+ * @hw: pointer to the hardware structure\n+ * @vsi_handle: driver VSI handle\n+ * @list_head: list for which filters need to be replayed\n+ *\n+ * Replay the advanced rule for the given VSI.\n+ */\n+static enum ice_status\n+ice_replay_vsi_adv_rule(struct ice_hw *hw, u16 vsi_handle,\n+\t\t\tstruct LIST_HEAD_TYPE *list_head)\n+{\n+\tstruct ice_rule_query_data added_entry = { 0 };\n+\tstruct ice_adv_fltr_mgmt_list_entry *adv_fltr;\n+\tenum ice_status status = ICE_SUCCESS;\n+\n+\tif (LIST_EMPTY(list_head))\n+\t\treturn status;\n+\tLIST_FOR_EACH_ENTRY(adv_fltr, list_head, ice_adv_fltr_mgmt_list_entry,\n+\t\t\t list_entry) {\n+\t\tstruct ice_adv_rule_info *rinfo = &adv_fltr->rule_info;\n+\t\tu16 lk_cnt = adv_fltr->lkups_cnt;\n+\n+\t\tif (vsi_handle != rinfo->sw_act.vsi_handle)\n+\t\t\tcontinue;\n+\t\tstatus = ice_add_adv_rule(hw, adv_fltr->lkups, lk_cnt, rinfo,\n+\t\t\t\t\t &added_entry);\n+\t\tif (status)\n+\t\t\tbreak;\n+\t}\n+\treturn status;\n+}\n \n /**\n * ice_replay_vsi_all_fltr - replay all filters stored in bookkeeping lists\n@@ -5698,23 +5753,23 @@ ice_replay_vsi_fltr(struct ice_hw *hw, u16 vsi_handle, u8 recp_id,\n enum ice_status ice_replay_vsi_all_fltr(struct ice_hw *hw, u16 vsi_handle)\n {\n \tstruct ice_switch_info *sw = hw->switch_info;\n-\tenum ice_status status = ICE_SUCCESS;\n+\tenum ice_status status;\n \tu8 i;\n \n+\t/* Update the recipes that were created */\n \tfor (i = 0; i < ICE_MAX_NUM_RECIPES; i++) {\n-\t\t/* Update the default recipe lines and ones that were created */\n-\t\tif (i < ICE_MAX_NUM_RECIPES || sw->recp_list[i].recp_created) {\n-\t\t\tstruct LIST_HEAD_TYPE *head;\n+\t\tstruct LIST_HEAD_TYPE *head;\n \n-\t\t\thead = &sw->recp_list[i].filt_replay_rules;\n-\t\t\tif (!sw->recp_list[i].adv_rule)\n-\t\t\t\tstatus = ice_replay_vsi_fltr(hw, vsi_handle, i,\n-\t\t\t\t\t\t\t head);\n-\t\t\tif (status != ICE_SUCCESS)\n-\t\t\t\treturn status;\n-\t\t}\n+\t\thead = &sw->recp_list[i].filt_replay_rules;\n+\t\tif (!sw->recp_list[i].adv_rule)\n+\t\t\tstatus = ice_replay_vsi_fltr(hw, vsi_handle, i, head);\n+\t\telse\n+\t\t\tstatus = ice_replay_vsi_adv_rule(hw, vsi_handle, head);\n+\t\tif (status != ICE_SUCCESS)\n+\t\t\treturn status;\n \t}\n-\treturn status;\n+\n+\treturn ICE_SUCCESS;\n }\n \n /**\n@@ -5738,6 +5793,8 @@ void ice_rm_all_sw_replay_rule_info(struct ice_hw *hw)\n \t\t\tl_head = &sw->recp_list[i].filt_replay_rules;\n \t\t\tif (!sw->recp_list[i].adv_rule)\n \t\t\t\tice_rem_sw_rule_info(hw, l_head);\n+\t\t\telse\n+\t\t\t\tice_rem_adv_rule_info(hw, l_head);\n \t\t}\n \t}\n }\n", "prefixes": [ "07/49" ] }{ "id": 54283, "url": "