xen-netback: Adding debugfs "io_ring_qX" files
This patch adds debugfs capabilities to netback. There used to be a similar patch floating around for classic kernel, but it used procfs. It is based on a very similar blkback patch. It creates xen-netback/[vifname]/io_ring_q[queueno] files, reading them output various ring variables etc. Writing "kick" into it imitates an interrupt happened, it can be useful to check whether the ring is just stalled due to a missed interrupt. Signed-off-by: Zoltan Kiss <zoltan.kiss@citrix.com> Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: xen-devel@lists.xenproject.org Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
a37934fc0d
commit
f51de24356
@@ -1987,6 +1987,13 @@ static int __init netback_init(void)
|
||||
|
||||
rx_drain_timeout_jiffies = msecs_to_jiffies(rx_drain_timeout_msecs);
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
xen_netback_dbg_root = debugfs_create_dir("xen-netback", NULL);
|
||||
if (IS_ERR_OR_NULL(xen_netback_dbg_root))
|
||||
pr_warn("Init of debugfs returned %ld!\n",
|
||||
PTR_ERR(xen_netback_dbg_root));
|
||||
#endif /* CONFIG_DEBUG_FS */
|
||||
|
||||
return 0;
|
||||
|
||||
failed_init:
|
||||
@@ -1997,6 +2004,10 @@ module_init(netback_init);
|
||||
|
||||
static void __exit netback_fini(void)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
if (!IS_ERR_OR_NULL(xen_netback_dbg_root))
|
||||
debugfs_remove_recursive(xen_netback_dbg_root);
|
||||
#endif /* CONFIG_DEBUG_FS */
|
||||
xenvif_xenbus_fini();
|
||||
}
|
||||
module_exit(netback_fini);
|
||||
|
Reference in New Issue
Block a user