get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1144200,
    "url": "http://patchwork.ozlabs.org/api/patches/1144200/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190808143938.4968-12-anthony.l.nguyen@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": "<20190808143938.4968-12-anthony.l.nguyen@intel.com>",
    "list_archive_url": null,
    "date": "2019-08-08T14:39:35",
    "name": "[S27,12/15] ice: clean up arguments",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "f2e95fb23c61b2fb9f2706c6f68baf151f4399c2",
    "submitter": {
        "id": 68875,
        "url": "http://patchwork.ozlabs.org/api/people/68875/?format=api",
        "name": "Tony Nguyen",
        "email": "anthony.l.nguyen@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/20190808143938.4968-12-anthony.l.nguyen@intel.com/mbox/",
    "series": [
        {
            "id": 124091,
            "url": "http://patchwork.ozlabs.org/api/series/124091/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=124091",
            "date": "2019-08-08T14:39:28",
            "name": "[S27,01/15] ice: Limit Max TCs on devices with more than 4 ports",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/124091/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1144200/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1144200/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>)",
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com"
        ],
        "Received": [
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\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 464PDp0Q6jz9sNy\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  9 Aug 2019 09:08:25 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 637218833E;\n\tThu,  8 Aug 2019 23:08: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 BtlHF1tj2045; Thu,  8 Aug 2019 23:08:23 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id AF2D88831F;\n\tThu,  8 Aug 2019 23:08:23 +0000 (UTC)",
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id E1BFD1BF9B6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  8 Aug 2019 23:08:19 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id C524C8835D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  8 Aug 2019 23:08: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 uCA06gay4LMU for <intel-wired-lan@lists.osuosl.org>;\n\tThu,  8 Aug 2019 23:08:18 +0000 (UTC)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 39AE088353\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  8 Aug 2019 23:08:18 +0000 (UTC)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Aug 2019 16:08:17 -0700",
            "from unknown (HELO localhost.jf.intel.com) ([10.166.244.174])\n\tby orsmga008.jf.intel.com with ESMTP; 08 Aug 2019 16:08: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-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.64,363,1559545200\"; d=\"scan'208\";a=\"169141837\"",
        "From": "Tony Nguyen <anthony.l.nguyen@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org",
        "Date": "Thu,  8 Aug 2019 07:39:35 -0700",
        "Message-Id": "<20190808143938.4968-12-anthony.l.nguyen@intel.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190808143938.4968-1-anthony.l.nguyen@intel.com>",
        "References": "<20190808143938.4968-1-anthony.l.nguyen@intel.com>",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH S27 12/15] ice: clean up arguments",
        "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>",
        "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: Jesse Brandeburg <jesse.brandeburg@intel.com>\n\nThere are a couple of functions that don't need two arguments\npassed in when the second argument already had access to\nthe pointer pointed to by the first.\n\nRemove the unnecessary arguments.\n\nSigned-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>\nSigned-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice_txrx.c | 43 +++++++++++------------\n 1 file changed, 21 insertions(+), 22 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c\nindex 5bf5c179a738..4fe1b332e67e 100644\n--- a/drivers/net/ethernet/intel/ice/ice_txrx.c\n+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c\n@@ -95,17 +95,16 @@ void ice_free_tx_ring(struct ice_ring *tx_ring)\n \n /**\n  * ice_clean_tx_irq - Reclaim resources after transmit completes\n- * @vsi: the VSI we care about\n  * @tx_ring: Tx ring to clean\n  * @napi_budget: Used to determine if we are in netpoll\n  *\n  * Returns true if there's any budget left (e.g. the clean is finished)\n  */\n-static bool\n-ice_clean_tx_irq(struct ice_vsi *vsi, struct ice_ring *tx_ring, int napi_budget)\n+static bool ice_clean_tx_irq(struct ice_ring *tx_ring, int napi_budget)\n {\n \tunsigned int total_bytes = 0, total_pkts = 0;\n-\tunsigned int budget = vsi->work_lmt;\n+\tunsigned int budget = ICE_DFLT_IRQ_WORK;\n+\tstruct ice_vsi *vsi = tx_ring->vsi;\n \ts16 i = tx_ring->next_to_clean;\n \tstruct ice_tx_desc *tx_desc;\n \tstruct ice_tx_buf *tx_buf;\n@@ -114,6 +113,8 @@ ice_clean_tx_irq(struct ice_vsi *vsi, struct ice_ring *tx_ring, int napi_budget)\n \ttx_desc = ICE_TX_DESC(tx_ring, i);\n \ti -= tx_ring->count;\n \n+\tprefetch(&vsi->state);\n+\n \tdo {\n \t\tstruct ice_tx_desc *eop_desc = tx_buf->next_to_watch;\n \n@@ -206,7 +207,7 @@ ice_clean_tx_irq(struct ice_vsi *vsi, struct ice_ring *tx_ring, int napi_budget)\n \t\tsmp_mb();\n \t\tif (__netif_subqueue_stopped(tx_ring->netdev,\n \t\t\t\t\t     tx_ring->q_index) &&\n-\t\t   !test_bit(__ICE_DOWN, vsi->state)) {\n+\t\t    !test_bit(__ICE_DOWN, vsi->state)) {\n \t\t\tnetif_wake_subqueue(tx_ring->netdev,\n \t\t\t\t\t    tx_ring->q_index);\n \t\t\t++tx_ring->tx_stats.restart_q;\n@@ -879,7 +880,7 @@ ice_rx_hash(struct ice_ring *rx_ring, union ice_32b_rx_flex_desc *rx_desc,\n \n /**\n  * ice_rx_csum - Indicate in skb if checksum is good\n- * @vsi: the VSI we care about\n+ * @ring: the ring we care about\n  * @skb: skb currently being received and modified\n  * @rx_desc: the receive descriptor\n  * @ptype: the packet type decoded by hardware\n@@ -887,7 +888,7 @@ ice_rx_hash(struct ice_ring *rx_ring, union ice_32b_rx_flex_desc *rx_desc,\n  * skb->protocol must be set before this function is called\n  */\n static void\n-ice_rx_csum(struct ice_vsi *vsi, struct sk_buff *skb,\n+ice_rx_csum(struct ice_ring *ring, struct sk_buff *skb,\n \t    union ice_32b_rx_flex_desc *rx_desc, u8 ptype)\n {\n \tstruct ice_rx_ptype_decoded decoded;\n@@ -904,7 +905,7 @@ ice_rx_csum(struct ice_vsi *vsi, struct sk_buff *skb,\n \tskb_checksum_none_assert(skb);\n \n \t/* check if Rx checksum is enabled */\n-\tif (!(vsi->netdev->features & NETIF_F_RXCSUM))\n+\tif (!(ring->netdev->features & NETIF_F_RXCSUM))\n \t\treturn;\n \n \t/* check if HW has decoded the packet and checksum */\n@@ -944,7 +945,7 @@ ice_rx_csum(struct ice_vsi *vsi, struct sk_buff *skb,\n \treturn;\n \n checksum_fail:\n-\tvsi->back->hw_csum_rx_error++;\n+\tring->vsi->back->hw_csum_rx_error++;\n }\n \n /**\n@@ -968,7 +969,7 @@ ice_process_skb_fields(struct ice_ring *rx_ring,\n \t/* modifies the skb - consumes the enet header */\n \tskb->protocol = eth_type_trans(skb, rx_ring->netdev);\n \n-\tice_rx_csum(rx_ring->vsi, skb, rx_desc, ptype);\n+\tice_rx_csum(rx_ring, skb, rx_desc, ptype);\n }\n \n /**\n@@ -1354,14 +1355,13 @@ static u32 ice_buildreg_itr(u16 itr_idx, u16 itr)\n \n /**\n  * ice_update_ena_itr - Update ITR and re-enable MSIX interrupt\n- * @vsi: the VSI associated with the q_vector\n  * @q_vector: q_vector for which ITR is being updated and interrupt enabled\n  */\n-static void\n-ice_update_ena_itr(struct ice_vsi *vsi, struct ice_q_vector *q_vector)\n+static void ice_update_ena_itr(struct ice_q_vector *q_vector)\n {\n \tstruct ice_ring_container *tx = &q_vector->tx;\n \tstruct ice_ring_container *rx = &q_vector->rx;\n+\tstruct ice_vsi *vsi = q_vector->vsi;\n \tu32 itr_val;\n \n \t/* when exiting WB_ON_ITR lets set a low ITR value and trigger\n@@ -1419,15 +1419,14 @@ ice_update_ena_itr(struct ice_vsi *vsi, struct ice_q_vector *q_vector)\n \t\t\tq_vector->itr_countdown--;\n \t}\n \n-\tif (!test_bit(__ICE_DOWN, vsi->state))\n-\t\twr32(&vsi->back->hw,\n+\tif (!test_bit(__ICE_DOWN, q_vector->vsi->state))\n+\t\twr32(&q_vector->vsi->back->hw,\n \t\t     GLINT_DYN_CTL(q_vector->reg_idx),\n \t\t     itr_val);\n }\n \n /**\n  * ice_set_wb_on_itr - set WB_ON_ITR for this q_vector\n- * @vsi: pointer to the VSI structure\n  * @q_vector: q_vector to set WB_ON_ITR on\n  *\n  * We need to tell hardware to write-back completed descriptors even when\n@@ -1440,9 +1439,10 @@ ice_update_ena_itr(struct ice_vsi *vsi, struct ice_q_vector *q_vector)\n  * value that's not 0 due to ITR granularity. Also, set the INTENA_MSK bit to\n  * make sure hardware knows we aren't meddling with the INTENA_M bit.\n  */\n-static void\n-ice_set_wb_on_itr(struct ice_vsi *vsi, struct ice_q_vector *q_vector)\n+static void ice_set_wb_on_itr(struct ice_q_vector *q_vector)\n {\n+\tstruct ice_vsi *vsi = q_vector->vsi;\n+\n \t/* already in WB_ON_ITR mode no need to change it */\n \tif (q_vector->itr_countdown == ICE_IN_WB_ON_ITR_MODE)\n \t\treturn;\n@@ -1473,7 +1473,6 @@ int ice_napi_poll(struct napi_struct *napi, int budget)\n {\n \tstruct ice_q_vector *q_vector =\n \t\t\t\tcontainer_of(napi, struct ice_q_vector, napi);\n-\tstruct ice_vsi *vsi = q_vector->vsi;\n \tbool clean_complete = true;\n \tstruct ice_ring *ring;\n \tint budget_per_ring;\n@@ -1483,7 +1482,7 @@ int ice_napi_poll(struct napi_struct *napi, int budget)\n \t * budget and be more aggressive about cleaning up the Tx descriptors.\n \t */\n \tice_for_each_ring(ring, q_vector->tx)\n-\t\tif (!ice_clean_tx_irq(vsi, ring, budget))\n+\t\tif (!ice_clean_tx_irq(ring, budget))\n \t\t\tclean_complete = false;\n \n \t/* Handle case where we are called by netpoll with a budget of 0 */\n@@ -1519,9 +1518,9 @@ int ice_napi_poll(struct napi_struct *napi, int budget)\n \t * poll us due to busy-polling\n \t */\n \tif (likely(napi_complete_done(napi, work_done)))\n-\t\tice_update_ena_itr(vsi, q_vector);\n+\t\tice_update_ena_itr(q_vector);\n \telse\n-\t\tice_set_wb_on_itr(vsi, q_vector);\n+\t\tice_set_wb_on_itr(q_vector);\n \n \treturn min_t(int, work_done, budget - 1);\n }\n",
    "prefixes": [
        "S27",
        "12/15"
    ]
}