get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 860164,
    "url": "http://patchwork.ozlabs.org/api/patches/860164/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180112193251.11739-5-jeffrey.t.kirsher@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": "<20180112193251.11739-5-jeffrey.t.kirsher@intel.com>",
    "list_archive_url": null,
    "date": "2018-01-12T19:32:44",
    "name": "[05/12] i40evf: Alloc queues for ADq on VF",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "1177c91ebfb2559a4c2ba50f88f7c8a0fe98f614",
    "submitter": {
        "id": 473,
        "url": "http://patchwork.ozlabs.org/api/people/473/?format=api",
        "name": "Kirsher, Jeffrey T",
        "email": "jeffrey.t.kirsher@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/20180112193251.11739-5-jeffrey.t.kirsher@intel.com/mbox/",
    "series": [
        {
            "id": 23043,
            "url": "http://patchwork.ozlabs.org/api/series/23043/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=23043",
            "date": "2018-01-12T19:32:45",
            "name": "[01/12] i40evf: Fix link up issue when queues are disabled",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/23043/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/860164/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/860164/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.136; helo=silver.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
        "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 3zJCZf33xMz9sPk\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 13 Jan 2018 06:32:58 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 0A9812CAA7;\n\tFri, 12 Jan 2018 19:32:57 +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 OUm2UIAB40BT; Fri, 12 Jan 2018 19:32:55 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id 6547B2CF11;\n\tFri, 12 Jan 2018 19:32:55 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 69B1B1C002D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 12 Jan 2018 19:32:52 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 630F989EF7\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 12 Jan 2018 19:32:52 +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 4SNcR4TFabef for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 12 Jan 2018 19:32:49 +0000 (UTC)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id E5D4E89F0B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 12 Jan 2018 19:32:48 +0000 (UTC)",
            "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t12 Jan 2018 11:32:47 -0800",
            "from jtkirshe-nuc.jf.intel.com ([134.134.177.151])\n\tby orsmga003.jf.intel.com with ESMTP; 12 Jan 2018 11:32:47 -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,350,1511856000\"; d=\"scan'208\";a=\"19654873\"",
        "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Fri, 12 Jan 2018 11:32:44 -0800",
        "Message-Id": "<20180112193251.11739-5-jeffrey.t.kirsher@intel.com>",
        "X-Mailer": "git-send-email 2.14.3",
        "In-Reply-To": "<20180112193251.11739-1-jeffrey.t.kirsher@intel.com>",
        "References": "<20180112193251.11739-1-jeffrey.t.kirsher@intel.com>",
        "Subject": "[Intel-wired-lan] [PATCH 05/12] i40evf: Alloc queues for ADq on VF",
        "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: Avinash Dayanand <avinash.dayanand@intel.com>\n\nThis patch allocates number of queues requested by the user as a part\nof TC command when ADq is enabled on a VF.\n\nIn order to be consistent in design with PF implementation of ADq,\ndon't allow to set channels via ethtool from VF when ADq is already\nenabled. This means the users will not be able to change the number of\nqueues/channels via ethtool for a VF when ADq is ON. In order to be\nable to use set channels, users will be required to disable ADq first\nand then try setting the channels again.\n\nWhen ADq is enabled on VF, it goes through a reset during which VSIs\nand queues are re-configured. Meanwhile if we receive link status\nmessage from PF even before the queues are re-configured, just ignore\nthis link up message.\n\nSigned-off-by: Avinash Dayanand <avinash.dayanand@intel.com>\n---\n drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c |  6 ++++++\n drivers/net/ethernet/intel/i40evf/i40evf_main.c    | 14 ++++++++++++++\n 2 files changed, 20 insertions(+)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c b/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c\nindex aded3ad7763e..e6793255de0b 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_ethtool.c\n@@ -695,6 +695,12 @@ static int i40evf_set_channels(struct net_device *netdev,\n \t\treturn -EINVAL;\n \t}\n \n+\tif ((adapter->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADQ) &&\n+\t    adapter->num_tc) {\n+\t\tdev_info(&adapter->pdev->dev, \"Cannot set channels since ADq is enabled.\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n \t/* All of these should have already been checked by ethtool before this\n \t * even gets to us, but just to be sure.\n \t */\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\nindex ec0275f8b7ef..9d365537372c 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n@@ -1146,6 +1146,9 @@ static int i40evf_alloc_queues(struct i40evf_adapter *adapter)\n \t */\n \tif (adapter->num_req_queues)\n \t\tnum_active_queues = adapter->num_req_queues;\n+\telse if ((adapter->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADQ) &&\n+\t\t adapter->num_tc)\n+\t\tnum_active_queues = adapter->ch_config.total_qps;\n \telse\n \t\tnum_active_queues = min_t(int,\n \t\t\t\t\t  adapter->vsi_res->num_queue_pairs,\n@@ -1473,6 +1476,16 @@ int i40evf_init_interrupt_scheme(struct i40evf_adapter *adapter)\n \t\tgoto err_alloc_q_vectors;\n \t}\n \n+\t/* If we've made it so far while ADq flag being ON, then we haven't\n+\t * bailed out anywhere in middle. And ADq isn't just enabled but actual\n+\t * resources have been allocated in the reset path.\n+\t * Now we can truly claim that ADq is enabled.\n+\t */\n+\tif ((adapter->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_ADQ) &&\n+\t    adapter->num_tc)\n+\t\tdev_info(&adapter->pdev->dev, \"ADq Enabled, %u TCs created\",\n+\t\t\t adapter->num_tc);\n+\n \tdev_info(&adapter->pdev->dev, \"Multiqueue %s: Queue pair count = %u\",\n \t\t (adapter->num_active_queues > 1) ? \"Enabled\" : \"Disabled\",\n \t\t adapter->num_active_queues);\n@@ -3244,6 +3257,7 @@ static void i40evf_remove(struct pci_dev *pdev)\n \t/* Shut down all the garbage mashers on the detention level */\n \tadapter->state = __I40EVF_REMOVE;\n \tadapter->aq_required = 0;\n+\tadapter->flags &= ~I40EVF_FLAG_REINIT_ITR_NEEDED;\n \ti40evf_request_reset(adapter);\n \tmsleep(50);\n \t/* If the FW isn't responding, kick it once, but only once. */\n",
    "prefixes": [
        "05/12"
    ]
}