get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 864989,
    "url": "http://patchwork.ozlabs.org/api/patches/864989/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180123165106.28900-2-avinash.dayanand@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": "<20180123165106.28900-2-avinash.dayanand@intel.com>",
    "list_archive_url": null,
    "date": "2018-01-23T16:50:55",
    "name": "[v3,next-queue,01/12] i40evf: Fix link up issue when queues are disabled",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "10e97084c28fb57265be58c3a6fde3d7e9de053e",
    "submitter": {
        "id": 67689,
        "url": "http://patchwork.ozlabs.org/api/people/67689/?format=api",
        "name": "Dayanand, Avinash",
        "email": "avinash.dayanand@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/20180123165106.28900-2-avinash.dayanand@intel.com/mbox/",
    "series": [
        {
            "id": 24988,
            "url": "http://patchwork.ozlabs.org/api/series/24988/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=24988",
            "date": "2018-01-23T16:51:00",
            "name": "Enable queue channel and cloud filter support on i40evf",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/24988/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/864989/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/864989/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 3zQzVG2dM6z9s7s\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 24 Jan 2018 06:52:38 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id D0C8888214;\n\tTue, 23 Jan 2018 19:52:36 +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 JOaZ9yjTzRjA; Tue, 23 Jan 2018 19:52:32 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 36E5888227;\n\tTue, 23 Jan 2018 19:52:28 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id C73701C0521\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jan 2018 19:52:24 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id B55C1882DC\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jan 2018 19:52:24 +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 K42d313fGQNf for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jan 2018 19:52:22 +0000 (UTC)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 5FCE788214\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 23 Jan 2018 19:52:22 +0000 (UTC)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t23 Jan 2018 11:52:21 -0800",
            "from avi-linux2.jf.intel.com ([10.166.244.156])\n\tby orsmga001.jf.intel.com with ESMTP; 23 Jan 2018 11:52:06 -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-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.46,402,1511856000\"; d=\"scan'208\";a=\"25768859\"",
        "From": "Avinash Dayanand <avinash.dayanand@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Tue, 23 Jan 2018 08:50:55 -0800",
        "Message-Id": "<20180123165106.28900-2-avinash.dayanand@intel.com>",
        "X-Mailer": "git-send-email 2.9.4",
        "In-Reply-To": "<20180123165106.28900-1-avinash.dayanand@intel.com>",
        "References": "<20180123165106.28900-1-avinash.dayanand@intel.com>",
        "Subject": "[Intel-wired-lan] [PATCH v3 next-queue 01/12] i40evf: Fix link up\n\tissue when queues are disabled",
        "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": "One of the previous patch fixes the link up issue by ignoring it if\ni40evf is not in __I40EVF_RUNNING state. However this doesn't fix the\nrace condition when queues are disabled esp for ADq on VF. Hence check\nif all queues are enabled before starting all queues.\n\nSigned-off-by: Avinash Dayanand <avinash.dayanand@intel.com>\n---\n drivers/net/ethernet/intel/i40evf/i40evf.h         |  1 +\n drivers/net/ethernet/intel/i40evf/i40evf_main.c    |  1 +\n .../net/ethernet/intel/i40evf/i40evf_virtchnl.c    | 28 +++++++++++++++-------\n 3 files changed, 22 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40evf/i40evf.h b/drivers/net/ethernet/intel/i40evf/i40evf.h\nindex b6991e8..89ce2f9 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf.h\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf.h\n@@ -240,6 +240,7 @@ struct i40evf_adapter {\n #define I40EVF_FLAG_ALLMULTI_ON\t\t\tBIT(14)\n #define I40EVF_FLAG_LEGACY_RX\t\t\tBIT(15)\n #define I40EVF_FLAG_REINIT_ITR_NEEDED\t\tBIT(16)\n+#define I40EVF_FLAG_QUEUES_DISABLED\t\tBIT(17)\n /* duplicates for common code */\n #define I40E_FLAG_DCB_ENABLED\t\t\t0\n #define I40E_FLAG_RX_CSUM_ENABLED\t\tI40EVF_FLAG_RX_CSUM_ENABLED\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\nindex 6fd0992..3014a5e 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n@@ -1895,6 +1895,7 @@ static void i40evf_reset_task(struct work_struct *work)\n \ti40evf_free_all_rx_resources(adapter);\n \ti40evf_free_all_tx_resources(adapter);\n \n+\tadapter->flags |= I40EVF_FLAG_QUEUES_DISABLED;\n \t/* kill and reinit the admin queue */\n \ti40evf_shutdown_adminq(hw);\n \tadapter->current_op = VIRTCHNL_OP_UNKNOWN;\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c\nindex 82e6b11..9f8c007 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c\n@@ -1017,14 +1017,25 @@ void i40evf_virtchnl_completion(struct i40evf_adapter *adapter,\n \t\t\tif (adapter->link_up == link_up)\n \t\t\t\tbreak;\n \n-\t\t\t/* If we get link up message and start queues before\n-\t\t\t * our queues are configured it will trigger a TX hang.\n-\t\t\t * In that case, just ignore the link status message,\n-\t\t\t * we'll get another one after we enable queues and\n-\t\t\t * actually prepared to send traffic.\n-\t\t\t */\n-\t\t\tif (link_up && adapter->state != __I40EVF_RUNNING)\n-\t\t\t\tbreak;\n+\t\t\tif (link_up) {\n+\t\t\t\t/* If we get link up message and start queues\n+\t\t\t\t * before our queues are configured it will\n+\t\t\t\t * trigger a TX hang. In that case, just ignore\n+\t\t\t\t * the link status message,we'll get another one\n+\t\t\t\t * after we enable queues and actually prepared\n+\t\t\t\t * to send traffic.\n+\t\t\t\t */\n+\t\t\t\tif (adapter->state != __I40EVF_RUNNING)\n+\t\t\t\t\tbreak;\n+\n+\t\t\t\t/* For ADq enabled VF, we reconfigure VSIs and\n+\t\t\t\t * re-allocate queues. Hence wait till all\n+\t\t\t\t * queues are enabled.\n+\t\t\t\t */\n+\t\t\t\tif (adapter->flags &\n+\t\t\t\t    I40EVF_FLAG_QUEUES_DISABLED)\n+\t\t\t\t\tbreak;\n+\t\t\t}\n \n \t\t\tadapter->link_up = link_up;\n \t\t\tif (link_up) {\n@@ -1108,6 +1119,7 @@ void i40evf_virtchnl_completion(struct i40evf_adapter *adapter,\n \tcase VIRTCHNL_OP_ENABLE_QUEUES:\n \t\t/* enable transmits */\n \t\ti40evf_irq_enable(adapter, true);\n+\t\tadapter->flags &= ~I40EVF_FLAG_QUEUES_DISABLED;\n \t\tbreak;\n \tcase VIRTCHNL_OP_DISABLE_QUEUES:\n \t\ti40evf_free_all_tx_resources(adapter);\n",
    "prefixes": [
        "v3",
        "next-queue",
        "01/12"
    ]
}