Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/694715/?format=api
{ "id": 694715, "url": "http://patchwork.ozlabs.org/api/patches/694715/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1479157609-30812-5-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": "<1479157609-30812-5-git-send-email-bimmy.pujari@intel.com>", "list_archive_url": null, "date": "2016-11-14T21:06:49", "name": "[next,S53-V2,5/5] i40e: lock service task correctly", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "b474e9f31ceb31cdb052062bcbcc6ed619c87e2a", "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/1479157609-30812-5-git-send-email-bimmy.pujari@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/694715/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/694715/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 3tHjmf4wRTz9s65\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 15 Nov 2016 08:08:34 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 147AD31821;\n\tMon, 14 Nov 2016 21:08:33 +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 JCIA3G3PG23Q; Mon, 14 Nov 2016 21:08:29 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 1EEF031772;\n\tMon, 14 Nov 2016 21:08:29 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 48DE81C1F38\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 14 Nov 2016 21:08:26 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 45BEC8A3CD\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 14 Nov 2016 21:08:26 +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 MSTcGg7tVocC for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 14 Nov 2016 21:08:25 +0000 (UTC)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 5D8528AA32\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 14 Nov 2016 21:08:25 +0000 (UTC)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga104.fm.intel.com with ESMTP; 14 Nov 2016 13:08:24 -0800", "from bimmy.jf.intel.com (HELO bimmy.linux1.jf.intel.com)\n\t([134.134.2.167])\n\tby orsmga005.jf.intel.com with ESMTP; 14 Nov 2016 13:08:24 -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.31,640,1473145200\"; d=\"scan'208\";a=\"31193147\"", "From": "Bimmy Pujari <bimmy.pujari@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 14 Nov 2016 13:06:49 -0800", "Message-Id": "<1479157609-30812-5-git-send-email-bimmy.pujari@intel.com>", "X-Mailer": "git-send-email 2.4.11", "In-Reply-To": "<1479157609-30812-1-git-send-email-bimmy.pujari@intel.com>", "References": "<1479157609-30812-1-git-send-email-bimmy.pujari@intel.com>", "Subject": "[Intel-wired-lan] [next PATCH S53-V2 5/5] i40e: lock service task\n\tcorrectly", "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: Mitch Williams <mitch.a.williams@intel.com>\n\nThe service task lock was being set in the scheduling function, not the\nactual service task. This would potentially leave the bit set for a long\ntime before the task actually ran. Furthermore, if the service task\ntakes too long, it calls the schedule function to reschedule itself -\nwhich would fail to take the lock and do nothing.\n\nInstead, set and clear the lock bit in the service task itself. In the\nprocess, get rid of the i40e_service_event_complete() function, which is\nreally just two lines of code that can be put right in the service task\nitself.\n\nSigned-off-by: Mitch Williams <mitch.a.williams@intel.com>\nChange-ID: I83155e682b686121e2897f4429eb7d3f7c669168\n---\nTesting Hints : Should be no functional change, particularly around \nlink up/down events. This is prep work for using this lock bit in \nthe client.\n \n drivers/net/ethernet/intel/i40e/i40e_main.c | 24 +++++++-----------------\n 1 file changed, 7 insertions(+), 17 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 849feaa..57850fd 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -288,8 +288,7 @@ struct i40e_vsi *i40e_find_vsi_from_id(struct i40e_pf *pf, u16 id)\n void i40e_service_event_schedule(struct i40e_pf *pf)\n {\n \tif (!test_bit(__I40E_DOWN, &pf->state) &&\n-\t !test_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state) &&\n-\t !test_and_set_bit(__I40E_SERVICE_SCHED, &pf->state))\n+\t !test_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state))\n \t\tqueue_work(i40e_wq, &pf->service_task);\n }\n \n@@ -5943,19 +5942,6 @@ static void i40e_handle_lan_overflow_event(struct i40e_pf *pf,\n }\n \n /**\n- * i40e_service_event_complete - Finish up the service event\n- * @pf: board private structure\n- **/\n-static void i40e_service_event_complete(struct i40e_pf *pf)\n-{\n-\tWARN_ON(!test_bit(__I40E_SERVICE_SCHED, &pf->state));\n-\n-\t/* flush memory to make sure state is correct before next watchog */\n-\tsmp_mb__before_atomic();\n-\tclear_bit(__I40E_SERVICE_SCHED, &pf->state);\n-}\n-\n-/**\n * i40e_get_cur_guaranteed_fd_count - Get the consumed guaranteed FD filters\n * @pf: board private structure\n **/\n@@ -7264,10 +7250,12 @@ static void i40e_service_task(struct work_struct *work)\n \n \t/* don't bother with service tasks if a reset is in progress */\n \tif (test_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state)) {\n-\t\ti40e_service_event_complete(pf);\n \t\treturn;\n \t}\n \n+\tif (test_and_set_bit(__I40E_SERVICE_SCHED, &pf->state))\n+\t\treturn;\n+\n \ti40e_detect_recover_hung(pf);\n \ti40e_sync_filters_subtask(pf);\n \ti40e_reset_subtask(pf);\n@@ -7280,7 +7268,9 @@ static void i40e_service_task(struct work_struct *work)\n \ti40e_sync_udp_filters_subtask(pf);\n \ti40e_clean_adminq_subtask(pf);\n \n-\ti40e_service_event_complete(pf);\n+\t/* flush memory to make sure state is correct before next watchdog */\n+\tsmp_mb__before_atomic();\n+\tclear_bit(__I40E_SERVICE_SCHED, &pf->state);\n \n \t/* If the tasks have taken longer than one timer cycle or there\n \t * is more work to be done, reschedule the service task now\n", "prefixes": [ "next", "S53-V2", "5/5" ] }