Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/54723/?format=api
http://patches.dpdk.org/api/patches/54723/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190611155221.2703-67-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": "<20190611155221.2703-67-leyi.rong@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190611155221.2703-67-leyi.rong@intel.com", "date": "2019-06-11T15:52:21", "name": "[v2,66/66] net/ice/base: reduce calls to get profile associations", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "f4a423b3ae1b19cf6e7d4e31efe37649e58b4d88", "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/20190611155221.2703-67-leyi.rong@intel.com/mbox/", "series": [ { "id": 4981, "url": "http://patches.dpdk.org/api/series/4981/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4981", "date": "2019-06-11T15:51:15", "name": "shared code update", "version": 2, "mbox": "http://patches.dpdk.org/series/4981/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/54723/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/54723/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 187211CFF6;\n\tTue, 11 Jun 2019 17:55:57 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id BDF091C571\n\tfor <dev@dpdk.org>; Tue, 11 Jun 2019 17:55:01 +0200 (CEST)", "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Jun 2019 08:55:01 -0700", "from lrong-srv-03.sh.intel.com ([10.67.119.177])\n\tby orsmga001.jf.intel.com with ESMTP; 11 Jun 2019 08:55:00 -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\tShivanshu Shukla <shivanshu.shukla@intel.com>,\n\tPaul M Stillwell Jr <paul.m.stillwell.jr@intel.com>", "Date": "Tue, 11 Jun 2019 23:52:21 +0800", "Message-Id": "<20190611155221.2703-67-leyi.rong@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20190611155221.2703-1-leyi.rong@intel.com>", "References": "<20190604054248.68510-1-leyi.rong@intel.com>\n\t<20190611155221.2703-1-leyi.rong@intel.com>", "Subject": "[dpdk-dev] [PATCH v2 66/66] net/ice/base: reduce calls to get\n\tprofile associations", "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": "Added refresh_required flag to determine if we need to update the\nrecipe to profile mapping cache. This will reduce the number of\ncalls made to refresh the profile map.\n\nSigned-off-by: Shivanshu Shukla <shivanshu.shukla@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 | 25 +++++++++++++++++++------\n 1 file changed, 19 insertions(+), 6 deletions(-)", "diff": "diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex 636b43d69..7f4edd274 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -175,13 +175,15 @@ static void ice_get_recp_to_prof_map(struct ice_hw *hw);\n * @hw: pointer to hardware structure\n * @recps: struct that we need to populate\n * @rid: recipe ID that we are populating\n+ * @refresh_required: true if we should get recipe to profile mapping from FW\n *\n * This function is used to populate all the necessary entries into our\n * bookkeeping so that we have a current list of all the recipes that are\n * programmed in the firmware.\n */\n static enum ice_status\n-ice_get_recp_frm_fw(struct ice_hw *hw, struct ice_sw_recipe *recps, u8 rid)\n+ice_get_recp_frm_fw(struct ice_hw *hw, struct ice_sw_recipe *recps, u8 rid,\n+\t\t bool *refresh_required)\n {\n \tu16 i, sub_recps, fv_word_idx = 0, result_idx = 0;\n \tice_declare_bitmap(r_bitmap, ICE_MAX_NUM_PROFILES);\n@@ -191,10 +193,6 @@ ice_get_recp_frm_fw(struct ice_hw *hw, struct ice_sw_recipe *recps, u8 rid)\n \tstruct ice_prot_lkup_ext *lkup_exts;\n \tenum ice_status status;\n \n-\t/* Get recipe to profile map so that we can get the fv from\n-\t * lkups that we read for a recipe from FW.\n-\t */\n-\tice_get_recp_to_prof_map(hw);\n \t/* we need a buffer big enough to accommodate all the recipes */\n \ttmp = (struct ice_aqc_recipe_data_elem *)ice_calloc(hw,\n \t\tICE_MAX_NUM_RECIPES, sizeof(*tmp));\n@@ -206,6 +204,19 @@ ice_get_recp_frm_fw(struct ice_hw *hw, struct ice_sw_recipe *recps, u8 rid)\n \t/* non-zero status meaning recipe doesn't exist */\n \tif (status)\n \t\tgoto err_unroll;\n+\n+\t/* Get recipe to profile map so that we can get the fv from lkups that\n+\t * we read for a recipe from FW. Since we want to minimize the number of\n+\t * times we make this FW call, just make one call and cache the copy\n+\t * until a new recipe is added. This operation is only required the\n+\t * first time to get the changes from FW. Then to search existing\n+\t * entries we don't need to update the cache again until another recipe\n+\t * gets added.\n+\t */\n+\tif (*refresh_required) {\n+\t\tice_get_recp_to_prof_map(hw);\n+\t\t*refresh_required = false;\n+\t}\n \tlkup_exts = &recps[rid].lkup_exts;\n \t/* start populating all the entries for recps[rid] based on lkups from\n \t * firmware\n@@ -4358,6 +4369,7 @@ static const struct ice_protocol_entry ice_prot_id_tbl[] = {\n */\n static u16 ice_find_recp(struct ice_hw *hw, struct ice_prot_lkup_ext *lkup_exts)\n {\n+\tbool refresh_required = true;\n \tstruct ice_sw_recipe *recp;\n \tu16 i;\n \n@@ -4376,7 +4388,8 @@ static u16 ice_find_recp(struct ice_hw *hw, struct ice_prot_lkup_ext *lkup_exts)\n \t\t */\n \t\tif (!recp[i].recp_created)\n \t\t\tif (ice_get_recp_frm_fw(hw,\n-\t\t\t\t\t\thw->switch_info->recp_list, i))\n+\t\t\t\t\t\thw->switch_info->recp_list, i,\n+\t\t\t\t\t\t&refresh_required))\n \t\t\t\tcontinue;\n \n \t\t/* if number of words we are looking for match */\n", "prefixes": [ "v2", "66/66" ] }{ "id": 54723, "url": "