get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/750536/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 750536,
    "url": "http://patchwork.ozlabs.org/api/patches/750536/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170413084555.6962-10-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": "<20170413084555.6962-10-alice.michael@intel.com>",
    "list_archive_url": null,
    "date": "2017-04-13T08:45:53",
    "name": "[next,S70,10/12] i40e: use i40e_stop_rings_no_wait to implement PORT_SUSPENDED state",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "2c258cbe4c45e5ba066a45920128f6d911bafb98",
    "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/20170413084555.6962-10-alice.michael@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/750536/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/750536/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 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 3w3mvZ02LRz9s8Q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 14 Apr 2017 02:48:42 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 7F5B08A687;\n\tThu, 13 Apr 2017 16:48:40 +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 ZSKw8hzgWKBw; Thu, 13 Apr 2017 16:48:39 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 5DB5D8A691;\n\tThu, 13 Apr 2017 16:48:37 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 544F51BFE90\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 13 Apr 2017 16:48:33 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 3ACBA89CE4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 13 Apr 2017 16:48:33 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id xsviG0VaKrZ7 for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 13 Apr 2017 16:48:32 +0000 (UTC)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id AD50389BF3\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 13 Apr 2017 16:48:32 +0000 (UTC)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Apr 2017 09:48:29 -0700",
            "from unknown (HELO localhost.jf.intel.com) ([10.166.16.121])\n\tby orsmga002.jf.intel.com with ESMTP; 13 Apr 2017 09:48:29 -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.37,195,1488873600\"; d=\"scan'208\";a=\"73711337\"",
        "From": "Alice Michael <alice.michael@intel.com>",
        "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org",
        "Date": "Thu, 13 Apr 2017 04:45:53 -0400",
        "Message-Id": "<20170413084555.6962-10-alice.michael@intel.com>",
        "X-Mailer": "git-send-email 2.9.3",
        "In-Reply-To": "<20170413084555.6962-1-alice.michael@intel.com>",
        "References": "<20170413084555.6962-1-alice.michael@intel.com>",
        "Subject": "[Intel-wired-lan] [next PATCH S70 10/12] i40e: use\n\ti40e_stop_rings_no_wait to implement PORT_SUSPENDED state",
        "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: Jacob Keller <jacob.e.keller@intel.com>\n\nThis state bit was added as a way for DCB to avoid having to wait for\nthe queues to disable when handling LLDP events. The logic for this was\nburried deep within stop Tx and stop Rx queue code. First, let's rename\nit so that it does not appear to only affect Tx when infact it modifies\nboth Tx and Rx flow. Second we can move it up into the i40e_stop_rings()\nfunction, and we can simply re-use the i40e_stop_rings_no_wait() so that\nwe don't have to bury the implementation as deep into the call stack.\n\nAn alternative might be to remove the state bit and instead attempt to\nshut down everything directly in DCP flow. This, however, is not ideal\nbecause it creates yet another separate shutdown routine that we'd have\nto maintain. In the current implementation any changes will be made to\nboth flows.\n\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\nChange-ID: I68e1ccb901af320862bca395e9c9746f08e8b17c\n---\n drivers/net/ethernet/intel/i40e/i40e.h      |  2 +-\n drivers/net/ethernet/intel/i40e/i40e_main.c | 16 ++++++----------\n 2 files changed, 7 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h\nindex d35fec3..76bc404 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e.h\n@@ -149,7 +149,7 @@ enum i40e_state_t {\n \t__I40E_DOWN_REQUESTED,\n \t__I40E_FD_FLUSH_REQUESTED,\n \t__I40E_RESET_FAILED,\n-\t__I40E_PORT_TX_SUSPENDED,\n+\t__I40E_PORT_SUSPENDED,\n \t__I40E_VF_DISABLE,\n };\n \ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 7ceb256..b9d7798 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -4008,10 +4008,6 @@ static int i40e_vsi_control_tx(struct i40e_vsi *vsi, bool enable)\n \tfor (i = 0; i < vsi->num_queue_pairs; i++, pf_q++) {\n \t\ti40e_control_tx_q(pf, pf_q, enable);\n \n-\t\t/* Don't wait to disable when port Tx is suspended */\n-\t\tif (!enable && test_bit(__I40E_PORT_TX_SUSPENDED, &pf->state))\n-\t\t\tcontinue;\n-\n \t\t/* wait for the change to finish */\n \t\tret = i40e_pf_txq_wait(pf, pf_q, enable);\n \t\tif (ret) {\n@@ -4105,10 +4101,6 @@ static int i40e_vsi_control_rx(struct i40e_vsi *vsi, bool enable)\n \tfor (i = 0; i < vsi->num_queue_pairs; i++, pf_q++) {\n \t\ti40e_control_rx_q(pf, pf_q, enable);\n \n-\t\t/* Don't wait to disable when port Tx is suspended */\n-\t\tif (!enable && test_bit(__I40E_PORT_TX_SUSPENDED, &pf->state))\n-\t\t\tcontinue;\n-\n \t\t/* wait for the change to finish */\n \t\tret = i40e_pf_rxq_wait(pf, pf_q, enable);\n \t\tif (ret) {\n@@ -4151,6 +4143,10 @@ int i40e_vsi_start_rings(struct i40e_vsi *vsi)\n  **/\n void i40e_vsi_stop_rings(struct i40e_vsi *vsi)\n {\n+\t/* When port TX is suspended, don't wait */\n+\tif (test_bit(__I40E_PORT_SUSPENDED, &vsi->back->state))\n+\t\treturn i40e_vsi_stop_rings_no_wait(vsi);\n+\n \t/* do rx first for enable and last for disable\n \t * Ignore return value, we need to shutdown whatever we can\n \t */\n@@ -5986,7 +5982,7 @@ static int i40e_handle_lldp_event(struct i40e_pf *pf,\n \telse\n \t\tpf->flags &= ~I40E_FLAG_DCB_ENABLED;\n \n-\tset_bit(__I40E_PORT_TX_SUSPENDED, &pf->state);\n+\tset_bit(__I40E_PORT_SUSPENDED, &pf->state);\n \t/* Reconfiguration needed quiesce all VSIs */\n \ti40e_pf_quiesce_all_vsi(pf);\n \n@@ -5995,7 +5991,7 @@ static int i40e_handle_lldp_event(struct i40e_pf *pf,\n \n \tret = i40e_resume_port_tx(pf);\n \n-\tclear_bit(__I40E_PORT_TX_SUSPENDED, &pf->state);\n+\tclear_bit(__I40E_PORT_SUSPENDED, &pf->state);\n \t/* In case of error no point in resuming VSIs */\n \tif (ret)\n \t\tgoto exit;\n",
    "prefixes": [
        "next",
        "S70",
        "10/12"
    ]
}