Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/772620/?format=api
{ "id": 772620, "url": "http://patchwork.ozlabs.org/api/patches/772620/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170607094313.32060-8-alice.michael@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170607094313.32060-8-alice.michael@intel.com>", "list_archive_url": null, "date": "2017-06-07T09:43:08", "name": "[next,S72-V3,08/13] i40e: genericize the partition bandwidth control", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "2225ed5c3a65f2fae040241c393e555b8e3c8012", "submitter": { "id": 71123, "url": "http://patchwork.ozlabs.org/api/people/71123/?format=api", "name": "Michael, Alice", "email": "alice.michael@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170607094313.32060-8-alice.michael@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/772620/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/772620/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Received": [ "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3wjbbQ6DzRz9sDG\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 8 Jun 2017 03:46:58 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 60A3787A1E;\n\tWed, 7 Jun 2017 17:46:57 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id mBkAMY_EAw4O; Wed, 7 Jun 2017 17:46:55 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 213A487A35;\n\tWed, 7 Jun 2017 17:46:55 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 6D1801C3EB9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 7 Jun 2017 17:46:46 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 6687E89379\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 7 Jun 2017 17:46:46 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id ZugyW1Aql35g for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 7 Jun 2017 17:46:43 +0000 (UTC)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id E016F893C4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 7 Jun 2017 17:46:43 +0000 (UTC)", "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Jun 2017 10:46:41 -0700", "from unknown (HELO localhost.jf.intel.com) ([10.166.16.121])\n\tby orsmga004.jf.intel.com with ESMTP; 07 Jun 2017 10:46:41 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.39,311,1493708400\"; d=\"scan'208\";a=\"95650689\"", "From": "Alice Michael <alice.michael@intel.com>", "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org", "Date": "Wed, 7 Jun 2017 05:43:08 -0400", "Message-Id": "<20170607094313.32060-8-alice.michael@intel.com>", "X-Mailer": "git-send-email 2.9.3", "In-Reply-To": "<20170607094313.32060-1-alice.michael@intel.com>", "References": "<20170607094313.32060-1-alice.michael@intel.com>", "Cc": "Shannon Nelson <shannon.nelson@intel.com>", "Subject": "[Intel-wired-lan] [next PATCH S72-V3 08/13] i40e: genericize the\n\tpartition bandwidth control", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "From: Shannon Nelson <shannon.nelson@intel.com>\n\nPartition bandwidth control is not in just one form of MFP (multi-function\npartitioning), so make the code more generic and be sure to nudge the Tx\nscheduler for all MFP.\n\nCopyright updated to 2017.\n\nSigned-off-by: Shannon Nelson <shannon.nelson@intel.com>\nSigned-off-by: Mitch Williams <mitch.a.williams@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e.h | 13 +++++----\n drivers/net/ethernet/intel/i40e/i40e_main.c | 41 ++++++++++++++---------------\n 2 files changed, 26 insertions(+), 28 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h\nindex 4250ab5..76395e6 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e.h\n@@ -1,7 +1,7 @@\n /*******************************************************************************\n *\n * Intel Ethernet Controller XL710 Family Linux Driver\n- * Copyright(c) 2013 - 2016 Intel Corporation.\n+ * Copyright(c) 2013 - 2017 Intel Corporation.\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms and conditions of the GNU General Public License,\n@@ -516,9 +516,8 @@ struct i40e_pf {\n \tbool ptp_tx;\n \tbool ptp_rx;\n \tu16 rss_table_size; /* HW RSS table size */\n-\t/* These are only valid in NPAR modes */\n-\tu32 npar_max_bw;\n-\tu32 npar_min_bw;\n+\tu32 max_bw;\n+\tu32 min_bw;\n \n \tu32 ioremap_len;\n \tu32 fd_inv;\n@@ -971,9 +970,9 @@ int i40e_ptp_get_ts_config(struct i40e_pf *pf, struct ifreq *ifr);\n void i40e_ptp_init(struct i40e_pf *pf);\n void i40e_ptp_stop(struct i40e_pf *pf);\n int i40e_is_vsi_uplink_mode_veb(struct i40e_vsi *vsi);\n-i40e_status i40e_get_npar_bw_setting(struct i40e_pf *pf);\n-i40e_status i40e_set_npar_bw_setting(struct i40e_pf *pf);\n-i40e_status i40e_commit_npar_bw_setting(struct i40e_pf *pf);\n+i40e_status i40e_get_partition_bw_setting(struct i40e_pf *pf);\n+i40e_status i40e_set_partition_bw_setting(struct i40e_pf *pf);\n+i40e_status i40e_commit_partition_bw_setting(struct i40e_pf *pf);\n void i40e_print_link_message(struct i40e_vsi *vsi, bool isup);\n \n static inline bool i40e_enabled_xdp_vsi(struct i40e_vsi *vsi)\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 9f4763d..18a9be6 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -1,7 +1,7 @@\n /*******************************************************************************\n *\n * Intel Ethernet Controller XL710 Family Linux Driver\n- * Copyright(c) 2013 - 2016 Intel Corporation.\n+ * Copyright(c) 2013 - 2017 Intel Corporation.\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms and conditions of the GNU General Public License,\n@@ -8739,10 +8739,10 @@ int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count)\n }\n \n /**\n- * i40e_get_npar_bw_setting - Retrieve BW settings for this PF partition\n+ * i40e_get_partition_bw_setting - Retrieve BW settings for this PF partition\n * @pf: board private structure\n **/\n-i40e_status i40e_get_npar_bw_setting(struct i40e_pf *pf)\n+i40e_status i40e_get_partition_bw_setting(struct i40e_pf *pf)\n {\n \ti40e_status status;\n \tbool min_valid, max_valid;\n@@ -8753,27 +8753,27 @@ i40e_status i40e_get_npar_bw_setting(struct i40e_pf *pf)\n \n \tif (!status) {\n \t\tif (min_valid)\n-\t\t\tpf->npar_min_bw = min_bw;\n+\t\t\tpf->min_bw = min_bw;\n \t\tif (max_valid)\n-\t\t\tpf->npar_max_bw = max_bw;\n+\t\t\tpf->max_bw = max_bw;\n \t}\n \n \treturn status;\n }\n \n /**\n- * i40e_set_npar_bw_setting - Set BW settings for this PF partition\n+ * i40e_set_partition_bw_setting - Set BW settings for this PF partition\n * @pf: board private structure\n **/\n-i40e_status i40e_set_npar_bw_setting(struct i40e_pf *pf)\n+i40e_status i40e_set_partition_bw_setting(struct i40e_pf *pf)\n {\n \tstruct i40e_aqc_configure_partition_bw_data bw_data;\n \ti40e_status status;\n \n \t/* Set the valid bit for this PF */\n \tbw_data.pf_valid_bits = cpu_to_le16(BIT(pf->hw.pf_id));\n-\tbw_data.max_bw[pf->hw.pf_id] = pf->npar_max_bw & I40E_ALT_BW_VALUE_MASK;\n-\tbw_data.min_bw[pf->hw.pf_id] = pf->npar_min_bw & I40E_ALT_BW_VALUE_MASK;\n+\tbw_data.max_bw[pf->hw.pf_id] = pf->max_bw & I40E_ALT_BW_VALUE_MASK;\n+\tbw_data.min_bw[pf->hw.pf_id] = pf->min_bw & I40E_ALT_BW_VALUE_MASK;\n \n \t/* Set the new bandwidths */\n \tstatus = i40e_aq_configure_partition_bw(&pf->hw, &bw_data, NULL);\n@@ -8782,10 +8782,10 @@ i40e_status i40e_set_npar_bw_setting(struct i40e_pf *pf)\n }\n \n /**\n- * i40e_commit_npar_bw_setting - Commit BW settings for this PF partition\n+ * i40e_commit_partition_bw_setting - Commit BW settings for this PF partition\n * @pf: board private structure\n **/\n-i40e_status i40e_commit_npar_bw_setting(struct i40e_pf *pf)\n+i40e_status i40e_commit_partition_bw_setting(struct i40e_pf *pf)\n {\n \t/* Commit temporary BW setting to permanent NVM image */\n \tenum i40e_admin_queue_err last_aq_status;\n@@ -8904,16 +8904,19 @@ static int i40e_sw_init(struct i40e_pf *pf)\n \tif (pf->hw.func_caps.npar_enable || pf->hw.func_caps.flex10_enable) {\n \t\tpf->flags |= I40E_FLAG_MFP_ENABLED;\n \t\tdev_info(&pf->pdev->dev, \"MFP mode Enabled\\n\");\n-\t\tif (i40e_get_npar_bw_setting(pf))\n+\t\tif (i40e_get_partition_bw_setting(pf)) {\n \t\t\tdev_warn(&pf->pdev->dev,\n-\t\t\t\t \"Could not get NPAR bw settings\\n\");\n-\t\telse\n+\t\t\t\t \"Could not get partition bw settings\\n\");\n+\t\t} else {\n \t\t\tdev_info(&pf->pdev->dev,\n-\t\t\t\t \"Min BW = %8.8x, Max BW = %8.8x\\n\",\n-\t\t\t\t pf->npar_min_bw, pf->npar_max_bw);\n+\t\t\t\t \"Partition BW Min = %8.8x, Max = %8.8x\\n\",\n+\t\t\t\t pf->min_bw, pf->max_bw);\n+\n+\t\t\t/* nudge the Tx scheduler */\n+\t\t\ti40e_set_partition_bw_setting(pf);\n+\t\t}\n \t}\n \n-\t/* FW/NVM is not yet fixed in this regard */\n \tif ((pf->hw.func_caps.fd_filters_guaranteed > 0) ||\n \t (pf->hw.func_caps.fd_filters_best_effort > 0)) {\n \t\tpf->flags |= I40E_FLAG_FD_ATR_ENABLED;\n@@ -9016,10 +9019,6 @@ static int i40e_sw_init(struct i40e_pf *pf)\n \n \tmutex_init(&pf->switch_mutex);\n \n-\t/* If NPAR is enabled nudge the Tx scheduler */\n-\tif (pf->hw.func_caps.npar_enable && (!i40e_get_npar_bw_setting(pf)))\n-\t\ti40e_set_npar_bw_setting(pf);\n-\n sw_init_done:\n \treturn err;\n }\n", "prefixes": [ "next", "S72-V3", "08/13" ] }