Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/662462/?format=api
{ "id": 662462, "url": "http://patchwork.ozlabs.org/api/patches/662462/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1472063631-9033-4-git-send-email-bimmy.pujari@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": "<1472063631-9033-4-git-send-email-bimmy.pujari@intel.com>", "list_archive_url": null, "date": "2016-08-24T18:33:48", "name": "[next,S44,3/6] i40e: Change some init flow for the client", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "d25d9c50cde1cc8d2f0eaea2a2b888f00ef79085", "submitter": { "id": 68919, "url": "http://patchwork.ozlabs.org/api/people/68919/?format=api", "name": "Pujari, Bimmy", "email": "bimmy.pujari@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/1472063631-9033-4-git-send-email-bimmy.pujari@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/662462/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/662462/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@lists.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 silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 3sKGFG32qqz9sCj\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 25 Aug 2016 04:34:58 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id D1B66315DE;\n\tWed, 24 Aug 2016 18:34:56 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id KOX9fzQKa-V8; Wed, 24 Aug 2016 18:34:42 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 4F8CC314E2;\n\tWed, 24 Aug 2016 18:34:40 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id F3BC71C16C7\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 24 Aug 2016 18:34:37 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id F03F6850A5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 24 Aug 2016 18:34:37 +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 7ExCyTkDbylO for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 24 Aug 2016 18:34:37 +0000 (UTC)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 0506984061\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 24 Aug 2016 18:34:36 +0000 (UTC)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga105.fm.intel.com with ESMTP; 24 Aug 2016 11:34:27 -0700", "from bimmy.jf.intel.com (HELO bimmy.linux1.jf.intel.com)\n\t([134.134.2.177])\n\tby FMSMGA003.fm.intel.com with ESMTP; 24 Aug 2016 11:34:23 -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.28,571,1464678000\"; d=\"scan'208\";a=\"753043624\"", "From": "Bimmy Pujari <bimmy.pujari@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Wed, 24 Aug 2016 11:33:48 -0700", "Message-Id": "<1472063631-9033-4-git-send-email-bimmy.pujari@intel.com>", "X-Mailer": "git-send-email 2.4.11", "In-Reply-To": "<1472063631-9033-1-git-send-email-bimmy.pujari@intel.com>", "References": "<1472063631-9033-1-git-send-email-bimmy.pujari@intel.com>", "Subject": "[Intel-wired-lan] [next PATCH S44 3/6] i40e: Change some init flow\n\tfor the client", "X-BeenThere": "intel-wired-lan@lists.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.lists.osuosl.org>", "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>", "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.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@lists.osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>" }, "content": "From: Anjali Singhai Jain <anjali.singhai@intel.com>\n\nThis change makes a common flow for Client instance open during init\nand reset path. The Client subtask can handle both the cases instead of\nmaking a separate notify_client_of_open call.\nAlso it may fix a bug during reset where the service task was leaking\nsome memory and causing issues.\n\nHSD-number: 7660752\nTesting Hints :\nThe original bug related to the HSD was due the IWARP driver setting\nLAUNCH_ON_PROBE flag on its sidem which should be fixed\nin the IWARP driver. This is further cleanup.\nTest with init/reset/up/down/remove combinations on both LAN and IWARP\ndriver side.\n\nSigned-off-by: Anjali Singhai Jain <anjali.singhai@intel.com>\nChange-Id: I7232a32fd52b82e863abb54266fa83122f80a0cd\n---\n drivers/net/ethernet/intel/i40e/i40e_client.c | 41 ++++++++++++++++++++-------\n drivers/net/ethernet/intel/i40e/i40e_main.c | 1 -\n 2 files changed, 30 insertions(+), 12 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.c b/drivers/net/ethernet/intel/i40e/i40e_client.c\nindex 5404b32..250db0b 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_client.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_client.c\n@@ -209,6 +209,7 @@ void i40e_notify_client_of_l2_param_changes(struct i40e_vsi *vsi)\n void i40e_notify_client_of_netdev_open(struct i40e_vsi *vsi)\n {\n \tstruct i40e_client_instance *cdev;\n+\tint ret = 0;\n \n \tif (!vsi)\n \t\treturn;\n@@ -221,7 +222,14 @@ void i40e_notify_client_of_netdev_open(struct i40e_vsi *vsi)\n \t\t\t\t\t\"Cannot locate client instance open routine\\n\");\n \t\t\t\tcontinue;\n \t\t\t}\n-\t\t\tcdev->client->ops->open(&cdev->lan_info, cdev->client);\n+\t\t\tif (!(test_bit(__I40E_CLIENT_INSTANCE_OPENED,\n+\t\t\t\t &cdev->state))) {\n+\t\t\t\tret = cdev->client->ops->open(&cdev->lan_info,\n+\t\t\t\t\t\t\t cdev->client);\n+\t\t\t\tif (!ret)\n+\t\t\t\t\tset_bit(__I40E_CLIENT_INSTANCE_OPENED,\n+\t\t\t\t\t\t&cdev->state);\n+\t\t\t}\n \t\t}\n \t}\n \tmutex_unlock(&i40e_client_instance_mutex);\n@@ -432,12 +440,14 @@ struct i40e_vsi *i40e_vsi_lookup(struct i40e_pf *pf,\n * i40e_client_add_instance - add a client instance struct to the instance list\n * @pf: pointer to the board struct\n * @client: pointer to a client struct in the client list.\n+ * @existing: if there was already an existing instance\n *\n- * Returns cdev ptr on success, NULL on failure\n+ * Returns cdev ptr on success or if already exists, NULL on failure\n **/\n static\n struct i40e_client_instance *i40e_client_add_instance(struct i40e_pf *pf,\n-\t\t\t\t\t\t struct i40e_client *client)\n+\t\t\t\t\t\t struct i40e_client *client,\n+\t\t\t\t\t\t bool *existing)\n {\n \tstruct i40e_client_instance *cdev;\n \tstruct netdev_hw_addr *mac = NULL;\n@@ -446,7 +456,7 @@ struct i40e_client_instance *i40e_client_add_instance(struct i40e_pf *pf,\n \tmutex_lock(&i40e_client_instance_mutex);\n \tlist_for_each_entry(cdev, &i40e_client_instances, list) {\n \t\tif ((cdev->lan_info.pf == pf) && (cdev->client == client)) {\n-\t\t\tcdev = NULL;\n+\t\t\t*existing = true;\n \t\t\tgoto out;\n \t\t}\n \t}\n@@ -530,6 +540,7 @@ void i40e_client_subtask(struct i40e_pf *pf)\n {\n \tstruct i40e_client_instance *cdev;\n \tstruct i40e_client *client;\n+\tbool existing = false;\n \tint ret = 0;\n \n \tif (!(pf->flags & I40E_FLAG_SERVICE_CLIENT_REQUESTED))\n@@ -553,18 +564,25 @@ void i40e_client_subtask(struct i40e_pf *pf)\n \t\t\t/* check if L2 VSI is up, if not we are not ready */\n \t\t\tif (test_bit(__I40E_DOWN, &pf->vsi[pf->lan_vsi]->state))\n \t\t\t\tcontinue;\n+\t\t} else {\n+\t\t\tdev_warn(&pf->pdev->dev, \"This client %s is being instanciated at probe\\n\",\n+\t\t\t\t client->name);\n \t\t}\n \n \t\t/* Add the client instance to the instance list */\n-\t\tcdev = i40e_client_add_instance(pf, client);\n+\t\tcdev = i40e_client_add_instance(pf, client, &existing);\n \t\tif (!cdev)\n \t\t\tcontinue;\n \n-\t\t/* Also up the ref_cnt of no. of instances of this client */\n-\t\tatomic_inc(&client->ref_cnt);\n-\t\tdev_info(&pf->pdev->dev, \"Added instance of Client %s to PF%d bus=0x%02x func=0x%02x\\n\",\n-\t\t\t client->name, pf->hw.pf_id,\n-\t\t\t pf->hw.bus.device, pf->hw.bus.func);\n+\t\tif (!existing) {\n+\t\t\t/* Also up the ref_cnt for no. of instances of this\n+\t\t\t * client.\n+\t\t\t */\n+\t\t\tatomic_inc(&client->ref_cnt);\n+\t\t\tdev_info(&pf->pdev->dev, \"Added instance of Client %s to PF%d bus=0x%02x func=0x%02x\\n\",\n+\t\t\t\t client->name, pf->hw.pf_id,\n+\t\t\t\t pf->hw.bus.device, pf->hw.bus.func);\n+\t\t}\n \n \t\tmutex_lock(&i40e_client_instance_mutex);\n \t\t/* Send an Open request to the client */\n@@ -616,7 +634,8 @@ int i40e_lan_add_device(struct i40e_pf *pf)\n \t\t pf->hw.pf_id, pf->hw.bus.device, pf->hw.bus.func);\n \n \t/* Since in some cases register may have happened before a device gets\n-\t * added, we can schedule a subtask to go initiate the clients.\n+\t * added, we can schedule a subtask to go initiate the clients if\n+\t * they can be launched at probe time.\n \t */\n \tpf->flags |= I40E_FLAG_SERVICE_CLIENT_REQUESTED;\n \ti40e_service_event_schedule(pf);\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 196a7750..47cf91c 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -5416,7 +5416,6 @@ int i40e_open(struct net_device *netdev)\n \twr32(&pf->hw, I40E_GLLAN_TSOMSK_L, be32_to_cpu(TCP_FLAG_CWR) >> 16);\n \n \tudp_tunnel_get_rx_info(netdev);\n-\ti40e_notify_client_of_netdev_open(vsi);\n \n \treturn 0;\n }\n", "prefixes": [ "next", "S44", "3/6" ] }