Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/750133/?format=api
{ "id": 750133, "url": "http://patchwork.ozlabs.org/api/patches/750133/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170412111652.57301-1-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": "<20170412111652.57301-1-alice.michael@intel.com>", "list_archive_url": null, "date": "2017-04-12T11:16:52", "name": "[next,S69,01/01] i40e: dump VF information in debugfs", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "fa5580a0a92c58a5d1be276312b934e220b239ca", "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/20170412111652.57301-1-alice.michael@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/750133/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/750133/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@lists.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 3w3DJ76xWRz9rxm\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 13 Apr 2017 05:19:35 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 854E98A23A;\n\tWed, 12 Apr 2017 19:19:34 +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 60lEfr4zIzVa; Wed, 12 Apr 2017 19:19:33 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id E009F8A214;\n\tWed, 12 Apr 2017 19:19:33 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id B50781C04AB\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 12 Apr 2017 19:19:29 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id AA60C89F27\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 12 Apr 2017 19:19:29 +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 hMlKFA2u5eHe for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 12 Apr 2017 19:19:28 +0000 (UTC)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id C391489F63\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 12 Apr 2017 19:19:28 +0000 (UTC)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t12 Apr 2017 12:19:28 -0700", "from unknown (HELO localhost.jf.intel.com) ([10.166.16.121])\n\tby fmsmga005.fm.intel.com with ESMTP; 12 Apr 2017 12:19:28 -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.37,191,1488873600\"; d=\"scan'208\";a=\"88014795\"", "From": "Alice Michael <alice.michael@intel.com>", "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org", "Date": "Wed, 12 Apr 2017 07:16:52 -0400", "Message-Id": "<20170412111652.57301-1-alice.michael@intel.com>", "X-Mailer": "git-send-email 2.9.3", "Subject": "[Intel-wired-lan] [next S69 01/01] i40e: dump VF information in\n\tdebugfs", "X-BeenThere": "intel-wired-lan@lists.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.lists.osuosl.org>", "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>", "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.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@lists.osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>" }, "content": "From: Mitch Williams <mitch.a.williams@intel.com>\n\nDump some internal state about VFs through debugfs. This provides\ninformation not available with 'ip link show'. To use, write \"dump vf\n<id>\" to the command file, or just \"dump vf\" to dump information on all\nof the VFs.\n\nSigned-off-by: Mitch Williams <mitch.a.williams@intel.com>\nChange-ID: Ibe32b7f4ae55d4358c0b903217475f708ada1ecd\n---\n drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 51 ++++++++++++++++++++++++++\n 1 file changed, 51 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\nindex c5f68cc..a3d7ec6 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\n@@ -384,6 +384,8 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)\n \t\t \" base_queue = %d, num_queue_pairs = %d, num_desc = %d\\n\",\n \t\t vsi->base_queue, vsi->num_queue_pairs, vsi->num_desc);\n \tdev_info(&pf->pdev->dev, \" type = %i\\n\", vsi->type);\n+\tif (vsi->type == I40E_VSI_SRIOV)\n+\t\tdev_info(&pf->pdev->dev, \" VF ID = %i\\n\", vsi->vf_id);\n \tdev_info(&pf->pdev->dev,\n \t\t \" info: valid_sections = 0x%04x, switch_id = 0x%04x\\n\",\n \t\t vsi->info.valid_sections, vsi->info.switch_id);\n@@ -694,6 +696,47 @@ static void i40e_dbg_dump_veb_all(struct i40e_pf *pf)\n \t}\n }\n \n+/**\n+ * i40e_dbg_dump_vf - dump VF info\n+ * @pf: the i40e_pf created in command write\n+ * @vf_id: the vf_id from the user\n+ **/\n+static void i40e_dbg_dump_vf(struct i40e_pf *pf, int vf_id)\n+{\n+\tstruct i40e_vf *vf;\n+\tstruct i40e_vsi *vsi;\n+\n+\tif (!pf->num_alloc_vfs) {\n+\t\tdev_info(&pf->pdev->dev, \"no VFs allocated\\n\");\n+\t} else if ((vf_id >= 0) && (vf_id < pf->num_alloc_vfs)) {\n+\t\tvf = &pf->vf[vf_id];\n+\t\tvsi = pf->vsi[vf->lan_vsi_idx];\n+\t\tdev_info(&pf->pdev->dev, \"vf %2d: VSI id=%d, seid=%d, qps=%d\\n\",\n+\t\t\t vf_id, vf->lan_vsi_id, vsi->seid, vf->num_queue_pairs);\n+\t\tdev_info(&pf->pdev->dev, \" num MDD=%lld, invalid msg=%lld, valid msg=%lld\\n\",\n+\t\t\t vf->num_mdd_events,\n+\t\t\t vf->num_invalid_msgs,\n+\t\t\t vf->num_valid_msgs);\n+\t} else {\n+\t\tdev_info(&pf->pdev->dev, \"invalid VF id %d\\n\", vf_id);\n+\t}\n+}\n+\n+/**\n+ * i40e_dbg_dump_vf_all - dump VF info for all VFs\n+ * @pf: the i40e_pf created in command write\n+ **/\n+static void i40e_dbg_dump_vf_all(struct i40e_pf *pf)\n+{\n+\tint i;\n+\n+\tif (!pf->num_alloc_vfs)\n+\t\tdev_info(&pf->pdev->dev, \"no VFs enabled!\\n\");\n+\telse\n+\t\tfor (i = 0; i < pf->num_alloc_vfs; i++)\n+\t\t\ti40e_dbg_dump_vf(pf, i);\n+}\n+\n #define I40E_MAX_DEBUG_OUT_BUFFER (4096*4)\n /**\n * i40e_dbg_command_write - write into command datum\n@@ -712,6 +755,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,\n \tstruct i40e_vsi *vsi;\n \tint vsi_seid;\n \tint veb_seid;\n+\tint vf_id;\n \tint cnt;\n \n \t/* don't allow partial writes */\n@@ -914,6 +958,12 @@ static ssize_t i40e_dbg_command_write(struct file *filp,\n \t\t\t\ti40e_dbg_dump_veb_seid(pf, vsi_seid);\n \t\t\telse\n \t\t\t\ti40e_dbg_dump_veb_all(pf);\n+\t\t} else if (strncmp(&cmd_buf[5], \"vf\", 2) == 0) {\n+\t\t\tcnt = sscanf(&cmd_buf[7], \"%i\", &vf_id);\n+\t\t\tif (cnt > 0)\n+\t\t\t\ti40e_dbg_dump_vf(pf, vf_id);\n+\t\t\telse\n+\t\t\t\ti40e_dbg_dump_vf_all(pf);\n \t\t} else if (strncmp(&cmd_buf[5], \"desc\", 4) == 0) {\n \t\t\tint ring_id, desc_n;\n \t\t\tif (strncmp(&cmd_buf[10], \"rx\", 2) == 0) {\n@@ -1109,6 +1159,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,\n \t\t\tdev_info(&pf->pdev->dev, \"dump vsi [seid]\\n\");\n \t\t\tdev_info(&pf->pdev->dev, \"dump reset stats\\n\");\n \t\t\tdev_info(&pf->pdev->dev, \"dump port\\n\");\n+\t\t\tdev_info(&pf->pdev->dev, \"dump vf [vf_id]\\n\");\n \t\t\tdev_info(&pf->pdev->dev,\n \t\t\t\t \"dump debug fwdata <cluster_id> <table_id> <index>\\n\");\n \t\t}\n", "prefixes": [ "next", "S69", "01/01" ] }