get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1044938,
    "url": "http://patchwork.ozlabs.org/api/patches/1044938/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190219230414.25627-6-anirudh.venkataramanan@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": "<20190219230414.25627-6-anirudh.venkataramanan@intel.com>",
    "list_archive_url": null,
    "date": "2019-02-19T23:04:05",
    "name": "[S15,05/14] ice: Audit hotpath structures with pahole",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "cea8b9e4bb43181995ddf1471fadac06a36b3fc8",
    "submitter": {
        "id": 73601,
        "url": "http://patchwork.ozlabs.org/api/people/73601/?format=api",
        "name": "Anirudh Venkataramanan",
        "email": "anirudh.venkataramanan@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/20190219230414.25627-6-anirudh.venkataramanan@intel.com/mbox/",
    "series": [
        {
            "id": 93015,
            "url": "http://patchwork.ozlabs.org/api/series/93015/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=93015",
            "date": "2019-02-19T23:04:04",
            "name": "Bug fixes and minor clean up for ice",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/93015/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1044938/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1044938/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.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com"
        ],
        "Received": [
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 443xBd0PbCz9s6w\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 20 Feb 2019 10:04:24 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 91F3A81447;\n\tTue, 19 Feb 2019 23:04:23 +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 GaLAQtoXK4ly; Tue, 19 Feb 2019 23:04:21 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id ECCD5813A2;\n\tTue, 19 Feb 2019 23:04:21 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id A57391BF2EA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Feb 2019 23:04:19 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id A2BBD2344A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Feb 2019 23:04:19 +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 pcsCWxZLekZd for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Feb 2019 23:04:16 +0000 (UTC)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby silver.osuosl.org (Postfix) with ESMTPS id B84B5232D2\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 19 Feb 2019 23:04:16 +0000 (UTC)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Feb 2019 15:04:15 -0800",
            "from shasta.jf.intel.com ([10.166.241.11])\n\tby fmsmga002.fm.intel.com with ESMTP; 19 Feb 2019 15:04:15 -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.58,388,1544515200\"; d=\"scan'208\";a=\"144858771\"",
        "From": "Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Tue, 19 Feb 2019 15:04:05 -0800",
        "Message-Id": "<20190219230414.25627-6-anirudh.venkataramanan@intel.com>",
        "X-Mailer": "git-send-email 2.14.5",
        "In-Reply-To": "<20190219230414.25627-1-anirudh.venkataramanan@intel.com>",
        "References": "<20190219230414.25627-1-anirudh.venkataramanan@intel.com>",
        "Subject": "[Intel-wired-lan] [PATCH S15 05/14] ice: Audit hotpath structures\n\twith pahole",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "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: Brett Creeley <brett.creeley@intel.com>\n\nCurrently the ice_q_vector structure and ice_ring_container structure\nare taking up more space than necessary due to cache alignment holes\nand unnecessary variables respectively. This is not helping the\ndriver's performance. The following fixes were done to improve cahche\nalignment, reduce wasted space, and increase performance.\n\n1. Remove the ice_latency_range enum as it is unused.\n2. Remove the latency_range variable in the ice_ring_container structure.\n3. Change the size of the itr_idx in the ice_ring_container structure\n   from an int to an u16. This reduced the size of ice_ring_container\n   structure to 32 Bytes so it has no holes or padding.\n4. Re-arrange the ice_q_vector structure using pahole to align\n   members as best as possible in regards to 64 Byte cache line size.\n\nSigned-off-by: Brett Creeley <brett.creeley@intel.com>\nSigned-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice.h      | 21 +++++++++++++--------\n drivers/net/ethernet/intel/ice/ice_lib.c  |  2 --\n drivers/net/ethernet/intel/ice/ice_txrx.c |  2 +-\n drivers/net/ethernet/intel/ice/ice_txrx.h | 10 +---------\n 4 files changed, 15 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h\nindex 933297e81fb4..046d05a028b2 100644\n--- a/drivers/net/ethernet/intel/ice/ice.h\n+++ b/drivers/net/ethernet/intel/ice/ice.h\n@@ -296,20 +296,25 @@ struct ice_vsi {\n /* struct that defines an interrupt vector */\n struct ice_q_vector {\n \tstruct ice_vsi *vsi;\n-\tcpumask_t affinity_mask;\n-\tstruct napi_struct napi;\n-\tstruct ice_ring_container rx;\n-\tstruct ice_ring_container tx;\n-\tstruct irq_affinity_notify affinity_notify;\n+\n \tu16 v_idx;\t\t\t/* index in the vsi->q_vector array. */\n-\tu8 num_ring_tx;\t\t\t/* total number of Tx rings in vector */\n \tu8 num_ring_rx;\t\t\t/* total number of Rx rings in vector */\n-\tchar name[ICE_INT_NAME_STR_LEN];\n+\tu8 num_ring_tx;\t\t\t/* total number of Tx rings in vector */\n+\tu8 itr_countdown;\t\t/* when 0 should adjust adaptive ITR */\n \t/* in usecs, need to use ice_intrl_to_usecs_reg() before writing this\n \t * value to the device\n \t */\n \tu8 intrl;\n-\tu8 itr_countdown;\t/* when 0 should adjust adaptive ITR */\n+\n+\tstruct napi_struct napi;\n+\n+\tstruct ice_ring_container rx;\n+\tstruct ice_ring_container tx;\n+\n+\tcpumask_t affinity_mask;\n+\tstruct irq_affinity_notify affinity_notify;\n+\n+\tchar name[ICE_INT_NAME_STR_LEN];\n } ____cacheline_internodealigned_in_smp;\n \n enum ice_pf_flags {\ndiff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c\nindex f0c87c40fd9d..484c9bfd39ba 100644\n--- a/drivers/net/ethernet/intel/ice/ice_lib.c\n+++ b/drivers/net/ethernet/intel/ice/ice_lib.c\n@@ -1846,7 +1846,6 @@ ice_cfg_itr(struct ice_hw *hw, struct ice_q_vector *q_vector, u16 vector)\n \t\trc->target_itr = ITR_TO_REG(rc->itr_setting);\n \t\trc->next_update = jiffies + 1;\n \t\trc->current_itr = rc->target_itr;\n-\t\trc->latency_range = ICE_LOW_LATENCY;\n \t\twr32(hw, GLINT_ITR(rc->itr_idx, vector),\n \t\t     ITR_REG_ALIGN(rc->current_itr) >> ICE_ITR_GRAN_S);\n \t}\n@@ -1861,7 +1860,6 @@ ice_cfg_itr(struct ice_hw *hw, struct ice_q_vector *q_vector, u16 vector)\n \t\trc->target_itr = ITR_TO_REG(rc->itr_setting);\n \t\trc->next_update = jiffies + 1;\n \t\trc->current_itr = rc->target_itr;\n-\t\trc->latency_range = ICE_LOW_LATENCY;\n \t\twr32(hw, GLINT_ITR(rc->itr_idx, vector),\n \t\t     ITR_REG_ALIGN(rc->current_itr) >> ICE_ITR_GRAN_S);\n \t}\ndiff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c\nindex 549bcaa1c6d0..f2a984cbd40c 100644\n--- a/drivers/net/ethernet/intel/ice/ice_txrx.c\n+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c\n@@ -1323,7 +1323,7 @@ ice_update_itr(struct ice_q_vector *q_vector, struct ice_ring_container *rc)\n  * @itr_idx: interrupt throttling index\n  * @itr: interrupt throttling value in usecs\n  */\n-static u32 ice_buildreg_itr(int itr_idx, u16 itr)\n+static u32 ice_buildreg_itr(u16 itr_idx, u16 itr)\n {\n \t/* The itr value is reported in microseconds, and the register value is\n \t * recorded in 2 microsecond units. For this reason we only need to\ndiff --git a/drivers/net/ethernet/intel/ice/ice_txrx.h b/drivers/net/ethernet/intel/ice/ice_txrx.h\nindex 69625857c482..2c8af98ff640 100644\n--- a/drivers/net/ethernet/intel/ice/ice_txrx.h\n+++ b/drivers/net/ethernet/intel/ice/ice_txrx.h\n@@ -184,21 +184,13 @@ struct ice_ring {\n \tu16 next_to_alloc;\n } ____cacheline_internodealigned_in_smp;\n \n-enum ice_latency_range {\n-\tICE_LOWEST_LATENCY = 0,\n-\tICE_LOW_LATENCY = 1,\n-\tICE_BULK_LATENCY = 2,\n-\tICE_ULTRA_LATENCY = 3,\n-};\n-\n struct ice_ring_container {\n \t/* head of linked-list of rings */\n \tstruct ice_ring *ring;\n \tunsigned long next_update;\t/* jiffies value of next queue update */\n \tunsigned int total_bytes;\t/* total bytes processed this int */\n \tunsigned int total_pkts;\t/* total packets processed this int */\n-\tenum ice_latency_range latency_range;\n-\tint itr_idx;\t\t/* index in the interrupt vector */\n+\tu16 itr_idx;\t\t/* index in the interrupt vector */\n \tu16 target_itr;\t\t/* value in usecs divided by the hw->itr_gran */\n \tu16 current_itr;\t/* value in usecs divided by the hw->itr_gran */\n \t/* high bit set means dynamic ITR, rest is used to store user\n",
    "prefixes": [
        "S15",
        "05/14"
    ]
}