get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 788800,
    "url": "http://patchwork.ozlabs.org/api/patches/788800/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170714132709.52657-8-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": "<20170714132709.52657-8-alice.michael@intel.com>",
    "list_archive_url": null,
    "date": "2017-07-14T13:27:07",
    "name": "[next,S77-V3,08/10] i40evf: fix ring to vector mapping",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "a7426f340fb3344f6efa14bdb8d77d0a33f8f4f4",
    "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/20170714132709.52657-8-alice.michael@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/788800/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/788800/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"
        ],
        "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 3x8QqK3yxSz9s7F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 15 Jul 2017 07:31:25 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id E07AD8A41F;\n\tFri, 14 Jul 2017 21:31:23 +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 ShbDiduyYki9; Fri, 14 Jul 2017 21:31:23 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 5F4798A421;\n\tFri, 14 Jul 2017 21:31:23 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id ACAE81C0683\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 14 Jul 2017 21:31:19 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id A02FB8A400\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 14 Jul 2017 21:31:19 +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 YYdYaK+oaOYY for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 14 Jul 2017 21:31:18 +0000 (UTC)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 930CE8A42A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 14 Jul 2017 21:31:17 +0000 (UTC)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby orsmga105.jf.intel.com with ESMTP; 14 Jul 2017 14:31:16 -0700",
            "from unknown (HELO localhost.jf.intel.com) ([10.166.16.121])\n\tby orsmga005.jf.intel.com with ESMTP; 14 Jul 2017 14:31:16 -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.40,360,1496127600\"; d=\"scan'208\";a=\"125288638\"",
        "From": "Alice Michael <alice.michael@intel.com>",
        "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org",
        "Date": "Fri, 14 Jul 2017 09:27:07 -0400",
        "Message-Id": "<20170714132709.52657-8-alice.michael@intel.com>",
        "X-Mailer": "git-send-email 2.9.3",
        "In-Reply-To": "<20170714132709.52657-1-alice.michael@intel.com>",
        "References": "<20170714132709.52657-1-alice.michael@intel.com>",
        "Subject": "[Intel-wired-lan] [next PATCH S77-V3 08/10] i40evf: fix ring to\n\tvector mapping",
        "X-BeenThere": "intel-wired-lan@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.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: Alan Brady <alan.brady@intel.com>\n\nThe current implementation for mapping queues to vectors is broken\nbecause it attempts to map each tx and rx ring to its own vector,\nhowever we use combined queues so we should actually be mapping the\ntx/rx rings together on one vector.\n\nAlso in the current implementation, in the case where we have more\nqueues than vectors, we attempt to group the queues together into\n'chunks' and map each 'chunk' of queues to a vector.  Chunking them\ntogether would be more ideal if, and only if, we only had RSS because of\nthe way the hashing algorithm works but in the case of a future patch\nthat enables VF ADq, round robin assignment is better and still works\nwith RSS.\n\nThis patch resolves both those issues and simplifies the code needed to\naccomplish this.  Instead of treating the case where we have more queues\nthan vectors as special, if we notice our vector index is greater than\nvectors, reset the vector index to zero and continue mapping.  This\nshould ensure that in both cases, whether we have enough vectors for\neach queue or not, the queues get appropriately mapped.\n\nTesting-hints:\n    Make sure traffic continues to be received and features like RSS\n    continue to work as expected.\n\nSigned-off-by: Alan Brady <alan.brady@intel.com>\n---\n drivers/net/ethernet/intel/i40evf/i40evf_main.c | 48 ++++++-------------------\n 1 file changed, 10 insertions(+), 38 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\nindex d8e17c2..551fba6 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c\n@@ -432,52 +432,24 @@ i40evf_map_vector_to_txq(struct i40evf_adapter *adapter, int v_idx, int t_idx)\n  **/\n static int i40evf_map_rings_to_vectors(struct i40evf_adapter *adapter)\n {\n+\tint rings_remaining = adapter->num_active_queues;\n+\tint ridx = 0, vidx = 0;\n \tint q_vectors;\n-\tint v_start = 0;\n-\tint rxr_idx = 0, txr_idx = 0;\n-\tint rxr_remaining = adapter->num_active_queues;\n-\tint txr_remaining = adapter->num_active_queues;\n-\tint i, j;\n-\tint rqpv, tqpv;\n \tint err = 0;\n \n \tq_vectors = adapter->num_msix_vectors - NONQ_VECS;\n \n-\t/* The ideal configuration...\n-\t * We have enough vectors to map one per queue.\n-\t */\n-\tif (q_vectors >= (rxr_remaining * 2)) {\n-\t\tfor (; rxr_idx < rxr_remaining; v_start++, rxr_idx++)\n-\t\t\ti40evf_map_vector_to_rxq(adapter, v_start, rxr_idx);\n+\tfor (; ridx < rings_remaining; ridx++) {\n+\t\ti40evf_map_vector_to_rxq(adapter, vidx, ridx);\n+\t\ti40evf_map_vector_to_txq(adapter, vidx, ridx);\n \n-\t\tfor (; txr_idx < txr_remaining; v_start++, txr_idx++)\n-\t\t\ti40evf_map_vector_to_txq(adapter, v_start, txr_idx);\n-\t\tgoto out;\n-\t}\n-\n-\t/* If we don't have enough vectors for a 1-to-1\n-\t * mapping, we'll have to group them so there are\n-\t * multiple queues per vector.\n-\t * Re-adjusting *qpv takes care of the remainder.\n-\t */\n-\tfor (i = v_start; i < q_vectors; i++) {\n-\t\trqpv = DIV_ROUND_UP(rxr_remaining, q_vectors - i);\n-\t\tfor (j = 0; j < rqpv; j++) {\n-\t\t\ti40evf_map_vector_to_rxq(adapter, i, rxr_idx);\n-\t\t\trxr_idx++;\n-\t\t\trxr_remaining--;\n-\t\t}\n-\t}\n-\tfor (i = v_start; i < q_vectors; i++) {\n-\t\ttqpv = DIV_ROUND_UP(txr_remaining, q_vectors - i);\n-\t\tfor (j = 0; j < tqpv; j++) {\n-\t\t\ti40evf_map_vector_to_txq(adapter, i, txr_idx);\n-\t\t\ttxr_idx++;\n-\t\t\ttxr_remaining--;\n-\t\t}\n+\t\t/* In the case where we have more queues than vectors, continue\n+\t\t * round-robin on vectors until all queues are mapped.\n+\t\t */\n+\t\tif (++vidx >= q_vectors)\n+\t\t\tvidx = 0;\n \t}\n \n-out:\n \tadapter->aq_required |= I40EVF_FLAG_AQ_MAP_VECTORS;\n \n \treturn err;\n",
    "prefixes": [
        "next",
        "S77-V3",
        "08/10"
    ]
}