Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1049865/?format=api
{ "id": 1049865, "url": "http://patchwork.ozlabs.org/api/patches/1049865/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190228232603.32156-18-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": "<20190228232603.32156-18-anirudh.venkataramanan@intel.com>", "list_archive_url": null, "date": "2019-02-28T23:26:03", "name": "[S17,17/17] ice: Use pf instead of vsi-back", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "5f56d63fc15e85939e3714633c5c98f26f73d0ba", "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/20190228232603.32156-18-anirudh.venkataramanan@intel.com/mbox/", "series": [ { "id": 94829, "url": "http://patchwork.ozlabs.org/api/series/94829/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=94829", "date": "2019-02-28T23:25:46", "name": "Implementation updates for ice", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/94829/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1049865/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1049865/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 449TFp2QqGz9s4V\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 1 Mar 2019 10:26:22 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id EB46681ADE;\n\tThu, 28 Feb 2019 23:26:20 +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 1qzXqOJ1tj+g; Thu, 28 Feb 2019 23:26:15 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id E62A481D76;\n\tThu, 28 Feb 2019 23:26:11 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 75C261BF3EA\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 28 Feb 2019 23:26:08 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 732638126A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 28 Feb 2019 23:26:08 +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 aXSBozEx1N9h for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 28 Feb 2019 23:26:06 +0000 (UTC)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 8ABF681D76\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 28 Feb 2019 23:26:06 +0000 (UTC)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t28 Feb 2019 15:26:06 -0800", "from shasta.jf.intel.com ([10.166.241.11])\n\tby FMSMGA003.fm.intel.com with ESMTP; 28 Feb 2019 15:26: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.58,425,1544515200\"; d=\"scan'208\";a=\"137128008\"", "From": "Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 28 Feb 2019 15:26:03 -0800", "Message-Id": "<20190228232603.32156-18-anirudh.venkataramanan@intel.com>", "X-Mailer": "git-send-email 2.14.5", "In-Reply-To": "<20190228232603.32156-1-anirudh.venkataramanan@intel.com>", "References": "<20190228232603.32156-1-anirudh.venkataramanan@intel.com>", "Subject": "[Intel-wired-lan] [PATCH S17 17/17] ice: Use pf instead of vsi-back", "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: Jesse Brandeburg <jesse.brandeburg@intel.com>\n\nMany times in our functions we have a local variable pf, which is\nequivalent to vsi->back. Just use pf consistently instead of vsi->back\nwhere available.\n\nSigned-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>\nSigned-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>\n---\n[Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> cleaned up commit message]\n---\n drivers/net/ethernet/intel/ice/ice_lib.c | 60 ++++++++++++++++----------------\n 1 file changed, 30 insertions(+), 30 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c\nindex 49c75371af08..bda6ade755c3 100644\n--- a/drivers/net/ethernet/intel/ice/ice_lib.c\n+++ b/drivers/net/ethernet/intel/ice/ice_lib.c\n@@ -301,7 +301,6 @@ static void ice_vsi_set_num_desc(struct ice_vsi *vsi)\n static void ice_vsi_set_num_qs(struct ice_vsi *vsi, u16 vf_id)\n {\n \tstruct ice_pf *pf = vsi->back;\n-\n \tstruct ice_vf *vf = NULL;\n \n \tif (vsi->type == ICE_VSI_VF)\n@@ -325,8 +324,7 @@ static void ice_vsi_set_num_qs(struct ice_vsi *vsi, u16 vf_id)\n \t\tvsi->num_q_vectors = pf->num_vf_msix - 1;\n \t\tbreak;\n \tdefault:\n-\t\tdev_warn(&vsi->back->pdev->dev, \"Unknown VSI type %d\\n\",\n-\t\t\t vsi->type);\n+\t\tdev_warn(&pf->pdev->dev, \"Unknown VSI type %d\\n\", vsi->type);\n \t\tbreak;\n \t}\n \n@@ -573,7 +571,7 @@ static int __ice_vsi_get_qs_contig(struct ice_qs_cfg *qs_cfg)\n \n /**\n * __ice_vsi_get_qs_sc - Assign a scattered queues from PF to VSI\n- * @qs_cfg: gathered variables needed for PF->VSI queues assignment\n+ * @qs_cfg: gathered variables needed for pf->vsi queues assignment\n *\n * Return 0 on success and -ENOMEM in case of no left space in PF queue bitmap\n */\n@@ -917,6 +915,9 @@ static void ice_vsi_setup_q_map(struct ice_vsi *vsi, struct ice_vsi_ctx *ctxt)\n static void ice_set_rss_vsi_ctx(struct ice_vsi_ctx *ctxt, struct ice_vsi *vsi)\n {\n \tu8 lut_type, hash_type;\n+\tstruct ice_pf *pf;\n+\n+\tpf = vsi->back;\n \n \tswitch (vsi->type) {\n \tcase ICE_VSI_PF:\n@@ -930,8 +931,7 @@ static void ice_set_rss_vsi_ctx(struct ice_vsi_ctx *ctxt, struct ice_vsi *vsi)\n \t\thash_type = ICE_AQ_VSI_Q_OPT_RSS_TPLZ;\n \t\tbreak;\n \tdefault:\n-\t\tdev_warn(&vsi->back->pdev->dev, \"Unknown VSI type %d\\n\",\n-\t\t\t vsi->type);\n+\t\tdev_warn(&pf->pdev->dev, \"Unknown VSI type %d\\n\", vsi->type);\n \t\treturn;\n \t}\n \n@@ -1018,10 +1018,11 @@ static int ice_vsi_init(struct ice_vsi *vsi)\n static void ice_free_q_vector(struct ice_vsi *vsi, int v_idx)\n {\n \tstruct ice_q_vector *q_vector;\n+\tstruct ice_pf *pf = vsi->back;\n \tstruct ice_ring *ring;\n \n \tif (!vsi->q_vectors[v_idx]) {\n-\t\tdev_dbg(&vsi->back->pdev->dev, \"Queue vector at index %d not found\\n\",\n+\t\tdev_dbg(&pf->pdev->dev, \"Queue vector at index %d not found\\n\",\n \t\t\tv_idx);\n \t\treturn;\n \t}\n@@ -1036,7 +1037,7 @@ static void ice_free_q_vector(struct ice_vsi *vsi, int v_idx)\n \tif (vsi->netdev)\n \t\tnetif_napi_del(&q_vector->napi);\n \n-\tdevm_kfree(&vsi->back->pdev->dev, q_vector);\n+\tdevm_kfree(&pf->pdev->dev, q_vector);\n \tvsi->q_vectors[v_idx] = NULL;\n }\n \n@@ -1188,8 +1189,7 @@ static int ice_vsi_setup_vector_base(struct ice_vsi *vsi)\n \t\t\t\t\t\t num_q_vectors, vsi->idx);\n \t\tbreak;\n \tdefault:\n-\t\tdev_warn(&vsi->back->pdev->dev, \"Unknown VSI type %d\\n\",\n-\t\t\t vsi->type);\n+\t\tdev_warn(&pf->pdev->dev, \"Unknown VSI type %d\\n\", vsi->type);\n \t\tbreak;\n \t}\n \n@@ -1198,7 +1198,7 @@ static int ice_vsi_setup_vector_base(struct ice_vsi *vsi)\n \t\t\t\"Failed to get tracking for %d HW vectors for VSI %d, err=%d\\n\",\n \t\t\tnum_q_vectors, vsi->vsi_num, vsi->hw_base_vector);\n \t\tif (vsi->type != ICE_VSI_VF) {\n-\t\t\tice_free_res(vsi->back->sw_irq_tracker,\n+\t\t\tice_free_res(pf->sw_irq_tracker,\n \t\t\t\t vsi->sw_base_vector, vsi->idx);\n \t\t\tpf->num_avail_sw_msix += num_q_vectors;\n \t\t}\n@@ -1409,13 +1409,13 @@ static int ice_vsi_cfg_rss_lut_key(struct ice_vsi *vsi)\n \t\t\t\t vsi->rss_table_size);\n \n \tif (status) {\n-\t\tdev_err(&vsi->back->pdev->dev,\n+\t\tdev_err(&pf->pdev->dev,\n \t\t\t\"set_rss_lut failed, error %d\\n\", status);\n \t\terr = -EIO;\n \t\tgoto ice_vsi_cfg_rss_exit;\n \t}\n \n-\tkey = devm_kzalloc(&vsi->back->pdev->dev, sizeof(*key), GFP_KERNEL);\n+\tkey = devm_kzalloc(&pf->pdev->dev, sizeof(*key), GFP_KERNEL);\n \tif (!key) {\n \t\terr = -ENOMEM;\n \t\tgoto ice_vsi_cfg_rss_exit;\n@@ -1432,7 +1432,7 @@ static int ice_vsi_cfg_rss_lut_key(struct ice_vsi *vsi)\n \tstatus = ice_aq_set_rss_key(&pf->hw, vsi->idx, key);\n \n \tif (status) {\n-\t\tdev_err(&vsi->back->pdev->dev, \"set_rss_key failed, error %d\\n\",\n+\t\tdev_err(&pf->pdev->dev, \"set_rss_key failed, error %d\\n\",\n \t\t\tstatus);\n \t\terr = -EIO;\n \t}\n@@ -1717,7 +1717,7 @@ ice_vsi_cfg_txqs(struct ice_vsi *vsi, struct ice_ring **rings, int offset)\n \t\t\t\t\t\t i, num_q_grps, qg_buf,\n \t\t\t\t\t\t buf_len, NULL);\n \t\t\tif (status) {\n-\t\t\t\tdev_err(&vsi->back->pdev->dev,\n+\t\t\t\tdev_err(&pf->pdev->dev,\n \t\t\t\t\t\"Failed to set LAN Tx queue context, error: %d\\n\",\n \t\t\t\t\tstatus);\n \t\t\t\terr = -ENODEV;\n@@ -2148,12 +2148,14 @@ int ice_cfg_vlan_pruning(struct ice_vsi *vsi, bool ena, bool vlan_promisc)\n {\n \tstruct ice_vsi_ctx *ctxt;\n \tstruct device *dev;\n+\tstruct ice_pf *pf;\n \tint status;\n \n \tif (!vsi)\n \t\treturn -EINVAL;\n \n-\tdev = &vsi->back->pdev->dev;\n+\tpf = vsi->back;\n+\tdev = &pf->pdev->dev;\n \tctxt = devm_kzalloc(dev, sizeof(*ctxt), GFP_KERNEL);\n \tif (!ctxt)\n \t\treturn -ENOMEM;\n@@ -2177,11 +2179,11 @@ int ice_cfg_vlan_pruning(struct ice_vsi *vsi, bool ena, bool vlan_promisc)\n \t\t\tcpu_to_le16(ICE_AQ_VSI_PROP_SECURITY_VALID |\n \t\t\t\t ICE_AQ_VSI_PROP_SW_VALID);\n \n-\tstatus = ice_update_vsi(&vsi->back->hw, vsi->idx, ctxt, NULL);\n+\tstatus = ice_update_vsi(&pf->hw, vsi->idx, ctxt, NULL);\n \tif (status) {\n \t\tnetdev_err(vsi->netdev, \"%sabling VLAN pruning on VSI handle: %d, VSI HW ID: %d failed, err = %d, aq_err = %d\\n\",\n \t\t\t ena ? \"En\" : \"Dis\", vsi->idx, vsi->vsi_num, status,\n-\t\t\t vsi->back->hw.adminq.sq_last_status);\n+\t\t\t pf->hw.adminq.sq_last_status);\n \t\tgoto err_out;\n \t}\n \n@@ -2378,10 +2380,10 @@ ice_vsi_setup(struct ice_pf *pf, struct ice_port_info *pi,\n \n unroll_vector_base:\n \t/* reclaim SW interrupts back to the common pool */\n-\tice_free_res(vsi->back->sw_irq_tracker, vsi->sw_base_vector, vsi->idx);\n+\tice_free_res(pf->sw_irq_tracker, vsi->sw_base_vector, vsi->idx);\n \tpf->num_avail_sw_msix += vsi->num_q_vectors;\n \t/* reclaim HW interrupt back to the common pool */\n-\tice_free_res(vsi->back->hw_irq_tracker, vsi->hw_base_vector, vsi->idx);\n+\tice_free_res(pf->hw_irq_tracker, vsi->hw_base_vector, vsi->idx);\n \tpf->num_avail_hw_msix += vsi->num_q_vectors;\n unroll_alloc_q_vector:\n \tice_vsi_free_q_vectors(vsi);\n@@ -2718,18 +2720,16 @@ int ice_vsi_release(struct ice_vsi *vsi)\n \t/* reclaim interrupt vectors back to PF */\n \tif (vsi->type != ICE_VSI_VF) {\n \t\t/* reclaim SW interrupts back to the common pool */\n-\t\tice_free_res(vsi->back->sw_irq_tracker, vsi->sw_base_vector,\n-\t\t\t vsi->idx);\n+\t\tice_free_res(pf->sw_irq_tracker, vsi->sw_base_vector, vsi->idx);\n \t\tpf->num_avail_sw_msix += vsi->num_q_vectors;\n \t\t/* reclaim HW interrupts back to the common pool */\n-\t\tice_free_res(vsi->back->hw_irq_tracker, vsi->hw_base_vector,\n-\t\t\t vsi->idx);\n+\t\tice_free_res(pf->hw_irq_tracker, vsi->hw_base_vector, vsi->idx);\n \t\tpf->num_avail_hw_msix += vsi->num_q_vectors;\n \t} else if (test_bit(ICE_VF_STATE_CFG_INTR, vf->vf_states)) {\n \t\t/* Reclaim VF resources back only while freeing all VFs or\n \t\t * vector reassignment is requested\n \t\t */\n-\t\tice_free_res(vsi->back->hw_irq_tracker, vf->first_vector_idx,\n+\t\tice_free_res(pf->hw_irq_tracker, vf->first_vector_idx,\n \t\t\t vsi->idx);\n \t\tpf->num_avail_hw_msix += pf->num_vf_msix;\n \t}\n@@ -2798,7 +2798,7 @@ int ice_vsi_rebuild(struct ice_vsi *vsi)\n \n \tice_vsi_clear_rings(vsi);\n \tice_vsi_free_arrays(vsi, false);\n-\tice_dev_onetime_setup(&vsi->back->hw);\n+\tice_dev_onetime_setup(&pf->hw);\n \tif (vsi->type == ICE_VSI_VF)\n \t\tice_vsi_set_num_qs(vsi, vf->vf_id);\n \telse\n@@ -2837,7 +2837,7 @@ int ice_vsi_rebuild(struct ice_vsi *vsi)\n \t\t * receive traffic on first queue. Hence no need to capture\n \t\t * return value\n \t\t */\n-\t\tif (test_bit(ICE_FLAG_RSS_ENA, vsi->back->flags))\n+\t\tif (test_bit(ICE_FLAG_RSS_ENA, pf->flags))\n \t\t\tice_vsi_cfg_rss_lut_key(vsi);\n \t\tbreak;\n \tcase ICE_VSI_VF:\n@@ -2857,8 +2857,8 @@ int ice_vsi_rebuild(struct ice_vsi *vsi)\n \t\tif (ret)\n \t\t\tgoto err_vectors;\n \n-\t\tvsi->back->q_left_tx -= vsi->alloc_txq;\n-\t\tvsi->back->q_left_rx -= vsi->alloc_rxq;\n+\t\tpf->q_left_tx -= vsi->alloc_txq;\n+\t\tpf->q_left_rx -= vsi->alloc_rxq;\n \t\tbreak;\n \tdefault:\n \t\tbreak;\n@@ -2889,7 +2889,7 @@ int ice_vsi_rebuild(struct ice_vsi *vsi)\n \t}\n err_vsi:\n \tice_vsi_clear(vsi);\n-\tset_bit(__ICE_RESET_FAILED, vsi->back->state);\n+\tset_bit(__ICE_RESET_FAILED, pf->state);\n \treturn ret;\n }\n \n", "prefixes": [ "S17", "17/17" ] }