Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1314355/?format=api
{ "id": 1314355, "url": "http://patchwork.ozlabs.org/api/patches/1314355/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200622124624.18847-3-ciara.loftus@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": "<20200622124624.18847-3-ciara.loftus@intel.com>", "list_archive_url": null, "date": "2020-06-22T12:46:24", "name": "[net-next,3/3] i40e: introduce new dump desc xdp command", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "86def241122baf5c4f8b733075eb4a4149ded623", "submitter": { "id": 67255, "url": "http://patchwork.ozlabs.org/api/people/67255/?format=api", "name": "Ciara Loftus", "email": "ciara.loftus@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/20200622124624.18847-3-ciara.loftus@intel.com/mbox/", "series": [ { "id": 184976, "url": "http://patchwork.ozlabs.org/api/series/184976/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=184976", "date": "2020-06-22T12:46:22", "name": "[net-next,1/3] i40e: add xdp ring statistics to vsi stats", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/184976/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1314355/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1314355/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 spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN>)", "ozlabs.org;\n dmarc=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 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 49r8pX2rVWz9sDX\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 22 Jun 2020 23:07:48 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 6FA5C8868B;\n\tMon, 22 Jun 2020 13:07:46 +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 OIJqrj7yDi-O; Mon, 22 Jun 2020 13:07:43 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id B9B0088680;\n\tMon, 22 Jun 2020 13:07:43 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n by ash.osuosl.org (Postfix) with ESMTP id CA7DE1BF390\n for <intel-wired-lan@lists.osuosl.org>; Mon, 22 Jun 2020 13:07:42 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by silver.osuosl.org (Postfix) with ESMTP id C1D6D20520\n for <intel-wired-lan@lists.osuosl.org>; Mon, 22 Jun 2020 13:07:42 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id C4Khv7Hjdim4 for <intel-wired-lan@lists.osuosl.org>;\n Mon, 22 Jun 2020 13:07:41 +0000 (UTC)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by silver.osuosl.org (Postfix) with ESMTPS id 7767A203A5\n for <intel-wired-lan@lists.osuosl.org>; Mon, 22 Jun 2020 13:07:41 +0000 (UTC)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Jun 2020 06:07:41 -0700", "from silpixa00399839.ir.intel.com (HELO localhost.localdomain)\n ([10.237.222.8])\n by FMSMGA003.fm.intel.com with ESMTP; 22 Jun 2020 06:07:40 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "IronPort-SDR": [ "\n wMLcGEGEcegq/WDBVTze5TJWeiINIYNbb+/tfdNrobsXFNP0BJtJkfWyfqBKoZL2TYYfB1WsPY\n pQ0YE+C3vlDQ==", "\n c6tiMZMYMtsWZGCu6V0zPK4iw9PibIiEiQr4PibPF2zY13ky61hsgxqWMHA8FGO/OJ0Lqth9FS\n 24r2PVScXS8g==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9659\"; a=\"143712451\"", "E=Sophos;i=\"5.75,266,1589266800\"; d=\"scan'208\";a=\"143712451\"", "E=Sophos;i=\"5.75,266,1589266800\"; d=\"scan'208\";a=\"318774432\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "From": "Ciara Loftus <ciara.loftus@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 22 Jun 2020 12:46:24 +0000", "Message-Id": "<20200622124624.18847-3-ciara.loftus@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20200622124624.18847-1-ciara.loftus@intel.com>", "References": "<20200622124624.18847-1-ciara.loftus@intel.com>", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH net-next 3/3] i40e: introduce new dump\n desc xdp command", "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 <intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <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 <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Cc": "netdev@vger.kernel.org, magnus.karlsson@intel.com", "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": "Interfaces already exist for dumping rx and tx descriptor information.\nIntroduce another for doing the same for xdp descriptors.\n\nSigned-off-by: Ciara Loftus <ciara.loftus@intel.com>\n---\n .../net/ethernet/intel/i40e/i40e_debugfs.c | 59 +++++++++++++++----\n 1 file changed, 48 insertions(+), 11 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\nindex 1c8285fce33f..3eb9ac7bd97d 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c\n@@ -10,6 +10,12 @@\n \n static struct dentry *i40e_dbg_root;\n \n+enum ring_type {\n+\tRING_TYPE_RX,\n+\tRING_TYPE_TX,\n+\tRING_TYPE_XDP\n+};\n+\n /**\n * i40e_dbg_find_vsi - searches for the vsi with the given seid\n * @pf: the PF structure to search for the vsi\n@@ -530,11 +536,12 @@ static void i40e_dbg_dump_aq_desc(struct i40e_pf *pf)\n * @ring_id: ring id entered by user\n * @desc_n: descriptor number entered by user\n * @pf: the i40e_pf created in command write\n- * @is_rx_ring: true if rx, false if tx\n+ * @ring_type: enum describing whether ring is RX, TX or XDP\n **/\n static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,\n-\t\t\t struct i40e_pf *pf, bool is_rx_ring)\n+\t\t\t struct i40e_pf *pf, enum ring_type type)\n {\n+\tbool is_rx_ring = type == RING_TYPE_RX;\n \tstruct i40e_tx_desc *txd;\n \tunion i40e_rx_desc *rxd;\n \tstruct i40e_ring *ring;\n@@ -546,6 +553,10 @@ static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,\n \t\tdev_info(&pf->pdev->dev, \"vsi %d not found\\n\", vsi_seid);\n \t\treturn;\n \t}\n+\tif (type == RING_TYPE_XDP && !i40e_enabled_xdp_vsi(vsi)) {\n+\t\tdev_info(&pf->pdev->dev, \"xdp not enabled on vsi %d\\n\", vsi_seid);\n+\t\treturn;\n+\t}\n \tif (ring_id >= vsi->num_queue_pairs || ring_id < 0) {\n \t\tdev_info(&pf->pdev->dev, \"ring %d not found\\n\", ring_id);\n \t\treturn;\n@@ -557,15 +568,32 @@ static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,\n \t\treturn;\n \t}\n \n-\tring = kmemdup(is_rx_ring\n-\t\t ? vsi->rx_rings[ring_id] : vsi->tx_rings[ring_id],\n-\t\t sizeof(*ring), GFP_KERNEL);\n+\tswitch (type) {\n+\tcase RING_TYPE_RX:\n+\t\tring = kmemdup(vsi->rx_rings[ring_id], sizeof(*ring), GFP_KERNEL);\n+\t\tbreak;\n+\tcase RING_TYPE_TX:\n+\t\tring = kmemdup(vsi->tx_rings[ring_id], sizeof(*ring), GFP_KERNEL);\n+\t\tbreak;\n+\tcase RING_TYPE_XDP:\n+\t\tring = kmemdup(vsi->xdp_rings[ring_id], sizeof(*ring), GFP_KERNEL);\n+\t\tbreak;\n+\t}\n \tif (!ring)\n \t\treturn;\n \n \tif (cnt == 2) {\n-\t\tdev_info(&pf->pdev->dev, \"vsi = %02i %s ring = %02i\\n\",\n-\t\t\t vsi_seid, is_rx_ring ? \"rx\" : \"tx\", ring_id);\n+\t\tswitch (type) {\n+\t\tcase RING_TYPE_RX:\n+\t\t\tdev_info(&pf->pdev->dev, \"vsi = %02i rx ring = %02i\\n\", vsi_seid, ring_id);\n+\t\t\tbreak;\n+\t\tcase RING_TYPE_TX:\n+\t\t\tdev_info(&pf->pdev->dev, \"vsi = %02i tx ring = %02i\\n\", vsi_seid, ring_id);\n+\t\t\tbreak;\n+\t\tcase RING_TYPE_XDP:\n+\t\t\tdev_info(&pf->pdev->dev, \"vsi = %02i xdp ring = %02i\\n\", vsi_seid, ring_id);\n+\t\t\tbreak;\n+\t\t}\n \t\tfor (i = 0; i < ring->count; i++) {\n \t\t\tif (!is_rx_ring) {\n \t\t\t\ttxd = I40E_TX_DESC(ring, i);\n@@ -603,7 +631,7 @@ static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,\n \t\t\t\t rxd->read.rsvd1, rxd->read.rsvd2);\n \t\t}\n \t} else {\n-\t\tdev_info(&pf->pdev->dev, \"dump desc rx/tx <vsi_seid> <ring_id> [<desc_n>]\\n\");\n+\t\tdev_info(&pf->pdev->dev, \"dump desc rx/tx/xdp <vsi_seid> <ring_id> [<desc_n>]\\n\");\n \t}\n \n out:\n@@ -961,13 +989,19 @@ static ssize_t i40e_dbg_command_write(struct file *filp,\n \t\t\t\tcnt = sscanf(&cmd_buf[12], \"%i %i %i\",\n \t\t\t\t\t &vsi_seid, &ring_id, &desc_n);\n \t\t\t\ti40e_dbg_dump_desc(cnt, vsi_seid, ring_id,\n-\t\t\t\t\t\t desc_n, pf, true);\n+\t\t\t\t\t\t desc_n, pf, RING_TYPE_RX);\n \t\t\t} else if (strncmp(&cmd_buf[10], \"tx\", 2)\n \t\t\t\t\t== 0) {\n \t\t\t\tcnt = sscanf(&cmd_buf[12], \"%i %i %i\",\n \t\t\t\t\t &vsi_seid, &ring_id, &desc_n);\n \t\t\t\ti40e_dbg_dump_desc(cnt, vsi_seid, ring_id,\n-\t\t\t\t\t\t desc_n, pf, false);\n+\t\t\t\t\t\t desc_n, pf, RING_TYPE_TX);\n+\t\t\t} else if (strncmp(&cmd_buf[10], \"xdp\", 3)\n+\t\t\t\t\t== 0) {\n+\t\t\t\tcnt = sscanf(&cmd_buf[13], \"%i %i %i\",\n+\t\t\t\t\t &vsi_seid, &ring_id, &desc_n);\n+\t\t\t\ti40e_dbg_dump_desc(cnt, vsi_seid, ring_id,\n+\t\t\t\t\t\t desc_n, pf, RING_TYPE_XDP);\n \t\t\t} else if (strncmp(&cmd_buf[10], \"aq\", 2) == 0) {\n \t\t\t\ti40e_dbg_dump_aq_desc(pf);\n \t\t\t} else {\n@@ -975,6 +1009,8 @@ static ssize_t i40e_dbg_command_write(struct file *filp,\n \t\t\t\t\t \"dump desc tx <vsi_seid> <ring_id> [<desc_n>]\\n\");\n \t\t\t\tdev_info(&pf->pdev->dev,\n \t\t\t\t\t \"dump desc rx <vsi_seid> <ring_id> [<desc_n>]\\n\");\n+\t\t\t\tdev_info(&pf->pdev->dev,\n+\t\t\t\t\t \"dump desc xdp <vsi_seid> <ring_id> [<desc_n>]\\n\");\n \t\t\t\tdev_info(&pf->pdev->dev, \"dump desc aq\\n\");\n \t\t\t}\n \t\t} else if (strncmp(&cmd_buf[5], \"reset stats\", 11) == 0) {\n@@ -1145,7 +1181,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,\n \t\t\tbuff = NULL;\n \t\t} else {\n \t\t\tdev_info(&pf->pdev->dev,\n-\t\t\t\t \"dump desc tx <vsi_seid> <ring_id> [<desc_n>], dump desc rx <vsi_seid> <ring_id> [<desc_n>],\\n\");\n+\t\t\t\t \"dump desc tx <vsi_seid> <ring_id> [<desc_n>], dump desc rx <vsi_seid> <ring_id> [<desc_n>], dump desc xdp <vsi_seid> <ring_id> [<desc_n>],\\n\");\n \t\t\tdev_info(&pf->pdev->dev, \"dump switch\\n\");\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@@ -1561,6 +1597,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,\n \t\tdev_info(&pf->pdev->dev, \" dump vsi [seid]\\n\");\n \t\tdev_info(&pf->pdev->dev, \" dump desc tx <vsi_seid> <ring_id> [<desc_n>]\\n\");\n \t\tdev_info(&pf->pdev->dev, \" dump desc rx <vsi_seid> <ring_id> [<desc_n>]\\n\");\n+\t\tdev_info(&pf->pdev->dev, \" dump desc xdp <vsi_seid> <ring_id> [<desc_n>]\\n\");\n \t\tdev_info(&pf->pdev->dev, \" dump desc aq\\n\");\n \t\tdev_info(&pf->pdev->dev, \" dump reset stats\\n\");\n \t\tdev_info(&pf->pdev->dev, \" dump debug fwdata <cluster_id> <table_id> <index>\\n\");\n", "prefixes": [ "net-next", "3/3" ] }