Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/838023/?format=api
{ "id": 838023, "url": "http://patchwork.ozlabs.org/api/patches/838023/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20171114120052.86665-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": "<20171114120052.86665-8-alice.michael@intel.com>", "list_archive_url": null, "date": "2017-11-14T12:00:51", "name": "[next,S82-V4,8/9] i40evf: fix client notify of l2 params", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "8ea37d8500b58b5d49cdd1e197fbd9b6e64ad5dc", "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/20171114120052.86665-8-alice.michael@intel.com/mbox/", "series": [ { "id": 13564, "url": "http://patchwork.ozlabs.org/api/series/13564/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=13564", "date": "2017-11-14T12:00:46", "name": "[next,S82-V4,1/9] i40evf: Do not clear MSI-X PBA manually", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/13564/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/838023/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/838023/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" ], "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\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 3ybzVl2Hnyz9sBW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 15 Nov 2017 07:23:59 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id B599F87638;\n\tTue, 14 Nov 2017 20:23:57 +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 p6q-zq8TfL4m; Tue, 14 Nov 2017 20:23:52 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 5661F878D8;\n\tTue, 14 Nov 2017 20:23:50 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id E38501BFC3F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 14 Nov 2017 20:07:07 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id D60818790B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 14 Nov 2017 20:07:07 +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 RtWyNtuOmNhO for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 14 Nov 2017 20:07:03 +0000 (UTC)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 7CCDF87908\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 14 Nov 2017 20:07:00 +0000 (UTC)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t14 Nov 2017 12:06:59 -0800", "from unknown (HELO localhost.jf.intel.com) ([10.166.16.121])\n\tby fmsmga001.fm.intel.com with ESMTP; 14 Nov 2017 12:06:59 -0800" ], "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.44,396,1505804400\"; d=\"scan'208\";a=\"2651474\"", "From": "Alice Michael <alice.michael@intel.com>", "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org", "Date": "Tue, 14 Nov 2017 07:00:51 -0500", "Message-Id": "<20171114120052.86665-8-alice.michael@intel.com>", "X-Mailer": "git-send-email 2.9.5", "In-Reply-To": "<20171114120052.86665-1-alice.michael@intel.com>", "References": "<20171114120052.86665-1-alice.michael@intel.com>", "Subject": "[Intel-wired-lan] [next PATCH S82-V4 8/9] i40evf: fix client notify\n\tof l2 params", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.24", "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: Alan Brady <alan.brady@intel.com>\n\nThe current method for notifying clients of l2 parameters is broken\nbecause we fail to copy the new parameters to the client instance\nstruct, we need to do the notification before the client 'open' function\npointer gets called, and lastly we should set the l2 parameters when\nfirst adding a client instance.\n\nThis patch first introduces the i40evf_client_get_params function to\nprevent code duplication in the i40evf_client_add_instance and the\ni40evf_notify_client_l2_params functions. We then fix the notify l2\nparams function to actually copy the parameters to client instance\nstruct and do the same in the *_add_instance' function. Lastly this\npatch reorganizes the priority in which client tasks fire so that if the\nflag for notifying l2 params is set, it will trigger before the open\nbecause the client needs these new parameters as part of a client open\ntask.\n\nSigned-off-by: Alan Brady <alan.brady@intel.com>\n---\n drivers/net/ethernet/intel/i40evf/i40evf_client.c | 38 ++++++++++++++++-------\n drivers/net/ethernet/intel/i40evf/i40evf_main.c | 10 +++---\n 2 files changed, 31 insertions(+), 17 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_client.c b/drivers/net/ethernet/intel/i40evf/i40evf_client.c\nindex 93cf5fd..3bcd1dc 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_client.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_client.c\n@@ -25,6 +25,26 @@ static struct i40e_ops i40evf_lan_ops = {\n };\n \n /**\n+ * i40evf_client_get_params - retrieve relevant client parameters\n+ * @vsi: VSI with parameters\n+ * @params: client param struct\n+ **/\n+static\n+void i40evf_client_get_params(struct i40e_vsi *vsi, struct i40e_params *params)\n+{\n+\tint i;\n+\n+\tmemset(params, 0, sizeof(struct i40e_params));\n+\tparams->mtu = vsi->netdev->mtu;\n+\tparams->link_up = vsi->back->link_up;\n+\n+\tfor (i = 0; i < I40E_MAX_USER_PRIORITY; i++) {\n+\t\tparams->qos.prio_qos[i].tc = 0;\n+\t\tparams->qos.prio_qos[i].qs_handle = vsi->qs_handle;\n+\t}\n+}\n+\n+/**\n * i40evf_notify_client_message - call the client message receive callback\n * @vsi: the VSI associated with this client\n * @msg: message buffer\n@@ -65,10 +85,6 @@ void i40evf_notify_client_l2_params(struct i40e_vsi *vsi)\n \t\treturn;\n \n \tcinst = vsi->back->cinst;\n-\tmemset(¶ms, 0, sizeof(params));\n-\tparams.mtu = vsi->netdev->mtu;\n-\tparams.link_up = vsi->back->link_up;\n-\tparams.qos.prio_qos[0].qs_handle = vsi->qs_handle;\n \n \tif (!cinst || !cinst->client || !cinst->client->ops ||\n \t !cinst->client->ops->l2_param_change) {\n@@ -76,6 +92,8 @@ void i40evf_notify_client_l2_params(struct i40e_vsi *vsi)\n \t\t\t\"Cannot locate client instance l2_param_change function\\n\");\n \t\treturn;\n \t}\n+\ti40evf_client_get_params(vsi, ¶ms);\n+\tcinst->lan_info.params = params;\n \tcinst->client->ops->l2_param_change(&cinst->lan_info, cinst->client,\n \t\t\t\t\t ¶ms);\n }\n@@ -165,9 +183,9 @@ static struct i40e_client_instance *\n i40evf_client_add_instance(struct i40evf_adapter *adapter)\n {\n \tstruct i40e_client_instance *cinst = NULL;\n-\tstruct netdev_hw_addr *mac = NULL;\n \tstruct i40e_vsi *vsi = &adapter->vsi;\n-\tint i;\n+\tstruct netdev_hw_addr *mac = NULL;\n+\tstruct i40e_params params;\n \n \tif (!vf_registered_client)\n \t\tgoto out;\n@@ -191,18 +209,14 @@ i40evf_client_add_instance(struct i40evf_adapter *adapter)\n \tcinst->lan_info.version.major = I40EVF_CLIENT_VERSION_MAJOR;\n \tcinst->lan_info.version.minor = I40EVF_CLIENT_VERSION_MINOR;\n \tcinst->lan_info.version.build = I40EVF_CLIENT_VERSION_BUILD;\n+\ti40evf_client_get_params(vsi, ¶ms);\n+\tcinst->lan_info.params = params;\n \tset_bit(__I40E_CLIENT_INSTANCE_NONE, &cinst->state);\n \n \tcinst->lan_info.msix_count = adapter->num_iwarp_msix;\n \tcinst->lan_info.msix_entries =\n \t\t\t&adapter->msix_entries[adapter->iwarp_base_vector];\n \n-\tfor (i = 0; i < I40E_MAX_USER_PRIORITY; i++) {\n-\t\tcinst->lan_info.params.qos.prio_qos[i].tc = 0;\n-\t\tcinst->lan_info.params.qos.prio_qos[i].qs_handle =\n-\t\t\t\t\t\t\t\tvsi->qs_handle;\n-\t}\n-\n \tmac = list_first_entry(&cinst->lan_info.netdev->dev_addrs.list,\n \t\t\t struct netdev_hw_addr, list);\n \tif (mac)\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\nindex 5e27619..f92587a 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n@@ -2074,6 +2074,11 @@ static void i40evf_client_task(struct work_struct *work)\n \t\tadapter->flags &= ~I40EVF_FLAG_SERVICE_CLIENT_REQUESTED;\n \t\tgoto out;\n \t}\n+\tif (adapter->flags & I40EVF_FLAG_CLIENT_NEEDS_L2_PARAMS) {\n+\t\ti40evf_notify_client_l2_params(&adapter->vsi);\n+\t\tadapter->flags &= ~I40EVF_FLAG_CLIENT_NEEDS_L2_PARAMS;\n+\t\tgoto out;\n+\t}\n \tif (adapter->flags & I40EVF_FLAG_CLIENT_NEEDS_CLOSE) {\n \t\ti40evf_notify_client_close(&adapter->vsi, false);\n \t\tadapter->flags &= ~I40EVF_FLAG_CLIENT_NEEDS_CLOSE;\n@@ -2082,11 +2087,6 @@ static void i40evf_client_task(struct work_struct *work)\n \tif (adapter->flags & I40EVF_FLAG_CLIENT_NEEDS_OPEN) {\n \t\ti40evf_notify_client_open(&adapter->vsi);\n \t\tadapter->flags &= ~I40EVF_FLAG_CLIENT_NEEDS_OPEN;\n-\t\tgoto out;\n-\t}\n-\tif (adapter->flags & I40EVF_FLAG_CLIENT_NEEDS_L2_PARAMS) {\n-\t\ti40evf_notify_client_l2_params(&adapter->vsi);\n-\t\tadapter->flags &= ~I40EVF_FLAG_CLIENT_NEEDS_L2_PARAMS;\n \t}\n out:\n \tclear_bit(__I40EVF_IN_CLIENT_TASK, &adapter->crit_section);\n", "prefixes": [ "next", "S82-V4", "8/9" ] }